Update misc commands
authorMikael Berthe <mikael@lilotux.net>
Sun, 18 Apr 2010 00:05:21 +0200
changeset 33 50aa4b0d63c1
parent 32 96bce644394a
child 34 ca01a1696cff
Update misc commands
mcbot/cmds/misc.lua
--- a/mcbot/cmds/misc.lua	Sat Apr 17 23:55:11 2010 +0200
+++ b/mcbot/cmds/misc.lua	Sun Apr 18 00:05:21 2010 +0200
@@ -8,15 +8,18 @@
 
 
 local thanks = { ["hidden"] = true,
-                 ["cmd"] = function (args) return "You're welcome" end
+                 ["aliases"] = { "thx", "thank" },
                }
+function thanks.cmd (args, botdata, cmd)
+    return "You're welcome"
+end
 
 mcbot_register_command("thanks", thanks)
 
 
 local ping = {}
 ping.aliases = { "ding" }
-ping.cmd = function (args, botdata, cmd)
+function ping.cmd (args, botdata, cmd)
     if cmd:lower() == "ding" then return "dong" end
     return "pong"
 end