]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_blockamsg.cpp
Remove completed XXX: override is now only checked locally, snotices are automaticall...
[user/henk/code/inspircd.git] / src / modules / m_blockamsg.cpp
index 70fb99b9a25acd68924c14ab45cec9c276b08131..e4a4eaf4ec556b1ad8df1d31c7ba443b6d7485ad 100644 (file)
@@ -58,7 +58,7 @@ class ModuleBlockAmsg : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,1,0,0,VF_VENDOR,API_VERSION);
+               return Version(1,2,0,0,VF_VENDOR,API_VERSION);
        }
        
        virtual void OnRehash(User* user, const std::string &parameter)
@@ -84,7 +84,7 @@ class ModuleBlockAmsg : public Module
                        action = IBLOCK_KILLOPERS;
        }
 
-       virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
+       virtual int OnPreCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, bool validated, const std::string &original_line)
        {
                // Don't do anything with unregistered users, or remote ones.
                if(!user || (user->registered != REG_ALL) || !IS_LOCAL(user))
@@ -137,10 +137,10 @@ class ModuleBlockAmsg : public Module
                        {
                                // Block it...
                                if(action == IBLOCK_KILLOPERS || action == IBLOCK_NOTICEOPERS)
-                                       ServerInstance->WriteOpers("*** %s had an /amsg or /ame denied", user->nick);
+                                       ServerInstance->SNO->WriteToSnoMask('A', "%s had an /amsg or /ame denied", user->nick);
 
                                if(action == IBLOCK_KILL || action == IBLOCK_KILLOPERS)
-                                       User::QuitUser(ServerInstance, user, "Global message (/amsg or /ame) detected");
+                                       ServerInstance->Users->QuitUser(user, "Global message (/amsg or /ame) detected");
                                else if(action == IBLOCK_NOTICE || action == IBLOCK_NOTICEOPERS)
                                        user->WriteServ( "NOTICE %s :Global message (/amsg or /ame) detected", user->nick);