summary refs log tree commit diff stats
path: root/src/common/proto-irc.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2014-04-06 15:22:51 -0400
committerTingPing <tingping@tingping.se>2014-04-06 15:33:22 -0400
commitb41bd594b0324c4aa0d02ec35ad1efdcf2d4f6db (patch)
tree41a0e185a4d730f4100ffeb979bd4d4f28172b9f /src/common/proto-irc.c
parent0f828dd74f9ea81fe70c8a101a7aa7c40737437a (diff)
Add account to Join event
Also reorganizes some logic. The account will usually be NULL unless
extended-join capability enabled.

Closes #934
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r--src/common/proto-irc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 8f31d5c1..fa5446c4 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1042,8 +1042,12 @@ process_named_msg (session *sess, char *type, char *word[], char *word_eol[],
 			{
 				char *chan = word[3];
 				char *account = word[4];
-				char *realname = word_eol[5] + 1;
+				char *realname = word_eol[5];
 
+				if (account && strcmp (account, "*") == 0)
+					account = NULL;
+				if (realname && *realname == ':')
+					realname++;
 				if (*chan == ':')
 					chan++;
 				if (!serv->p_cmp (nick, serv->nick))