summaryrefslogtreecommitdiff
path: root/modules/core/cs_set_mlock.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-07-28 00:28:59 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-07-28 00:28:59 -0400
commitaa9610a56ff18edd0703a3f391c90e1f8a761476 (patch)
tree5fceef5b811ffcb28bcea093b59604b94a2a89c1 /modules/core/cs_set_mlock.cpp
parent4700c9626861b193798b3cf3d53fb89a913c5819 (diff)
parenta2573a2c3067343ebf46292691671ba4bad855a8 (diff)
Merge branch '1.9' of ssh://anope.git.sf.net/gitroot/anope/anope into 1.9
Diffstat (limited to 'modules/core/cs_set_mlock.cpp')
-rw-r--r--modules/core/cs_set_mlock.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/core/cs_set_mlock.cpp b/modules/core/cs_set_mlock.cpp
index 2dc1ef2a7..ec41913b9 100644
--- a/modules/core/cs_set_mlock.cpp
+++ b/modules/core/cs_set_mlock.cpp
@@ -23,7 +23,8 @@ class CommandCSSetMLock : public Command
CommandReturn Execute(User *u, const std::vector<Anope::string> &params)
{
ChannelInfo *ci = cs_findchan(params[0]);
- assert(ci);
+ if (!ci)
+ throw CoreException("NULL ci in CommandCSSetMLock");
int add = -1; /* 1 if adding, 0 if deleting, -1 if neither */
ChannelMode *cm;
@@ -66,7 +67,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;