Mon, 21 Dec 2009 19:27:08 +0000
Initial commit, hello world!
0 | 1 | |
2 | function riddim.plugins.ping(bot) | |
3 | bot.stream:add_plugin("ping"); | |
4 | bot:hook("commands/ping", function (command) | |
5 | local jid = command.param; | |
6 | if jid then | |
7 | bot.stream:ping(jid, function (time) | |
8 | command:reply(string.format("Pong from %s in %0.3f seconds", jid, time)); | |
9 | end); | |
10 | return true; | |
11 | end | |
12 | return "pong"; | |
13 | end); | |
14 | end |