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 /modules/protocol/ratbox.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 'modules/protocol/ratbox.cpp')
-rw-r--r-- | modules/protocol/ratbox.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index ff2a0f6c6..59abc7bc8 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -120,19 +120,19 @@ class RatboxProto : public IRCDTS6Proto void SendSGLineDel(const XLine *x) { BotInfo *bi = OperServ; - send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "UNXLINE * %s", x->Mask.c_str()); + send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNXLINE * %s", x->Mask.c_str()); } void SendSGLine(const XLine *x) { BotInfo *bi = OperServ; - send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str()); + send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "XLINE * %s 0 :%s", x->Mask.c_str(), x->Reason.c_str()); } void SendAkillDel(const XLine *x) { BotInfo *bi = OperServ; - send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "UNKLINE * %s %s", x->GetUser().c_str(), x->GetHost().c_str()); + send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "UNKLINE * %s %s", x->GetUser().c_str(), x->GetHost().c_str()); } void SendSQLineDel(const XLine *x) @@ -148,7 +148,7 @@ class RatboxProto : public IRCDTS6Proto void SendAkill(const XLine *x) { BotInfo *bi = OperServ; - send_cmd(bi ? bi->GetUID() : Config.s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - time(NULL)), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str()); + send_cmd(bi ? bi->GetUID() : Config->s_OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - time(NULL)), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str()); } void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf) @@ -538,7 +538,7 @@ int anope_event_ping(const Anope::string &source, int ac, const char **av) { if (ac < 1) return MOD_CONT; - ircdproto->SendPong(ac > 1 ? av[1] : Config.ServerName, av[0]); + ircdproto->SendPong(ac > 1 ? av[1] : Config->ServerName, av[0]); return MOD_CONT; } @@ -811,8 +811,8 @@ class ProtoRatbox : public Module this->SetAuthor("Anope"); this->SetType(PROTOCOL); - if (!Config.Numeric.empty()) - TS6SID = Config.Numeric; + if (!Config->Numeric.empty()) + TS6SID = Config->Numeric; UseTSMODE = 1; /* TMODE */ pmodule_ircd_version("Ratbox IRCD 2.0+"); |