From ec1c6bc0d44d0b6b94607d36a8cd28e6c4e484cd Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Thu, 28 May 2009 21:38:53 -0600 Subject: Add /ignore and /unignore commands These make it easy to ignore/unignore other players that aren't visible. Special versions are also available in WhisperTabs that don't need a name given. --- src/gui/widgets/whispertab.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/gui') diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 23325108..43c63cc0 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -21,6 +21,7 @@ #include "whispertab.h" +#include "commandhandler.h" #include "localplayer.h" #include "gui/palette.h" @@ -65,6 +66,8 @@ void WhisperTab::handleCommand(const std::string &msg) void WhisperTab::showHelp() { + chatLog(_("/ignore > Ignore the other player")); + chatLog(_("/unignore > Stop ignoring the other player")); chatLog(_("/close > Close the whisper tab")); } @@ -78,6 +81,18 @@ bool WhisperTab::handleCommand(const std::string &type, chatLog(_("Command: /close")); chatLog(_("This command closes the current whisper tab.")); } + else if (args == "ignore") + { + chatLog(_("Command: /ignore")); + chatLog(_("This command ignores the other player reguardless of " + "current relations.")); + } + else if (args == "unignore") + { + chatLog(_("Command: /unignore ")); + chatLog(_("This command stops ignoring the other player if they " + "are being ignored")); + } else return false; } @@ -85,6 +100,14 @@ bool WhisperTab::handleCommand(const std::string &type, { delete this; } + else if (type == "ignore") + { + commandHandler->handleIgnore(mNick, this); + } + else if (type == "unignore") + { + commandHandler->handleUnignore(mNick, this); + } else return false; -- cgit v1.2.3-70-g09d2