summaryrefslogtreecommitdiff
path: root/src/net/ea/gui/partytab.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-04-16 18:55:35 +0200
committerPhilipp Sehmisch <crush@themanaworld.org>2009-04-16 18:55:35 +0200
commit2fb36c5f27e2891bbd9968bdf9bbc7142ff28983 (patch)
tree56dc005cf1fa552f13be2668d8e4547bfaf68815 /src/net/ea/gui/partytab.cpp
parent126c19c7acd63fcd039ab9449a5d96790ce3cfac (diff)
parent736795a624ae5f04b11fa284cb8a4b14579c1766 (diff)
downloadmana-client-2fb36c5f27e2891bbd9968bdf9bbc7142ff28983.tar.gz
mana-client-2fb36c5f27e2891bbd9968bdf9bbc7142ff28983.tar.bz2
mana-client-2fb36c5f27e2891bbd9968bdf9bbc7142ff28983.tar.xz
mana-client-2fb36c5f27e2891bbd9968bdf9bbc7142ff28983.zip
Merge branch 'master' of git@gitorious.org:tmw/mainline
Diffstat (limited to 'src/net/ea/gui/partytab.cpp')
-rw-r--r--src/net/ea/gui/partytab.cpp42
1 files changed, 14 insertions, 28 deletions
diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp
index 5f6da0f9..e9651af9 100644
--- a/src/net/ea/gui/partytab.cpp
+++ b/src/net/ea/gui/partytab.cpp
@@ -46,24 +46,20 @@ void PartyTab::handleInput(const std::string &msg)
Net::getPartyHandler()->chat(msg);
}
-void PartyTab::handleCommand(std::string msg)
+void PartyTab::showHelp()
{
- std::string::size_type pos = msg.find(' ');
- std::string type(msg, 0, pos);
- std::string args(msg, pos == std::string::npos ? msg.size() : pos + 1);
+ chatLog(_("/help > Display this help."));
+ chatLog(_("/create > Create a new party"));
+ chatLog(_("/new > Alias of create"));
+ chatLog(_("/invite > Invite a player to your party"));
+ chatLog(_("/leave > Leave the party you are in"));
+}
+bool PartyTab::handleCommand(std::string type, std::string args)
+{
if (type == "help")
{
- if (args == "")
- {
- chatLog(_("-- Help --"));
- chatLog(_("/help > Display this help."));
- chatLog(_("/create > Create a new party"));
- chatLog(_("/new > Alias of create"));
- chatLog(_("/invite > Invite a player to your party"));
- chatLog(_("/leave > Leave the party you are in"));
- }
- else if (args == "create" || args == "new")
+ if (args == "create" || args == "new")
{
chatLog(_("Command: /new <party-name>"));
chatLog(_("Command: /create <party-name>"));
@@ -83,18 +79,8 @@ void PartyTab::handleCommand(std::string msg)
chatLog(_("Command: /leave"));
chatLog(_("This command causes the player to leave the party."));
}
- else if (args == "help")
- {
- chatLog(_("Command: /help"));
- chatLog(_("This command displays a list of all commands available."));
- chatLog(_("Command: /help <command>"));
- chatLog(_("This command displays help on <command>."));
- }
else
- {
- chatLog(_("Unknown command."));
- chatLog(_("Type /help for a list of commands."));
- }
+ return false;
}
else if (type == "create" || type == "new")
{
@@ -121,7 +107,7 @@ void PartyTab::handleCommand(std::string msg)
*/
}
else
- {
- chatLog("Unknown command");
- }
+ return false;
+
+ return true;
}