X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=87da59b5736edbc7b11387692932c217cd14df7d;hb=dada179fb63917ced15976da5e83c7c6ddc65f2f;hp=f47cc339b27af9c1e711692929d46c17f9dc4661;hpb=2d821f2980825be73e3f90b47ffff365b0ec5ecb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index f47cc339b..87da59b57 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1557,8 +1557,6 @@ void FullConnectUser(userrec* user) } } - // fix by brain: move this below the xline checks to prevent spurious quits going onto the net that dont belong - user->registered = 7; WriteServ(user->fd,"NOTICE Auth :Welcome to \002%s\002!",Network); WriteServ(user->fd,"001 %s :Welcome to the %s IRC Network %s!%s@%s",user->nick,Network,user->nick,user->ident,user->host); @@ -1593,9 +1591,11 @@ void FullConnectUser(userrec* user) } ShowMOTD(user); - // fix by brain: these should be AFTER the N token, so other servers know what the HELL we're on about... :) + // fix 3 by brain, move registered = 7 below these so that spurious modes and host changes dont go out + // onto the network and produce 'fake direction' FOREACH_MOD OnUserConnect(user); FOREACH_MOD OnGlobalConnect(user); + user->registered = 7; WriteOpers("*** Client connecting on port %lu: %s!%s@%s [%s]",(unsigned long)user->port,user->nick,user->ident,user->host,user->ip); } @@ -2184,6 +2184,15 @@ bool UnloadModule(const char* filename) snprintf(MODERR,MAXBUF,"Module not unloadable (marked static)"); return false; } + /* Give the module a chance to tidy out all its metadata */ + for (chan_hash::iterator c = chanlist.begin(); c != chanlist.end(); c++) + { + modules[j]->OnCleanup(TYPE_CHANNEL,c->second); + } + for (user_hash::iterator u = clientlist.begin(); u != clientlist.end(); u++) + { + modules[j]->OnCleanup(TYPE_USER,u->second); + } FOREACH_MOD OnUnloadModule(modules[j],module_names[j]); // found the module log(DEBUG,"Deleting module...");