- return Version(1,0,0,1,VF_VENDOR);
+ time_t idle = ServerInstance->Duration(parameters[0]);
+ if (idle < 1)
+ {
+ user->WriteNumeric(948, "%s :Invalid idle time.",user->nick.c_str());
+ return CMD_FAILURE;
+ }
+ user->idle_lastmsg = (ServerInstance->Time() - idle);
+ // 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");
+ user->WriteNumeric(944, "%s :Idle time set.",user->nick.c_str());
+
+ return CMD_LOCALONLY;