summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1ea2fca)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11614
e03df62e-2008-0410-955e-
edbf42e46eb7
/** The constructor initializes all the RFC basic modes by using ModeParserAddMode().
*/
ModeParser(InspIRCd* Instance);
/** The constructor initializes all the RFC basic modes by using ModeParserAddMode().
*/
ModeParser(InspIRCd* Instance);
/** Used to check if user 'd' should be allowed to do operation 'MASK' on channel 'chan'.
* for example, should 'user A' be able to 'op' on 'channel B'.
/** Used to check if user 'd' should be allowed to do operation 'MASK' on channel 'chan'.
* for example, should 'user A' be able to 'op' on 'channel B'.
delete i->second;
}
clientlist->clear();
delete i->second;
}
clientlist->clear();
+ delete clientlist;
+ delete uuidlist;
}
/** Client list, a hash_map containing all clients, local and remote
}
/** Client list, a hash_map containing all clients, local and remote
"CreateEvent failed" /* 19 */
};
"CreateEvent failed" /* 19 */
};
-template<typename T> static void DeleteZero(T* n)
+template<typename T> static void DeleteZero(T*&n)
new ModeChannelPrivate(Instance),
new ModeChannelModerated(Instance),
new ModeChannelTopicOps(Instance),
new ModeChannelPrivate(Instance),
new ModeChannelModerated(Instance),
new ModeChannelTopicOps(Instance),
new ModeChannelNoExternal(Instance),
new ModeChannelInviteOnly(Instance),
new ModeChannelKey(Instance),
new ModeChannelLimit(Instance),
new ModeChannelNoExternal(Instance),
new ModeChannelInviteOnly(Instance),
new ModeChannelKey(Instance),
new ModeChannelLimit(Instance),
new ModeChannelBan(Instance),
new ModeChannelOp(Instance),
new ModeChannelHalfOp(Instance),
new ModeChannelVoice(Instance),
new ModeChannelBan(Instance),
new ModeChannelOp(Instance),
new ModeChannelHalfOp(Instance),
new ModeChannelVoice(Instance),
new ModeUserWallops(Instance),
new ModeUserInvisible(Instance),
new ModeUserOperator(Instance),
new ModeUserServerNoticeMask(Instance),
new ModeUserWallops(Instance),
new ModeUserInvisible(Instance),
new ModeUserOperator(Instance),
new ModeUserServerNoticeMask(Instance),
+#define BUILTIN_MODE_COUNT 16
};
/* Clear mode handler list */
};
/* Clear mode handler list */
LastParse.clear();
/* Initialise the RFC mode letters */
LastParse.clear();
/* Initialise the RFC mode letters */
- for (int index = 0; modes[index]; index++)
+ for (int index = 0; index < BUILTIN_MODE_COUNT; index++)
this->AddMode(modes[index]);
seq = 0;
memset(&sent, 0, sizeof(sent));
}
this->AddMode(modes[index]);
seq = 0;
memset(&sent, 0, sizeof(sent));
}
+
+ModeParser::~ModeParser()
+{
+ int count = 0;
+ for(int i=0; i < 256; i++)
+ {
+ ModeHandler* mh = modehandlers[i];
+ if (mh)
+ {
+ count++;
+ delete mh;
+ }
+ }
+ if (count != BUILTIN_MODE_COUNT)
+ throw CoreException("Mode handler found non-core modes remaining at deallocation");
+}