]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/snomasks.cpp
Move some stuff from using userrec cached stuff to using stuff in the connect classes
[user/henk/code/inspircd.git] / src / snomasks.cpp
index ba6d3d7d53148b7d9b70760324bfc1d819dc273b..dea7cc446aff57d61534a2275ee0609f14830291 100644 (file)
  * ---------------------------------------------------
  */
 
+/* $Core: libIRCDsnomasks */
+
 #include "inspircd.h"
 #include <stdarg.h>
-#include "configreader.h"
-#include "users.h"
 #include "snomasks.h"
 
 SnomaskManager::SnomaskManager(InspIRCd* Instance) : ServerInstance(Instance)
@@ -55,10 +55,10 @@ void SnomaskManager::WriteToSnoMask(char letter, const std::string &text)
        if (n != SnoMasks.end())
        {
                /* Only opers can receive snotices, so we iterate the oper list */
-               for (std::vector<userrec*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
+               for (std::list<User*>::iterator i = ServerInstance->all_opers.begin(); i != ServerInstance->all_opers.end(); i++)
                {
-                       userrec* a = *i;
-                       if (IS_LOCAL(a) && a->modes[UM_SERVERNOTICE] && a->modes[UM_SNOMASK] && a->IsNoticeMaskSet(n->first))
+                       User* a = *i;
+                       if (IS_LOCAL(a) && a->IsModeSet('s') && a->IsModeSet('n') && a->IsNoticeMaskSet(n->first))
                        {
                                /* send server notices to all with +ns */
                                a->WriteServ("NOTICE %s :*** %s: %s",a->nick, n->second.c_str(), text.c_str());