]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_lockserv.cpp
Fix m_chanlog crashing.
[user/henk/code/inspircd.git] / src / modules / m_lockserv.cpp
index d2bfff6a54aead2eb88f7efd5c3e21dcf95edb7e..cdb796390e4874d49f15f2a351835e0a819614b7 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -38,7 +38,7 @@ public:
        {
                locked = true;
                user->WriteServ("988 %s %s :Closed for new connections", user->nick, user->server);
-               ServerInstance->WriteOpers("*** Oper %s used LOCKSERV to temporarily close for new connections", user->nick);
+               ServerInstance->SNO->WriteToSnoMask('A', "Oper %s used LOCKSERV to temporarily close for new connections", user->nick);
                /* Dont send to the network */
                return CMD_LOCALONLY;
        }
@@ -61,7 +61,7 @@ public:
        {
                locked = false;
                user->WriteServ("989 %s %s :Open for new connections", user->nick, user->server);
-               ServerInstance->WriteOpers("*** Oper %s used UNLOCKSERV to allow for new connections", user->nick);
+               ServerInstance->SNO->WriteToSnoMask('A', "Oper %s used UNLOCKSERV to allow for new connections", user->nick);
                /* Dont send to the network */
                return CMD_LOCALONLY;
        }
@@ -88,16 +88,14 @@ public:
 
                unlockcommand = new CommandUnlockserv(ServerInstance, locked);
                ServerInstance->AddCommand(unlockcommand);
+               Implementation eventlist[] = { I_OnUserRegister, I_OnRehash, I_OnCheckReady };
+               ServerInstance->Modules->Attach(eventlist, this, 3);
        }
 
        virtual ~ModuleLockserv()
        {
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnUserRegister] = List[I_OnRehash] = List[I_OnCheckReady] = 1;
-       }
 
        virtual void OnRehash(User* user, const std::string &parameter)
        {