Sat, 22 Jan 2011 17:12:20 +0000
plugin.commands: Fire unhandled-command event
plugins/commands.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/commands.lua Tue Jan 11 23:35:42 2011 +0100 +++ b/plugins/commands.lua Sat Jan 22 17:12:20 2011 +0000 @@ -33,6 +33,9 @@ room = event.room, -- groupchat support }; local ret = bot:event("commands/"..command, command_event); + if ret == nil then + ret = bot:event("unhandled-command", command_event); + end if type(ret) == "string" then event:reply(ret); end