diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commandhandler.cpp | 23 |
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, |