From 7577c2376c09d9214645cefb2f87c054b79a0b1e Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 7 Jul 2006 15:33:48 +0000 Subject: 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 --- src/mode.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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'); -- cgit v1.2.3