1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 20:13:13 +02:00

Replaced some static_casts related to modes with dynamic_cast - its a bit safer

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2715 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2009-12-23 08:41:22 +00:00
parent f82640af7c
commit 80cbac3769
6 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -735,15 +735,15 @@ int anope_event_bmask(const char *source, int ac, const char **av)
for (i = 0; i <= count - 1; i++) {
b = myStrGetToken(bans, ' ', i);
if (!stricmp(av[2], "b")) {
cms = static_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('b'));
cms = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('b'));
cms->AddMask(c, b);
}
if (!stricmp(av[2], "e")) {
cms = static_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('e'));
cms = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('e'));
cms->AddMask(c, b);
}
if (!stricmp(av[2], "I")) {
cms = static_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('I'));
cms = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('I'));
cms->AddMask(c, b);
}
if (b)