31 stanza = event.stanza, |
31 stanza = event.stanza, |
32 reply = event.reply, |
32 reply = event.reply, |
33 room = event.room, -- groupchat support |
33 room = event.room, -- groupchat support |
34 }; |
34 }; |
35 local ret = bot:event("commands/"..command, command_event); |
35 local ret = bot:event("commands/"..command, command_event); |
|
36 if ret == nil then |
|
37 ret = bot:event("unhandled-command", command_event); |
|
38 end |
36 if type(ret) == "string" then |
39 if type(ret) == "string" then |
37 event:reply(ret); |
40 event:reply(ret); |
38 end |
41 end |
39 return ret; |
42 return ret; |
40 end |
43 end |