plugins/groupchat.lua

changeset 101
7d75d7f9d5ae
parent 67
12e2c702eddc
child 136
e36f5d359aa5
equal deleted inserted replaced
100:f90ead53573a 101:7d75d7f9d5ae
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 reply:sub(1,4) ~= "/me " and event.sender and r.attr.type == "groupchat" 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.reply_to or 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);
56 return room; 56 return room;

mercurial