diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/core/cs_set_mlock.cpp | 2 | ||||
-rw-r--r-- | modules/core/db_plain.cpp | 6 | ||||
-rw-r--r-- | modules/core/os_defcon.cpp | 2 | ||||
-rw-r--r-- | modules/extra/mysql/db_mysql_write.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/bahamut.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/inspircd11.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/inspircd12.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/inspircd20.cpp | 2 | ||||
-rw-r--r-- | modules/protocol/ratbox.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/unreal32.cpp | 8 |
10 files changed, 19 insertions, 19 deletions
diff --git a/modules/core/cs_set_mlock.cpp b/modules/core/cs_set_mlock.cpp index 2dc1ef2a7..166f6f71c 100644 --- a/modules/core/cs_set_mlock.cpp +++ b/modules/core/cs_set_mlock.cpp @@ -66,7 +66,7 @@ class CommandCSSetMLock : public Command Anope::string param = params[paramcount]; - ChannelModeParam *cmp = dynamic_cast<ChannelModeParam *>(cm); + ChannelModeParam *cmp = debug_cast<ChannelModeParam *>(cm); if (!cmp || !cmp->IsValid(param)) continue; diff --git a/modules/core/db_plain.cpp b/modules/core/db_plain.cpp index 331901f86..a9d87fab7 100644 --- a/modules/core/db_plain.cpp +++ b/modules/core/db_plain.cpp @@ -1014,7 +1014,7 @@ class DBPlain : public Module { if ((*it)->Class == MC_CHANNEL) { - ChannelMode *cm = dynamic_cast<ChannelMode *>(*it); + ChannelMode *cm = debug_cast<ChannelMode *>(*it); if (ci->HasMLock(cm->Name, true)) db << " " << cm->NameAsString; @@ -1029,7 +1029,7 @@ class DBPlain : public Module { if ((*it)->Class == MC_CHANNEL) { - ChannelMode *cm = dynamic_cast<ChannelMode *>(*it); + ChannelMode *cm = debug_cast<ChannelMode *>(*it); if (ci->HasMLock(cm->Name, false)) db << " " << cm->NameAsString; @@ -1042,7 +1042,7 @@ class DBPlain : public Module { if ((*it)->Class == MC_CHANNEL) { - ChannelMode *cm = dynamic_cast<ChannelMode *>(*it); + ChannelMode *cm = debug_cast<ChannelMode *>(*it); if (ci->GetParam(cm->Name, Param)) db << "MD MLP " << cm->NameAsString << " " << Param << endl; diff --git a/modules/core/os_defcon.cpp b/modules/core/os_defcon.cpp index 155937753..cb25b50bf 100644 --- a/modules/core/os_defcon.cpp +++ b/modules/core/os_defcon.cpp @@ -428,7 +428,7 @@ void defconParseModeString(const Anope::string &str) if (cm->Type == MODE_PARAM) { - cmp = dynamic_cast<ChannelModeParam *>(cm); + cmp = debug_cast<ChannelModeParam *>(cm); if (!ss.GetToken(param)) { diff --git a/modules/extra/mysql/db_mysql_write.cpp b/modules/extra/mysql/db_mysql_write.cpp index 2d44450c1..5d2ef2a78 100644 --- a/modules/extra/mysql/db_mysql_write.cpp +++ b/modules/extra/mysql/db_mysql_write.cpp @@ -66,7 +66,7 @@ static std::string MakeMLock(ChannelInfo *ci, bool status) { if ((*it)->Class == MC_CHANNEL) { - ChannelMode *cm = dynamic_cast<ChannelMode *>(*it); + ChannelMode *cm = debug_cast<ChannelMode *>(*it); if (ci->HasMLock(cm->Name, status)) ret += " " + cm->NameAsString; @@ -97,7 +97,7 @@ static std::string GetMLockParams(ChannelInfo *ci) { if ((*it)->Class == MC_CHANNEL) { - ChannelMode *cm = dynamic_cast<ChannelMode *>(*it); + ChannelMode *cm = debug_cast<ChannelMode *>(*it); std::string param; if (ci->GetParam(cm->Name, param)) diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index d80fb953b..9e28b1f9f 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -319,7 +319,7 @@ int anope_event_sjoin(const Anope::string &source, int ac, const char **av) if (m->Type != MODE_STATUS) continue; - ChannelMode *cm = dynamic_cast<ChannelMode *>(m); + ChannelMode *cm = debug_cast<ChannelMode *>(m); for (CUserList::const_iterator uit = c->users.begin(), uit_end = c->users.end(); uit != uit_end; ++uit) { diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index c58c011c9..3234ae81e 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -413,7 +413,7 @@ int anope_event_fjoin(const Anope::string &source, int ac, const char **av) if (m->Type != MODE_STATUS) continue; - ChannelMode *cm = dynamic_cast<ChannelMode *>(m); + ChannelMode *cm = debug_cast<ChannelMode *>(m); for (CUserList::const_iterator uit = c->users.begin(), uit_end = c->users.end(); uit != uit_end; ++uit) { diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index 4c1a5407e..f8d0c1563 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -454,7 +454,7 @@ int anope_event_fjoin(const Anope::string &source, int ac, const char **av) if (m->Type != MODE_STATUS) continue; - ChannelMode *cm = dynamic_cast<ChannelMode *>(m); + ChannelMode *cm = debug_cast<ChannelMode *>(m); for (CUserList::const_iterator uit = c->users.begin(), uit_end = c->users.end(); uit != uit_end; ++uit) { diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 5097f24b8..043e3d256 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -452,7 +452,7 @@ int anope_event_fjoin(const Anope::string &source, int ac, const char **av) if (m->Type != MODE_STATUS) continue; - ChannelMode *cm = dynamic_cast<ChannelMode *>(m); + ChannelMode *cm = debug_cast<ChannelMode *>(m); for (CUserList::const_iterator uit = c->users.begin(), uit_end = c->users.end(); uit != uit_end; ++uit) { diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index a01207a5d..df241e3fc 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -302,7 +302,7 @@ int anope_event_sjoin(const Anope::string &source, int ac, const char **av) if (m->Type != MODE_STATUS) continue; - ChannelMode *cm = dynamic_cast<ChannelMode *>(m); + ChannelMode *cm = debug_cast<ChannelMode *>(m); for (CUserList::const_iterator uit = c->users.begin(), uit_end = c->users.end(); uit != uit_end; ++uit) { @@ -726,17 +726,17 @@ int anope_event_bmask(const Anope::string &source, int ac, const char **av) Anope::string b = myStrGetToken(bans, ' ', i); if (!stricmp(av[2], "b")) { - cms = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('b')); + cms = debug_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('b')); cms->AddMask(c, b); } if (!stricmp(av[2], "e")) { - cms = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('e')); + cms = debug_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('e')); cms->AddMask(c, b); } if (!stricmp(av[2], "I")) { - cms = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('I')); + cms = debug_cast<ChannelModeList *>(ModeManager::FindChannelModeByChar('I')); cms->AddMask(c, b); } } diff --git a/modules/protocol/unreal32.cpp b/modules/protocol/unreal32.cpp index 4383d88c4..486e248d4 100644 --- a/modules/protocol/unreal32.cpp +++ b/modules/protocol/unreal32.cpp @@ -1008,7 +1008,7 @@ int anope_event_sjoin(const Anope::string &source, int ac, const char **av) if (m->Type != MODE_STATUS) continue; - ChannelMode *cm = dynamic_cast<ChannelMode *>(m); + ChannelMode *cm = debug_cast<ChannelMode *>(m); for (CUserList::const_iterator uit = c->users.begin(), uit_end = c->users.end(); uit != uit_end; ++uit) { @@ -1052,7 +1052,7 @@ int anope_event_sjoin(const Anope::string &source, int ac, const char **av) if (keep_their_modes && buf[0] == '&') { buf.erase(buf.begin()); - ChannelModeList *cml = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByName(CMODE_BAN)); + ChannelModeList *cml = debug_cast<ChannelModeList *>(ModeManager::FindChannelModeByName(CMODE_BAN)); if (cml->IsValid(buf)) cml->AddMask(c, buf); @@ -1061,7 +1061,7 @@ int anope_event_sjoin(const Anope::string &source, int ac, const char **av) else if (keep_their_modes && buf[0] == '"') { buf.erase(buf.begin()); - ChannelModeList *cml = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByName(CMODE_EXCEPT)); + ChannelModeList *cml = debug_cast<ChannelModeList *>(ModeManager::FindChannelModeByName(CMODE_EXCEPT)); if (cml->IsValid(buf)) cml->AddMask(c, buf); @@ -1070,7 +1070,7 @@ int anope_event_sjoin(const Anope::string &source, int ac, const char **av) else if (keep_their_modes && buf[0] == '\'') { buf.erase(buf.begin()); - ChannelModeList *cml = dynamic_cast<ChannelModeList *>(ModeManager::FindChannelModeByName(CMODE_INVITEOVERRIDE)); + ChannelModeList *cml = debug_cast<ChannelModeList *>(ModeManager::FindChannelModeByName(CMODE_INVITEOVERRIDE)); if (cml->IsValid(buf)) cml->AddMask(c, buf); |