diff options
| author | Adam <Adam@anope.org> | 2010-07-27 22:12:20 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-07-27 22:12:20 -0400 |
| commit | a2573a2c3067343ebf46292691671ba4bad855a8 (patch) | |
| tree | 3249b34cdc55997ec9443e4792a8122dedc70f74 /modules/extra | |
| parent | 4b870cc5f9671201dfad6fa836847cdd40aef519 (diff) | |
Removed some assertions, replaced with throwing CoreExceptions
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/cs_set_misc.cpp | 3 | ||||
| -rw-r--r-- | modules/extra/ns_set_misc.cpp | 3 |
2 files changed, 4 insertions, 2 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/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) |
