summaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-03 01:14:12 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-03 01:14:12 +0000
commit0f74e88f0996acff1580bcf5f2ea3dc986497339 (patch)
tree68bc797c1a7f54a91d7f3156807556f4e1be2a5d /src/usermanager.cpp
parent7746307ab638030a4b0a8c2c3b4c577f380e29bb (diff)
Move MODENOTICE command to a command module
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11991 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r--src/usermanager.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 05f5d2c9d..f78ebeb57 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -386,67 +386,6 @@ void UserManager::ServerPrivmsgAll(const char* text, ...)
}
}
-void UserManager::WriteMode(const char* modes, int flags, const char* text, ...)
-{
- char textbuffer[MAXBUF];
- int modelen;
- va_list argsPtr;
-
- if (!text || !modes || !flags)
- {
- ServerInstance->Logs->Log("USERS", DEFAULT,"*** BUG *** WriteMode was given an invalid parameter");
- return;
- }
-
- va_start(argsPtr, text);
- vsnprintf(textbuffer, MAXBUF, text, argsPtr);
- va_end(argsPtr);
- modelen = strlen(modes);
-
- if (flags == WM_AND)
- {
- for (std::vector<LocalUser*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
- {
- User* t = *i;
- bool send_to_user = true;
-
- for (int n = 0; n < modelen; n++)
- {
- if (!t->IsModeSet(modes[n]))
- {
- send_to_user = false;
- break;
- }
- }
- if (send_to_user)
- {
- t->WriteServ("NOTICE %s :%s", t->nick.c_str(), textbuffer);
- }
- }
- }
- else if (flags == WM_OR)
- {
- for (std::vector<LocalUser*>::const_iterator i = local_users.begin(); i != local_users.end(); i++)
- {
- User* t = *i;
- bool send_to_user = false;
-
- for (int n = 0; n < modelen; n++)
- {
- if (t->IsModeSet(modes[n]))
- {
- send_to_user = true;
- break;
- }
- }
-
- if (send_to_user)
- {
- t->WriteServ("NOTICE %s :%s", t->nick.c_str(), textbuffer);
- }
- }
- }
-}
/* return how many users have a given mode e.g. 'a' */
int UserManager::ModeCount(const char mode)