plugins.groupchat: Don't prepend replies with the senders nickname if it's an action

Mon, 21 Feb 2011 01:22:08 +0100

author
Kim Alvefur <zash@zash.se>
date
Mon, 21 Feb 2011 01:22:08 +0100
changeset 60
87ecc6324155
parent 59
dcb0eb6c32b6
child 61
aca019044c51

plugins.groupchat: Don't prepend replies with the senders nickname if it's an action

plugins/groupchat.lua file | annotate | diff | comparison | revisions
--- a/plugins/groupchat.lua	Mon Feb 21 01:05:48 2011 +0100
+++ b/plugins/groupchat.lua	Mon Feb 21 01:22:08 2011 +0100
@@ -47,7 +47,7 @@
 				if not reply then reply = "Nothing to say to you"; end
 				if replied then return false; end
 				replied = true;
-				if r.attr.type == "groupchat" then
+				if r.attr.type == "groupchat" and reply:sub(1,4) ~= "/me " then
 					reply = event.sender.nick..": "..reply;
 				end
 				room:send(r:tag("body"):text(reply));

mercurial