summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-10 21:15:14 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-10 21:16:10 +0300
commit30dd29914106af4dc98a191e95544d95f480c03d (patch)
tree9bc691c8bda84f3ca45e6e0b893e954f2fce8013
parent783aacf002d7f01d1be0ee46e4f42e8c31632c2e (diff)
downloadmanaverse-30dd29914106af4dc98a191e95544d95f480c03d.tar.gz
manaverse-30dd29914106af4dc98a191e95544d95f480c03d.tar.bz2
manaverse-30dd29914106af4dc98a191e95544d95f480c03d.tar.xz
manaverse-30dd29914106af4dc98a191e95544d95f480c03d.zip
If server support, add chat command for party tab for set party leader.
New party chat command: /setleader
-rw-r--r--src/net/ea/gui/partytab.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp
index 7a76f7ba9..96b52b5e1 100644
--- a/src/net/ea/gui/partytab.cpp
+++ b/src/net/ea/gui/partytab.cpp
@@ -32,6 +32,7 @@
#include "net/net.h"
#include "net/partyhandler.h"
+#include "net/serverfeatures.h"
#include "gui/windows/chatwindow.h"
@@ -195,6 +196,11 @@ bool PartyTab::handleCommand(const std::string &restrict type,
break;
}
}
+ else if (type == "setleader"
+ && Net::getServerFeatures()->haveChangePartyLeader())
+ {
+ Net::getPartyHandler()->changeLeader(args);
+ }
else
{
return false;
@@ -222,6 +228,8 @@ void PartyTab::getAutoCompleteCommands(StringVect &names) const
names.push_back("/kick ");
names.push_back("/item");
names.push_back("/exp");
+ if (Net::getServerFeatures()->haveChangePartyLeader())
+ names.push_back("/setleader ");
}
void PartyTab::saveToLogFile(const std::string &msg) const