From df06ab6044b8a5c7e60220121252cf681733b846 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 29 Dec 2005 21:57:34 +0000 Subject: Cached ISUPPORT git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2702 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index dc3c777fe..ed1c8fda8 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -276,6 +276,16 @@ void InspIRCd::erase_module(int j) } +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 MODES=13 CHANTYPES=# PREFIX=(ohv)@%+ MAP SAFELIST MAXCHANNELS=" << MAXCHANS << " MAXBANS=60 NICKLEN=" << NICKMAX; + v << " TOPICLEN=" << MAXTOPIC << " KICKLEN=" << MAXKICK << " MAXTARGETS=20 AWAYLEN=" << MAXAWAY << " CHANMODES=ohvb,k,l,psmnti NETWORK=" << Config->Network; + Config->data005 = v.str(); + FOREACH_MOD(I_On005Numeric,On005Numeric(Config->data005)); +} + bool InspIRCd::UnloadModule(const char* filename) { std::string filename_str = filename; @@ -314,6 +324,7 @@ bool InspIRCd::UnloadModule(const char* filename) Parser->RemoveCommands(filename); log(DEFAULT,"Module %s unloaded",filename); MODCOUNT--; + BuildISupport(); return true; } } @@ -402,6 +413,7 @@ bool InspIRCd::LoadModule(const char* filename) #endif MODCOUNT++; FOREACH_MOD(I_OnLoadModule,OnLoadModule(modules[MODCOUNT],filename_str)); + BuildISupport(); return true; } -- cgit v1.3.1-10-gc9f91