]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setidle.cpp
Fix some logically dead code which was found by Coverity.
[user/henk/code/inspircd.git] / src / modules / m_setidle.cpp
index e3733957d12dc51288045a7cf7887627a54c6dce..fdb29d14fe7904233bb573950207283ebdb79d13 100644 (file)
@@ -46,7 +46,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', 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_SUCCESS;
@@ -61,7 +61,11 @@ class ModuleSetIdle : public Module
        ModuleSetIdle()
                : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cmd);
        }
 
        virtual ~ModuleSetIdle()