summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 15:33:48 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 15:33:48 +0000
commit7577c2376c09d9214645cefb2f87c054b79a0b1e (patch)
tree54e927f5f6f5c857941135dcfe00150017d65f20
parent7666e1ad84728767aa47dafc4ffdf82bbbd9aa6e (diff)
Initialize mode handlers and watchers to 0 in the constructor, or mucho pain can ensue
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4130 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/mode.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 0a490f92e..7575e2b0e 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -676,6 +676,10 @@ bool ModeParser::AddMode(ModeHandler* mh, unsigned const char modeletter)
ModeParser::ModeParser()
{
+ /* Clear mode list */
+ memset(modehandlers, 0, sizeof(modehandlers));
+ memset(modewatchers, 0, sizeof(modewatchers));
+
/* Initialise the RFC mode letters */
this->AddMode(new ModeChannelSecret, 's');
this->AddMode(new ModeChannelPrivate, 'p');