summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@irssi.org>2011-05-15 21:13:12 +0000
committerjilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564>2011-05-15 21:13:12 +0000
commitcbd163aa5a8b0c3fad97fc07a0524307ce98e31e (patch)
tree24f0e6c5fc624eb2894cc445904ba24fe234aac5
parentf3419c39369c432066074456ed0c0ed312a39e22 (diff)
downloadirssi-cbd163aa5a8b0c3fad97fc07a0524307ce98e31e.zip
Accept names replies with nick!user@host instead of nick
if they are somehow enabled (UHNAMES/userhost-in-names). bug #805 git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5205 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/irc/core/irc-nicklist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index f16bd870..8a9ab1ec 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -103,7 +103,7 @@ static void event_names_list(IRC_SERVER_REC *server, const char *data)
{
IRC_CHANNEL_REC *chanrec;
NICK_REC *rec;
- char *params, *type, *channel, *names, *ptr;
+ char *params, *type, *channel, *names, *ptr, *host;
int op, halfop, voice;
char prefixes[MAX_USER_PREFIXES+1];
@@ -162,9 +162,15 @@ static void event_names_list(IRC_SERVER_REC *server, const char *data)
ptr++;
}
+ host = strchr(ptr, '!');
+ if (host != NULL)
+ *host++ = '\0';
+
if (nicklist_find((CHANNEL_REC *) chanrec, ptr) == NULL) {
rec = irc_nicklist_insert(chanrec, ptr, op, halfop,
voice, FALSE, prefixes);
+ if (host != NULL)
+ nicklist_set_host(CHANNEL(chanrec), rec, host);
}
}