From b0d652a15f46bbd05657b39ca1bcadd42769354b Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Thu, 16 May 2013 15:52:01 +0200 Subject: Remove unused UserManager::ServerPrivmsgAll() --- include/usermanager.h | 9 --------- src/usermanager.cpp | 24 ------------------------ 2 files changed, 33 deletions(-) diff --git a/include/usermanager.h b/include/usermanager.h index 560db17f2..1ab48925d 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -148,9 +148,6 @@ class CoreExport UserManager */ unsigned int LocalUserCount(); - - - /** Number of users with a certain mode set on them */ int ModeCount(const char mode); @@ -160,10 +157,4 @@ class CoreExport UserManager * @param ... The format arguments */ void ServerNoticeAll(const char* text, ...) CUSTOM_PRINTF(2, 3); - - /** Send a server message (PRIVMSG) to all local users - * @param text The text format string to send - * @param ... The format arguments - */ - void ServerPrivmsgAll(const char* text, ...) CUSTOM_PRINTF(2, 3); }; diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 8ed87a338..aa0be2f3b 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -322,9 +322,6 @@ unsigned int UserManager::LocalUserCount() void UserManager::ServerNoticeAll(const char* text, ...) { - if (!text) - return; - char textbuffer[MAXBUF]; va_list argsPtr; va_start (argsPtr, text); @@ -340,27 +337,6 @@ void UserManager::ServerNoticeAll(const char* text, ...) } } -void UserManager::ServerPrivmsgAll(const char* text, ...) -{ - if (!text) - return; - - char textbuffer[MAXBUF]; - va_list argsPtr; - va_start (argsPtr, text); - vsnprintf(textbuffer, MAXBUF, text, argsPtr); - va_end(argsPtr); - - const std::string message = "PRIVMSG $" + ServerInstance->Config->ServerName + " :" + textbuffer; - - for (LocalUserList::const_iterator i = local_users.begin(); i != local_users.end(); i++) - { - User* t = *i; - t->WriteServ(message); - } -} - - /* return how many users have a given mode e.g. 'a' */ int UserManager::ModeCount(const char mode) { -- cgit v1.2.3