plugins/tell.lua

changeset 12
d7ce8ba2c462
parent 10
77753bce939a
child 13
ff9790b827b7
equal deleted inserted replaced
11:7bb53dcf93d4 12:d7ce8ba2c462
19 if not found then 19 if not found then
20 if(tellings[nick] == nil) then 20 if(tellings[nick] == nil) then
21 tellings[nick] = {}; 21 tellings[nick] = {};
22 end 22 end
23 tellings[nick][#tellings[nick] + 1] = {from=command.sender.nick, msg=msg}; 23 tellings[nick][#tellings[nick] + 1] = {from=command.sender.nick, msg=msg};
24 return "Ok! Will tell " .. nick .. " what you have said!"; 24 return "Ok!";
25 else 25 else
26 if nick == command.sender.nick then 26 if nick == command.sender.nick then
27 return "Are you going crazy!? You are " .. nick .. "!"; 27 return "Tell yourself.";
28 else 28 else
29 return "Aehm?! ... " .. nick .. " is currently online!"; 29 return "" .. nick .. " is currently online!";
30 end 30 end
31 end 31 end
32 else 32 else
33 return "Sorry, but this command only makes sense if you execute it in a groupchat."; 33 return "This command is only available in groupchats.";
34 end 34 end
35 end); 35 end);
36 36
37 bot:hook("groupchat/joined", function (room) 37 bot:hook("groupchat/joined", function (room)
38 room:hook("occupant-joined", function (occupant) 38 room:hook("occupant-joined", function (occupant)

mercurial