# HG changeset patch # User Mikael Berthe # Date 1271541921 -7200 # Node ID 50aa4b0d63c1efb6d6b5dfdf78a2156e27e54c61 # Parent 96bce644394a1bdd7fef37a230c48dd51036e614 Update misc commands diff -r 96bce644394a -r 50aa4b0d63c1 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