summaryrefslogtreecommitdiff
path: root/src/chanserv.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-07-14 02:31:12 -0400
committerAdam <Adam@anope.org>2011-07-14 02:31:12 -0400
commitf858164deed48f2dcacd5ffc06a55398a54da7e8 (patch)
tree89c3cf36bd8e94942370135218d67d6d17ee222e /src/chanserv.cpp
parent924f6849fee4598a1a3a7f1a98d96b79e5ffd3b4 (diff)
Rewrote how commands are handled within Anope.
This allows naming commands and having spaces within command names.
Diffstat (limited to 'src/chanserv.cpp')
-rw-r--r--src/chanserv.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/chanserv.cpp b/src/chanserv.cpp
index 42d637c38..6a39340ae 100644
--- a/src/chanserv.cpp
+++ b/src/chanserv.cpp
@@ -13,7 +13,6 @@
#include "services.h"
#include "modules.h"
-#include "chanserv.h"
registered_channel_map RegisteredChannelList;
@@ -124,8 +123,7 @@ void check_modes(Channel *c)
/* Check for mode bouncing */
if (c->server_modecount >= 3 && c->chanserv_modecount >= 3)
{
- ircdproto->SendGlobops(NULL, "Warning: unable to set modes on channel %s. Are your servers' U:lines configured correctly?", c->name.c_str());
- Log() << "Bouncy modes on channel " << c->name;
+ Log() << "Warning: unable to set modes on channel " << c->name << ". Are your servers' U:lines configured correctly?";
c->bouncy_modes = 1;
return;
}
@@ -367,11 +365,12 @@ Anope::string get_xop_level(int level)
ChanServTimer::ChanServTimer(Channel *chan) : Timer(Config->CSInhabit), c(chan)
{
- if (!chanserv || !c)
+ BotInfo *bi = findbot(Config->ChanServ);
+ if (!bi || !c)
return;
c->SetFlag(CH_INHABIT);
if (!c->ci || !c->ci->bi)
- chanserv->Bot()->Join(c);
+ bi->Join(c);
else if (!c->FindUser(c->ci->bi))
c->ci->bi->Join(c);
}
@@ -385,8 +384,9 @@ void ChanServTimer::Tick(time_t)
if (!c->ci || !c->ci->bi)
{
- if (chanserv)
- chanserv->Bot()->Part(c);
+ BotInfo *bi = findbot(Config->ChanServ);
+ if (bi)
+ bi->Part(c);
}
else if (c->users.size() == 1 || c->users.size() < Config->BSMinUsers)
c->ci->bi->Part(c);