From e316475afd4e77e6507c662ee272e5ed07893f85 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 19 Sep 2000 21:14:35 +0000 Subject: [PATCH] Netsplit fixes git-svn-id: http://svn.irssi.org/repos/irssi/trunk@663 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/irc/fe-netjoin.c | 2 +- src/irc/core/netsplit.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c index ffbd817b..3eb49a9e 100644 --- a/src/fe-common/irc/fe-netjoin.c +++ b/src/fe-common/irc/fe-netjoin.c @@ -355,7 +355,7 @@ static void event_mode(const char *data, IRC_SERVER_REC *server, if (*mode == 'o' && *nick != NULL) { /* give/remove ops */ rec = netjoin_find(server, *nick); - if (rec != NULL && !netjoin_set_operator(rec, channel, type == '+')) + if (rec == NULL || !netjoin_set_operator(rec, channel, type == '+')) show = TRUE; nick++; } else { diff --git a/src/irc/core/netsplit.c b/src/irc/core/netsplit.c index 2831ec3a..4c821a9a 100644 --- a/src/irc/core/netsplit.c +++ b/src/irc/core/netsplit.c @@ -121,6 +121,9 @@ static NETSPLIT_REC *netsplit_add(IRC_SERVER_REC *server, const char *nick, cons rec->channels = g_slist_append(rec->channels, splitchan); } + if (rec->channels == NULL) + g_warning("netsplit_add(): channels == NULL ??"); + g_hash_table_insert(server->splits, rec->nick, rec); signal_emit("netsplit add", 1, rec);