X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_lockserv.cpp;h=cdb796390e4874d49f15f2a351835e0a819614b7;hb=f51d9ad5ab7015f78a29039ca7ed169b281ff6bb;hp=d2bfff6a54aead2eb88f7efd5c3e21dcf95edb7e;hpb=b669f920eaa9fb795d0a103d724943898a0df4b2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_lockserv.cpp b/src/modules/m_lockserv.cpp index d2bfff6a5..cdb796390 100644 --- a/src/modules/m_lockserv.cpp +++ b/src/modules/m_lockserv.cpp @@ -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 ¶meter) {