From 8a01e21a489d8d2515679eaf6de9da20431953e9 Mon Sep 17 00:00:00 2001 From: rburchell Date: Tue, 31 Mar 2009 14:44:33 +0000 Subject: Send snotice after connecting to the network. Also change OnServerConnect to take Server*, not a name. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2227 5417fbe8-f217-4b02-8779-1006273d7864 --- src/servers.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/servers.c') diff --git a/src/servers.c b/src/servers.c index e66c5be98..073891fad 100644 --- a/src/servers.c +++ b/src/servers.c @@ -161,10 +161,6 @@ Server *new_server(Server * server_uplink, const char *name, const char *desc, if ((server_uplink == me_server) && !(flags & SERVER_JUPED)) serv_uplink = serv; - /* Write the StartGlobal (to non-juped servers) */ - if (GlobalOnCycle && GlobalOnCycleUP && !(flags & SERVER_JUPED)) - notice_server(s_GlobalNoticer, serv, "%s", GlobalOnCycleUP); - return serv; } @@ -402,8 +398,15 @@ void do_server(const char *source, const char *servername, const char *hops, if (s == NULL) throw CoreException("Recieved a server from a nonexistant uplink?"); + /* Create a server structure. */ new_server(s, servername, descript, 0, numeric); - FOREACH_MOD(I_OnServerConnect, OnServerConnect(servername)); + + /* Announce services being online. */ + if (GlobalOnCycle && GlobalOnCycleUP) + notice_server(s_GlobalNoticer, serv, "%s", GlobalOnCycleUP); + + /* Let modules know about the connection */ + FOREACH_MOD(I_OnServerConnect, OnServerConnect(s)); } /*************************************************************************/ -- cgit