summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index 8a4198b74..6d7728a93 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -164,8 +164,13 @@ void BotInfo::UnAssign(User *u, ChannelInfo *ci)
if (MOD_RESULT == EVENT_STOP)
return;
- if (u && ci->c && ci->c->usercount >= BSMinUsers)
- ircdproto->SendPart(ci->bi, ci->name, "UNASSIGN from %s", u->nick);
+ if (ci->c && ci->c->usercount >= BSMinUsers)
+ {
+ if (u)
+ ircdproto->SendPart(ci->bi, ci->name, "UNASSIGN from %s", u->nick);
+ else
+ ircdproto->SendPart(ci->bi, ci->name, "");
+ }
ci->bi->chancount--;
ci->bi = NULL;