diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-28 00:28:59 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-28 00:28:59 -0400 |
commit | aa9610a56ff18edd0703a3f391c90e1f8a761476 (patch) | |
tree | 5fceef5b811ffcb28bcea093b59604b94a2a89c1 /modules/extra | |
parent | 4700c9626861b193798b3cf3d53fb89a913c5819 (diff) | |
parent | a2573a2c3067343ebf46292691671ba4bad855a8 (diff) |
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/extra')
-rw-r--r-- | modules/extra/cs_set_misc.cpp | 3 | ||||
-rw-r--r-- | modules/extra/mysql/db_mysql_write.cpp | 4 | ||||
-rw-r--r-- | modules/extra/ns_set_misc.cpp | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/modules/extra/cs_set_misc.cpp b/modules/extra/cs_set_misc.cpp index 7cffe6866..d287a24c1 100644 --- a/modules/extra/cs_set_misc.cpp +++ b/modules/extra/cs_set_misc.cpp @@ -23,7 +23,8 @@ class CommandCSSetMisc : public Command CommandReturn Execute(User *u, const std::vector<Anope::string> ¶ms) { ChannelInfo *ci = cs_findchan(params[0]); - assert(ci); + if (!ci) + throw CoreException("NULL ci in CommandCSSetMisc"); ci->Shrink("chanserv:" + this->name); if (params.size() > 1) 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/extra/ns_set_misc.cpp b/modules/extra/ns_set_misc.cpp index 9e0f23eb0..8ab54fd05 100644 --- a/modules/extra/ns_set_misc.cpp +++ b/modules/extra/ns_set_misc.cpp @@ -22,7 +22,8 @@ class CommandNSSetMisc : public Command CommandReturn RealExecute(User *u, const std::vector<Anope::string> ¶ms) { NickCore *nc = findcore(params[0]); - assert(nc); + if (!nc) + throw CoreException("NULL nc in CommandNSSetMisc"); nc->Shrink("nickserv:" + this->name); if (params.size() > 1) |