X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=ee30ba4e9e9c7951f469ba22a3227b7a0868f00a;hb=59b1a8955142935b02af6446005ab47fc7c3fc8c;hp=de9f6478111dd85db399c416a41aea2faa32040d;hpb=2a9b0cdd30113ab4926f4b68350d619c015c89a3;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index de9f64781..ee30ba4e9 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -386,7 +386,7 @@ void InspIRCd::BuildISupport() { // the neatest way to construct the initial 005 numeric, considering the number of configure constants to go in it... std::stringstream v; - v << "WALLCHOPS WALLVOICES MODES=" << MAXMODES << " CHANTYPES=# PREFIX=(ohv)@%+ MAP SAFELIST MAXCHANNELS=" << MAXCHANS << " MAXBANS=60 VBANLIST NICKLEN=" << NICKMAX-1; + v << "WALLCHOPS WALLVOICES MODES=" << MAXMODES << " CHANTYPES=# PREFIX=(ohv)@%+ MAP MAXCHANNELS=" << MAXCHANS << " MAXBANS=60 VBANLIST NICKLEN=" << NICKMAX-1; v << " CASEMAPPING=rfc1459 STATUSMSG=@%+ CHARSET=ascii TOPICLEN=" << MAXTOPIC << " KICKLEN=" << MAXKICK << " MAXTARGETS=" << Config->MaxTargets << " AWAYLEN="; v << MAXAWAY << " CHANMODES=b,k,l,psmnti FNC NETWORK=" << Config->Network << " MAXPARA=32"; Config->data005 = v.str(); @@ -524,10 +524,11 @@ bool InspIRCd::LoadModule(const char* filename) return false; } } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEFAULT,"Unable to load %s: ",modfile,modexcept.GetReason()); snprintf(MODERR,MAXBUF,"Factory function threw an exception: %s",modexcept.GetReason()); + return false; } #ifndef STATIC_LINK } @@ -636,14 +637,15 @@ int InspIRCd::Run() * timing using this event, so we dont have to * time this exactly). */ - if (((TIME % 8) == 0) && (!expire_run)) + if (((TIME % 5) == 0) && (!expire_run)) { expire_lines(); FOREACH_MOD(I_OnBackgroundTimer,OnBackgroundTimer(TIME)); + TickMissedTimers(TIME); expire_run = true; continue; } - else if ((TIME % 8) == 1) + else if ((TIME % 5) == 1) { expire_run = false; } @@ -654,6 +656,10 @@ int InspIRCd::Run() if (TIME < OLDTIME) WriteOpers("*** \002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %d secs.",abs(OLDTIME-TIME)); DoBackgroundUserStuff(TIME); + + /* + * Trigger all InspTimers that are pending + */ } /* Process timeouts on module sockets each time around @@ -663,6 +669,8 @@ int InspIRCd::Run() */ DoSocketTimeouts(TIME); + TickTimers(TIME); + /* Call the socket engine to wait on the active * file descriptors. The socket engine has everything's * descriptors in its list... dns, modules, users, @@ -754,7 +762,7 @@ int InspIRCd::Run() { Config->GetIOHook(in_port)->OnRawSocketAccept(incomingSockfd, (char*)inet_ntoa(client.sin_addr), in_port); } - catch (ModuleException modexcept) + catch (ModuleException& modexcept) { log(DEBUG,"Module exception cought: %s",modexcept.GetReason()); \ }