plugins/groupchat.lua

changeset 67
12e2c702eddc
parent 60
87ecc6324155
child 101
7d75d7f9d5ae
equal deleted inserted replaced
66:bdaf81ab55ad 67:12e2c702eddc
45 end 45 end
46 function event:reply(reply) 46 function event:reply(reply)
47 if not reply then reply = "Nothing to say to you"; end 47 if not reply then reply = "Nothing to say to you"; end
48 if replied then return false; end 48 if replied then return false; end
49 replied = true; 49 replied = true;
50 if r.attr.type == "groupchat" and reply:sub(1,4) ~= "/me " then 50 if reply:sub(1,4) ~= "/me " and event.sender and r.attr.type == "groupchat" then
51 reply = event.sender.nick..": "..reply; 51 reply = event.sender.nick..": "..reply;
52 end 52 end
53 room:send(r:tag("body"):text(reply)); 53 room:send(r:tag("body"):text(reply));
54 end 54 end
55 end, 500); 55 end, 500);

mercurial