diff options
| author | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-08-17 19:27:37 -0400 |
| commit | e65d8b2f3dfdb40858259b3bb48ef6998c31e62f (patch) | |
| tree | fd845bdef5664d025ab19c262ae2c5e9d23d7bb2 /src/regchannel.cpp | |
| parent | 2575008baa5c9d0ca789680da1a3b81dc74786f7 (diff) | |
Rewrote the config reader to better handle invalid configs.
This prevents Anope from exploding when /os reload has errors.
Diffstat (limited to 'src/regchannel.cpp')
| -rw-r--r-- | src/regchannel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 42ccad94e..d055a632b 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -39,16 +39,16 @@ ChannelInfo::ChannelInfo(const Anope::string &chname) size_t t; /* Set default channel flags */ for (t = CI_BEGIN + 1; t != CI_END; ++t) - if (Config.CSDefFlags.HasFlag(static_cast<ChannelInfoFlag>(t))) + if (Config->CSDefFlags.HasFlag(static_cast<ChannelInfoFlag>(t))) this->SetFlag(static_cast<ChannelInfoFlag>(t)); /* Set default bot flags */ for (t = BS_BEGIN + 1; t != BS_END; ++t) - if (Config.BSDefFlags.HasFlag(static_cast<BotServFlag>(t))) + if (Config->BSDefFlags.HasFlag(static_cast<BotServFlag>(t))) this->botflags.SetFlag(static_cast<BotServFlag>(t)); - this->bantype = Config.CSDefBantype; - this->memos.memomax = Config.MSMaxMemos; + this->bantype = Config->CSDefBantype; + this->memos.memomax = Config->MSMaxMemos; this->last_used = this->time_registered = time(NULL); this->ttb = new int16[2 * TTB_SIZE]; @@ -586,7 +586,7 @@ bool ChannelInfo::CheckKick(User *user) get_idealban(this, user, mask); else mask = autokick->mask; - reason = autokick->reason.empty() ? Config.CSAutokickReason : autokick->reason; + reason = autokick->reason.empty() ? Config->CSAutokickReason : autokick->reason; do_kick = true; break; } |
