From: rubin Date: Thu, 5 May 2005 03:19:09 +0000 (+0000) Subject: arch sync X-Git-Tag: 1.9~657 X-Git-Url: https://jfr.im/git/irc/evilnet/x3.git/commitdiff_plain/02c372491036789f8aec4a62cf7d58d1f64655fa?hp=a03d6c7774071be6d38ad741b13f970d5fda4dc7 arch sync --- diff --git a/ChangeLog.X3 b/ChangeLog.X3 index ad01b44..9bd6c60 100644 --- a/ChangeLog.X3 +++ b/ChangeLog.X3 @@ -14,7 +14,9 @@ * src/hash.h: adduser pending, and increased maxbans to 128 from 45. - * src/nickserv.c: adduser pending cleanup and activation code + * src/nickserv.c: adduser pending cleanup and activation code, + Arch sync (Avoid losing channel information when + replacing an account using the mergedb command.) * src/proto-p10.c: adduser pending cleanup code diff --git a/src/nickserv.c b/src/nickserv.c index 9882dab..4e01164 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -3436,6 +3436,7 @@ nickserv_db_read_handle(const char *handle, dict_t obj) struct string_list *masks, *slist; struct handle_info *hi; struct userNode *authed_users; + struct userData *channels; unsigned long int id; unsigned int ii; dict_t subdb; @@ -3449,10 +3450,13 @@ nickserv_db_read_handle(const char *handle, dict_t obj) } if ((hi = get_handle_info(handle))) { authed_users = hi->users; + channels = hi->channels; hi->users = NULL; + hi->channels = NULL; dict_remove(nickserv_handle_dict, hi->handle); } else { authed_users = NULL; + channels = NULL; } hi = register_handle(handle, str, id); if (authed_users) { @@ -3462,6 +3466,7 @@ nickserv_db_read_handle(const char *handle, dict_t obj) authed_users = authed_users->next_authed; } } + hi->channels = channels; masks = database_get_data(obj, KEY_MASKS, RECDB_STRING_LIST); hi->masks = masks ? string_list_copy(masks) : alloc_string_list(1); str = database_get_data(obj, KEY_MAXLOGINS, RECDB_QSTRING);