X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_svshold.cpp;h=276fef038cab386c6695a06b738eb8ce689d5e11;hb=f25c4b7a2263f5f3ce9bb41ba56b43c0d3a6d124;hp=5009ad408a490a5de0c5b4e9f45e6edd8e21abc1;hpb=43847ec9c7e1a195163eb4c529f1c92fd1ace0a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index 5009ad408..276fef038 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -3,7 +3,7 @@ * +------------------------------------+ * * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -48,7 +48,7 @@ public: void DisplayExpiry() { - ServerInstance->SNO->WriteToSnoMask('x',"Expiring timed SVSHOLD %s (set by %s %ld seconds ago)", this->nickname.c_str(), this->source, this->duration); + ServerInstance->SNO->WriteToSnoMask('x',"Removing expired SVSHOLD %s (set by %s %ld seconds ago)", this->nickname.c_str(), this->source, (long int)(ServerInstance->Time() - this->set_time)); } const char* Displayable() @@ -142,19 +142,17 @@ class CommandSvshold : public Command class ModuleSVSHold : public Module { - CommandSvshold *mycommand; - SVSHoldFactory *s; + CommandSvshold cmd; + SVSHoldFactory s; public: - ModuleSVSHold(InspIRCd* Me) : Module(Me) + ModuleSVSHold(InspIRCd* Me) : Module(Me), cmd(Me), s(Me) { - s = new SVSHoldFactory(ServerInstance); - ServerInstance->XLines->RegisterFactory(s); - mycommand = new CommandSvshold(Me); - ServerInstance->AddCommand(mycommand); - Implementation eventlist[] = { I_OnUserPreNick, I_OnSyncOtherMetaData, I_OnDecodeMetaData, I_OnStats }; - ServerInstance->Modules->Attach(eventlist, this, 4); + ServerInstance->XLines->RegisterFactory(&s); + ServerInstance->AddCommand(&cmd); + Implementation eventlist[] = { I_OnUserPreNick, I_OnStats }; + ServerInstance->Modules->Attach(eventlist, this, 2); } @@ -183,7 +181,7 @@ class ModuleSVSHold : public Module virtual ~ModuleSVSHold() { ServerInstance->XLines->DelAll("SVSHOLD"); - ServerInstance->XLines->UnregisterFactory(s); + ServerInstance->XLines->UnregisterFactory(&s); } virtual Version GetVersion()