From eeb7c9c36d4346ebbbb409d96abb1fa4504914fd Mon Sep 17 00:00:00 2001 From: rburchell Date: Sat, 8 Aug 2009 16:39:51 +0000 Subject: [PATCH] Also make use of synched state to introduce pseudoclients instead of blindly introducing them on connect. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2443 5417fbe8-f217-4b02-8779-1006273d7864 --- src/init.c | 11 ----------- src/servers.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/init.c b/src/init.c index 8931fd6f4..4c87ae5c4 100644 --- a/src/init.c +++ b/src/init.c @@ -642,17 +642,6 @@ int init_secondary(int ac, char **av) strerror(openlog_errno)); } - /* Bring in our pseudo-clients */ - introduce_user(NULL); - - /* And hybrid needs Global joined in the logchan */ - if (logchan && ircd->join2msg) { - /* XXX might desync */ - ircdproto->SendJoin(findbot(s_GlobalNoticer), LogChannel, time(NULL)); - } - - ircdproto->SendEOB(); - /* Success! */ return 0; } diff --git a/src/servers.c b/src/servers.c index b820b22e9..037ad2ea1 100644 --- a/src/servers.c +++ b/src/servers.c @@ -587,7 +587,23 @@ void finish_sync(Server * serv, int sync_links) } } while (s); + if (serv == serv_uplink) + { + /* Bring in our pseudo-clients */ + introduce_user(NULL); + + /* And hybrid needs Global joined in the logchan */ + if (logchan && ircd->join2msg) { + /* XXX might desync */ + ircdproto->SendJoin(findbot(s_GlobalNoticer), LogChannel, time(NULL)); + } + + ircdproto->SendEOB(); + } + /* Do some general stuff which should only be done once */ + // XXX: this doesn't actually match the description. finish_sync(), depending on the ircd, can be called multiple times + // Perhaps this belongs in the above if? restore_unsynced_topics(); alog("Server %s is done syncing", serv->name); }