summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-10-31 03:41:03 +0300
committerAndrei Karas <akaras@inbox.ru>2011-10-31 03:41:03 +0300
commit446025bb6e9b0ad06817be9d6b3aee8b24a653f4 (patch)
tree1d1a0f2a04c0f7164f45d1dac52b6a15a039b6d4 /src/commandhandler.cpp
parente1ee9ce53bd02f46c294b3aed83adeb737f2677b (diff)
downloadplus-446025bb6e9b0ad06817be9d6b3aee8b24a653f4.tar.gz
plus-446025bb6e9b0ad06817be9d6b3aee8b24a653f4.tar.bz2
plus-446025bb6e9b0ad06817be9d6b3aee8b24a653f4.tar.xz
plus-446025bb6e9b0ad06817be9d6b3aee8b24a653f4.zip
Fix /help chat command to open help for current chat tab.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 3baebb9f0..914304f22 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -232,11 +232,32 @@ void CommandHandler::handleAnnounce(const std::string &args,
void CommandHandler::handleHelp(const std::string &args A_UNUSED,
ChatTab *tab A_UNUSED)
{
- if (helpWindow)
+ if (!helpWindow)
+ return;
+
+ if (!tab)
{
helpWindow->loadHelp("chatcommands");
helpWindow->requestMoveToTop();
+ return;
+ }
+ switch (tab->getType())
+ {
+ case ChatTab::TAB_PARTY:
+ {
+ helpWindow->loadHelp("chatparty");
+ break;
+ }
+ case ChatTab::TAB_GUILD:
+ {
+ helpWindow->loadHelp("chatguild");
+ break;
+ }
+ default:
+ helpWindow->loadHelp("chatcommands");
+ break;
}
+ helpWindow->requestMoveToTop();
}
void CommandHandler::handleWhere(const std::string &args A_UNUSED,