return in_map && time.Now().Unix() - authtime < botdata.auth_timeout_
}
-const help_text_ string = "\n*auth*<password>* ...enables you to use more commands\n*time* ...gives bot time"
-const help_text_auth string = "You are authorized to use the following commands\n*on* ...you will be notified of r3 status changes\n*off* ...you will no longer recieve notifications\n*on_while_offline* ...you will be notified of r3 status changes even if you are offline\n*status* ...query current status\n*time* ...gives bot time\n*bye* ...logout"
+const help_text_ string = "\n*auth*<password>* ...Enables you to use more commands.\n*time* ...Returns bot time."
+const help_text_auth string = "You are authorized to use the following commands:\n*on* ...You will be notified of r3 status changes.\n*off* ...You will no longer recieve notifications.\n*on_while_offline* ...You will be notified of r3 status changes even if you are offline.\n*status* ...Query current status.\n*time* ...Returns bot time.\n*bye* ...Logout."
//~ var re_msg_auth_ *regexp.Regexp = regexp.MustCompile("auth\s+(\S+)")
case botdata.auth_cmd_, botdata.auth_cmd2_:
botdata.jid_lastauthtime_[inmsg.GetHeader().From] = time.Now().Unix()
xmppout <- botdata.makeXMPPMessage(inmsg.GetHeader().From, help_text_auth, nil)
- case "status", "*status*":
+ case "status", "*status*", "off", "*off*", "on", "*on*", "on_while_offline", "*on_while_offline*":
xmppout <- botdata.makeXMPPMessage(inmsg.GetHeader().From, "Sorry, you need to be authorized to do that." , nil)
case "time", "*time*":
xmppout <- botdata.makeXMPPMessage(inmsg.GetHeader().From, time.Now().String() , nil)