# HG changeset patch # User jilles@cheetah.stack.nl # Date 1155438830 -7200 # Node ID 57ba93af7982e7151f44e891b4811a40f9c46106 # Parent 244e572fe7bebd37ad9f60dd826f1370db697dff remove logic to consider the entire split over when one nick rejoins old code caused all split nicks with the same servers to be removed after 1 minute if one with the correct nick!user@host rejoined. diff -r 244e572fe7be -r 57ba93af7982 src/irc/core/netsplit.c --- a/src/irc/core/netsplit.c Sun Aug 13 04:17:53 2006 +0200 +++ b/src/irc/core/netsplit.c Sun Aug 13 05:13:50 2006 +0200 @@ -297,36 +297,6 @@ int quitmsg_is_split(const char *msg) return TRUE; } -static void split_set_timeout(void *key, NETSPLIT_REC *rec, NETSPLIT_REC *orig) -{ - /* same servers -> split over -> destroy old records sooner.. */ - if (rec->server == orig->server) - rec->destroy = time(NULL)+60; -} - -static void event_join(IRC_SERVER_REC *server, const char *data, - const char *nick, const char *address) -{ - NETSPLIT_REC *rec; - - if (nick == NULL) - return; - - /* check if split is over */ - rec = g_hash_table_lookup(server->splits, nick); - - if (rec != NULL && g_strcasecmp(rec->address, address) == 0) { - /* yep, looks like it is. for same people that had the same - splitted servers set the timeout to one minute. - - .. if the user just changed server, she can't use the - same nick (unless the server is broken) so don't bother - checking that the nick's server matches the split. */ - g_hash_table_foreach(server->splits, - (GHFunc) split_set_timeout, rec); - } -} - /* remove the nick from netsplit, but do it last so that other "event join" signal handlers can check if the join was a netjoin */ static void event_join_last(IRC_SERVER_REC *server, const char *data, @@ -419,7 +389,6 @@ void netsplit_init(void) void netsplit_init(void) { split_tag = g_timeout_add(1000, (GSourceFunc) split_check_old, NULL); - signal_add_first("event join", (SIGNAL_FUNC) event_join); signal_add_last("event join", (SIGNAL_FUNC) event_join_last); signal_add_first("event quit", (SIGNAL_FUNC) event_quit); signal_add("event nick", (SIGNAL_FUNC) event_nick); @@ -429,7 +398,6 @@ void netsplit_deinit(void) void netsplit_deinit(void) { g_source_remove(split_tag); - signal_remove("event join", (SIGNAL_FUNC) event_join); signal_remove("event join", (SIGNAL_FUNC) event_join_last); signal_remove("event quit", (SIGNAL_FUNC) event_quit); signal_remove("event nick", (SIGNAL_FUNC) event_nick);