From: Bernhard Tittelbach Date: Sun, 25 Aug 2013 13:07:52 +0000 (+0000) Subject: more cosmetic changes X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=098333f9a1d3fa389378a212dea39cf48030cd91;p=svn42.git more cosmetic changes --- diff --git a/r3-netstatus/r3xmppbot/r3xmppbot.go b/r3-netstatus/r3xmppbot/r3xmppbot.go index 1be12f8..1a2d9f0 100644 --- a/r3-netstatus/r3xmppbot/r3xmppbot.go +++ b/r3-netstatus/r3xmppbot/r3xmppbot.go @@ -247,8 +247,8 @@ func (botdata *XmppBot) isAuthenticated(jid string) bool { return in_map && time.Now().Unix() - authtime < botdata.auth_timeout_ } -const help_text_ string = "\n*auth** ...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** ...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+)") @@ -292,7 +292,7 @@ func (botdata *XmppBot) handleIncomingMessageDialog(inmsg xmpp.Message, xmppout 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)