plugins.groupchat: Allow prefixes on replies to be overriden

Sat, 25 May 2013 21:35:27 +0200

author
Kim Alvefur <zash@zash.se>
date
Sat, 25 May 2013 21:35:27 +0200
changeset 101
7d75d7f9d5ae
parent 100
f90ead53573a
child 102
b7c9a3707e68

plugins.groupchat: Allow prefixes on replies to be overriden

plugins/groupchat.lua file | annotate | diff | comparison | revisions
--- a/plugins/groupchat.lua	Tue Apr 30 18:19:00 2013 +0200
+++ b/plugins/groupchat.lua	Sat May 25 21:35:27 2013 +0200
@@ -48,7 +48,7 @@
 				if replied then return false; end
 				replied = true;
 				if reply:sub(1,4) ~= "/me " and event.sender and r.attr.type == "groupchat" then
-					reply = event.sender.nick..": "..reply;
+					reply = (event.reply_to or event.sender.nick)..": "..reply;
 				end
 				room:send(r:tag("body"):text(reply));
 			end

mercurial