summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 12:24:41 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-08 12:24:41 +0000
commit7a3907f0518238402a4ea592fe5fb18849a833c5 (patch)
tree364c440a2473bf43621f5f7cd6dd3a7a87358e34 /src
parentf82cc8dd39fe97a9e91226b2aa892dcf036a5c0c (diff)
Check return values
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4784 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index bda6f765b..f09c85d08 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -428,11 +428,15 @@ void Server::KickUser(userrec* source, userrec* target, chanrec* chan, const std
{
if (source)
{
- chan->KickUser(source, target, reason.c_str());
+ if (!chan->KickUser(source, target, reason.c_str()))
+ /* No users left? */
+ delete chan;
}
else
{
- chan->ServerKickUser(target, reason.c_str(), true);
+ if (!chan->ServerKickUser(target, reason.c_str(), true))
+ /* No users left? */
+ delete chan;
}
}