From: Marius Gavrilescu Date: Mon, 25 Mar 2013 07:46:59 +0000 (+0200) Subject: Fix the notify command help X-Git-Tag: 0.000_001~43 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=02c042b0f3567b750a976368e398a4c0a3650d98;p=fonbot.git Fix the notify command help The notify command now has help text and it no longer fails when calling it with a wrong number of arguments --- diff --git a/res/values/strings.xml b/res/values/strings.xml index bdc90a6..7d76dc7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -443,6 +443,11 @@ The help command can be used to get a list of commands and help for them. Exampl Could not parse id Notification canceled Notification shown - Notify help + + Usage: notify id [title text]\n + With three arguments, shows a notification with title <title> and text <text> and id <id>. This replaces any previous notiifcation with the same id.\n + With one argument, removes the notification with id <id>\n + Example: notify 10 Hello \"Hello, world!\" + User or password not set \ No newline at end of file diff --git a/src/ro/ieval/fonbot/Utils.java b/src/ro/ieval/fonbot/Utils.java index f06c43a..5fd9410 100644 --- a/src/ro/ieval/fonbot/Utils.java +++ b/src/ro/ieval/fonbot/Utils.java @@ -1010,6 +1010,7 @@ public final class Utils { case NOTIFY: if(args.length!=1 && args.length!=3){ Heavy.help(context, replyTo, toNonNull(Command.NOTIFY)); + return; } final int id;