summaryrefslogtreecommitdiff
path: root/src/irc/core
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@irssi.org>2007-10-16 17:20:12 +0000
committerjilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564>2007-10-16 17:20:12 +0000
commit94c6e008adcbb26e1b6c8a142f5e3d13ebfa5ad0 (patch)
tree86882795c4b499213698ccb05adc54b3c6d0ac92 /src/irc/core
parent2aa6b6bf059f3464fc368a16d51df63f9741c395 (diff)
downloadirssi-94c6e008adcbb26e1b6c8a142f5e3d13ebfa5ad0.zip
Update oper status from userhost reply.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4622 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core')
-rw-r--r--src/irc/core/irc-nicklist.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c
index b60056a8..7d97196f 100644
--- a/src/irc/core/irc-nicklist.c
+++ b/src/irc/core/irc-nicklist.c
@@ -409,6 +409,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data,
static void event_userhost(SERVER_REC *server, const char *data)
{
char *params, *hosts, **phosts, **pos, *ptr;
+ int oper;
g_return_if_fail(data != NULL);
@@ -418,10 +419,15 @@ static void event_userhost(SERVER_REC *server, const char *data)
phosts = g_strsplit(hosts, " ", -1);
for (pos = phosts; *pos != NULL; pos++) {
ptr = strchr(*pos, '=');
- if (ptr == NULL) continue;
+ if (ptr == NULL || ptr == *pos) continue;
+ if (ptr[-1] == '*') {
+ ptr[-1] = '\0';
+ oper = 1;
+ } else
+ oper = 0;
*ptr++ = '\0';
- nicklist_update_flags(server, *pos, *ptr == '-', -1);
+ nicklist_update_flags(server, *pos, *ptr == '-', oper);
}
g_strfreev(phosts);
g_free(params);