summaryrefslogtreecommitdiff
path: root/src/bots.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-17 19:27:37 -0400
committerAdam <Adam@anope.org>2010-08-17 19:27:37 -0400
commite65d8b2f3dfdb40858259b3bb48ef6998c31e62f (patch)
treefd845bdef5664d025ab19c262ae2c5e9d23d7bb2 /src/bots.cpp
parent2575008baa5c9d0ca789680da1a3b81dc74786f7 (diff)
Rewrote the config reader to better handle invalid configs.
This prevents Anope from exploding when /os reload has errors.
Diffstat (limited to 'src/bots.cpp')
-rw-r--r--src/bots.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/bots.cpp b/src/bots.cpp
index c07b358da..cb7a370c1 100644
--- a/src/bots.cpp
+++ b/src/bots.cpp
@@ -30,19 +30,19 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A
this->chancount = 0;
this->lastmsg = this->created = time(NULL);
- if (!Config.s_ChanServ.empty() && nnick.equals_ci(Config.s_ChanServ))
+ if (!Config->s_ChanServ.empty() && nnick.equals_ci(Config->s_ChanServ))
ChanServ = this;
- else if (!Config.s_BotServ.empty() && nnick.equals_ci(Config.s_BotServ))
+ else if (!Config->s_BotServ.empty() && nnick.equals_ci(Config->s_BotServ))
BotServ = this;
- else if (!Config.s_HostServ.empty() && nnick.equals_ci(Config.s_HostServ))
+ else if (!Config->s_HostServ.empty() && nnick.equals_ci(Config->s_HostServ))
HostServ = this;
- else if (!Config.s_OperServ.empty() && nnick.equals_ci(Config.s_OperServ))
+ else if (!Config->s_OperServ.empty() && nnick.equals_ci(Config->s_OperServ))
OperServ = this;
- else if (!Config.s_MemoServ.empty() && nnick.equals_ci(Config.s_MemoServ))
+ else if (!Config->s_MemoServ.empty() && nnick.equals_ci(Config->s_MemoServ))
MemoServ = this;
- else if (!Config.s_NickServ.empty() && nnick.equals_ci(Config.s_NickServ))
+ else if (!Config->s_NickServ.empty() && nnick.equals_ci(Config->s_NickServ))
NickServ = this;
- else if (!Config.s_GlobalNoticer.empty() && nnick.equals_ci(Config.s_GlobalNoticer))
+ else if (!Config->s_GlobalNoticer.empty() && nnick.equals_ci(Config->s_GlobalNoticer))
Global = this;
BotListByNick[this->nick] = this;
@@ -94,7 +94,7 @@ void BotInfo::RejoinAll()
{
ChannelInfo *ci = it->second;
- if (ci->bi == this && ci->c && ci->c->users.size() >= Config.BSMinUsers)
+ if (ci->bi == this && ci->c && ci->c->users.size() >= Config->BSMinUsers)
this->Join(ci->c);
}
}
@@ -112,7 +112,7 @@ void BotInfo::Assign(User *u, ChannelInfo *ci)
++this->chancount;
ci->bi = this;
- if (ci->c && ci->c->users.size() >= Config.BSMinUsers)
+ if (ci->c && ci->c->users.size() >= Config->BSMinUsers)
this->Join(ci->c);
}
@@ -138,7 +138,7 @@ void BotInfo::UnAssign(User *u, ChannelInfo *ci)
void BotInfo::Join(Channel *c)
{
- if (Config.BSSmartJoin)
+ if (Config->BSSmartJoin)
{
/* We check for bans */
if (c->bans && c->bans->count)