From f1beb8d910253a31b9dd239071effa2d518ceee0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 23 Oct 2011 00:25:26 +0300 Subject: Add chat commands for using server side ignore for all whispers. Commands: /serverignoreall and /serverunignoreall --- src/commandhandler.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/commandhandler.cpp') 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) -- cgit v1.2.3-70-g09d2