From 33137bba446212f89f7b94f50ace20db19b6d009 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 17 May 2015 18:13:45 +0200 Subject: Move InspIRCd::SendError() to cmd_die Fix multiple ERROR messages being sent to unregistered users by removing the "Exiting with status..." message --- src/helperfuncs.cpp | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'src/helperfuncs.cpp') diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 5cde46246..d636e2d89 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -79,25 +79,6 @@ Channel* InspIRCd::FindChan(const std::string &chan) return iter->second; } -/* Send an error notice to all users, registered or not */ -void InspIRCd::SendError(const std::string &s) -{ - const UserManager::LocalList& list = Users.GetLocalUsers(); - for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i) - { - User* u = *i; - if (u->registered == REG_ALL) - { - u->WriteNotice(s); - } - else - { - /* Unregistered connections receive ERROR, not a NOTICE */ - u->Write("ERROR :" + s); - } - } -} - bool InspIRCd::IsValidMask(const std::string &mask) { const char* dest = mask.c_str(); -- cgit v1.3.1-10-gc9f91