diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-23 00:25:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-23 00:25:26 +0300 |
commit | f1beb8d910253a31b9dd239071effa2d518ceee0 (patch) | |
tree | a350b4c4fb4aa720911aa21d7956200ddb904481 /src/commandhandler.cpp | |
parent | 2fcfbc4b1136265cbd463b9d3b721ce0cad52fe0 (diff) | |
download | plus-f1beb8d910253a31b9dd239071effa2d518ceee0.tar.gz plus-f1beb8d910253a31b9dd239071effa2d518ceee0.tar.bz2 plus-f1beb8d910253a31b9dd239071effa2d518ceee0.tar.xz plus-f1beb8d910253a31b9dd239071effa2d518ceee0.zip |
Add chat commands for using server side ignore for all whispers.
Commands: /serverignoreall and /serverunignoreall
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index f1b7518c5..7a4773d81 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -190,6 +190,10 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) handleAddIgnoreAttack(args, tab); else if (type == "dump") handleDump(args, tab); + else if (type == "serverignoreall") + handleServerIgnoreAll(args, tab); + else if (type == "serverunignoreall") + handleServerUnIgnoreAll(args, tab); else if (tab->handleCommand(type, args)) ; else if (type == "hack") @@ -1020,6 +1024,18 @@ void CommandHandler::handleCacheInfo(const std::string &args A_UNUSED, #endif } +void CommandHandler::handleServerIgnoreAll(const std::string &args, + ChatTab *tab A_UNUSED) +{ + Net::getChatHandler()->ignoreAll(); +} + +void CommandHandler::handleServerUnIgnoreAll(const std::string &args, + ChatTab *tab A_UNUSED) +{ + Net::getChatHandler()->unIgnoreAll(); +} + #ifdef DEBUG_DUMP_LEAKS void showRes(std::string str, ResourceManager::Resources *res); @@ -1076,6 +1092,7 @@ void CommandHandler::handleDump(const std::string &args, + toString(res->size())); } } + #elif defined ENABLE_MEM_DEBUG void CommandHandler::handleDump(const std::string &args A_UNUSED, ChatTab *tab A_UNUSED) |