aboutsummaryrefslogtreecommitdiffstats
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
authorGravatar brain2005-12-29 21:57:34 +0000
committerGravatar brain2005-12-29 21:57:34 +0000
commitdf06ab6044b8a5c7e60220121252cf681733b846 (patch)
tree1375ea465ad0f947d738edc4078957645ae05dfa /src/inspircd.cpp
parentAdded output of error if file descriptor given to AddFd is > MAX_DESCRIPTORS (diff)
downloadinspircd++-df06ab6044b8a5c7e60220121252cf681733b846.tar.gz
inspircd++-df06ab6044b8a5c7e60220121252cf681733b846.tar.bz2
inspircd++-df06ab6044b8a5c7e60220121252cf681733b846.zip
Cached ISUPPORT
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2702 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp12
1 files changed, 12 insertions, 0 deletions
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;
}