]> iEval git - fonbot.git/commitdiff
Fix the notify command help
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 25 Mar 2013 07:46:59 +0000 (09:46 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 25 Mar 2013 07:46:59 +0000 (09:46 +0200)
The notify command now has help text and it no longer fails when calling it with a wrong number of arguments

res/values/strings.xml
src/ro/ieval/fonbot/Utils.java

index bdc90a66d6d7eb490ceb917cb2ba9556db5b0ca2..7d76dc7dc71fe04f5ee0f20402bb741da0d3b74b 100644 (file)
@@ -443,6 +443,11 @@ The help command can be used to get a list of commands and help for them. Exampl
     <string name="could_not_parse_id">Could not parse id</string>
     <string name="notification_canceled">Notification canceled</string>
     <string name="notification_shown">Notification shown</string>
-    <string name="notify_help">Notify help</string>
+    <string name="notify_help">
+        Usage: notify id [title text]\n
+        With three arguments, shows a notification with title &lt;title&gt; and text &lt;text&gt; and id &lt;id&gt;. This replaces any previous notiifcation with the same id.\n
+        With one argument, removes the notification with id &lt;id&gt;\n
+        Example: notify 10 Hello \"Hello, world!\"
+        </string>
     <string name="user_or_password_not_set">User or password not set</string>
 </resources>
\ No newline at end of file
index f06c43acc6813e0003796a472080e37d2bc7251b..5fd941048c8595e2c9783dab2d78ec1ae0070959 100644 (file)
@@ -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;
This page took 0.031145 seconds and 4 git commands to generate.