// minor tweak - we cant have signon time shorter than our idle time!
if (user->signon > user->idle_lastmsg)
user->signon = user->idle_lastmsg;
// minor tweak - we cant have signon time shorter than our idle time!
if (user->signon > user->idle_lastmsg)
user->signon = user->idle_lastmsg;
- ServerInstance->WriteOpers(std::string(user->nick)+" used SETIDLE to set their idle time to "+ConvToStr(atoi(std::string(parameters[0])))+" seconds");
- user->WriteServ("944 %s :Idle time set.",user->nick);
+ 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_SUCCESS;
+ return CMD_LOCALONLY;
}
};
class ModuleSetIdle : public Module
{
}
};
class ModuleSetIdle : public Module
{
- cmd_setidle* mycommand;
+ CommandSetidle* mycommand;
public:
ModuleSetIdle(InspIRCd* Me)
public:
ModuleSetIdle(InspIRCd* Me)
- : Module::Module(Me)
+ : Module(Me)
{
{
-
- mycommand = new cmd_setidle(ServerInstance);
+
+ mycommand = new CommandSetidle(ServerInstance);
ServerInstance->AddCommand(mycommand);
ServerInstance->AddCommand(mycommand);
+
}
}
-
+
virtual ~ModuleSetIdle()
{
}
virtual ~ModuleSetIdle()
{
}
-
- virtual Version GetVersion()
- {
- return Version(1,0,0,1,VF_VENDOR);
- }
-
-};
-
-// stuff down here is the module-factory stuff. For basic modules you can ignore this.
-class ModuleSetIdleFactory : public ModuleFactory