# HG changeset patch # User Matthew Wild # Date 1295716340 0 # Node ID 3e5b57d44fa097dacf1bbe9dbb12d5ca7fc2d434 # Parent 766f4225110bf115e98d098fd9da1b5749549058 plugin.commands: Fire unhandled-command event diff -r 766f4225110b -r 3e5b57d44fa0 plugins/commands.lua --- 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