summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-11 02:47:05 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-11-11 02:47:05 +0000
commit86e43f1f144cfd04b039a844959af1f7aec3e6da (patch)
treec5d5fb8b025d7066365afbf0d1e274e2bb5265cb /src/bots.cpp
parent9d37cf1d5afeaa054f31e0df85275521410bde61 (diff)
Added support for permanent channels. This supports both permanent channel modes and the ability to have BotServ bots stay in the channel to keep it open.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2638 5417fbe8-f217-4b02-8779-1006273d7864
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;