X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_setidle.cpp;h=4954e14ddc8c7899e75f9de394a544248dfc2029;hb=24731c63b6320be22f7b3220236271fa7476b975;hp=b6da3529cd17d327fac4ccad38e667ed50b96b18;hpb=d185decae97752368d5cf62311cbc0d1a52aa22c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index b6da3529c..4954e14dd 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -20,9 +20,8 @@ class CommandSetidle : public Command { public: - CommandSetidle (InspIRCd* Instance) : Command(Instance,"SETIDLE", "o", 1) + CommandSetidle (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SETIDLE", "o", 1) { - this->source = "m_setidle.so"; syntax = ""; TRANSLATE2(TR_TEXT, TR_END); } @@ -39,7 +38,7 @@ class CommandSetidle : public Command // minor tweak - we cant have signon time shorter than our idle time! if (user->signon > user->idle_lastmsg) user->signon = user->idle_lastmsg; - ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used SETIDLE to set their idle time to "+ConvToStr(idle)+" seconds"); + ServerInstance->SNO->WriteToSnoMask('a', std::string(user->nick)+" used SETIDLE to set their idle time to "+ConvToStr(idle)+" seconds"); user->WriteNumeric(944, "%s :Idle time set.",user->nick.c_str()); return CMD_LOCALONLY; @@ -49,15 +48,12 @@ class CommandSetidle : public Command class ModuleSetIdle : public Module { - CommandSetidle* mycommand; + CommandSetidle cmd; public: ModuleSetIdle(InspIRCd* Me) - : Module(Me) + : Module(Me), cmd(Me, this) { - - mycommand = new CommandSetidle(ServerInstance); - ServerInstance->AddCommand(mycommand); - + ServerInstance->AddCommand(&cmd); } virtual ~ModuleSetIdle() @@ -66,7 +62,7 @@ class ModuleSetIdle : public Module virtual Version GetVersion() { - return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION); + return Version("$Id$", VF_VENDOR, API_VERSION); } };