summaryrefslogtreecommitdiff
path: root/src/protocol.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/protocol.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/protocol.cpp')
-rw-r--r--src/protocol.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 0ff642cf0..d0cfef071 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -2,7 +2,7 @@
void IRCDProto::SendMessageInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf)
{
- if (Config.NSDefFlags.HasFlag(NI_MSG))
+ if (Config->NSDefFlags.HasFlag(NI_MSG))
SendPrivmsgInternal(bi, dest, buf);
else
SendNoticeInternal(bi, dest, buf);
@@ -39,7 +39,7 @@ void IRCDProto::SendGlobopsInternal(const BotInfo *source, const Anope::string &
if (source)
send_cmd(ircd->ts6 ? source->GetUID() : source->nick, "GLOBOPS :%s", buf.c_str());
else
- send_cmd(Config.ServerName, "GLOBOPS :%s", buf.c_str());
+ send_cmd(Config->ServerName, "GLOBOPS :%s", buf.c_str());
}
void IRCDProto::SendCTCPInternal(const BotInfo *bi, const Anope::string &dest, const Anope::string &buf)
@@ -178,9 +178,9 @@ void IRCDProto::SendQuit(const BotInfo *bi, const char *fmt, ...)
void IRCDProto::SendPing(const Anope::string &servname, const Anope::string &who)
{
if (servname.empty())
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PING %s", who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PING %s", who.c_str());
else
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PING %s %s", servname.c_str(), who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PING %s %s", servname.c_str(), who.c_str());
}
/**
@@ -192,9 +192,9 @@ void IRCDProto::SendPing(const Anope::string &servname, const Anope::string &who
void IRCDProto::SendPong(const Anope::string &servname, const Anope::string &who)
{
if (servname.empty())
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PONG %s", who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PONG %s", who.c_str());
else
- send_cmd(ircd->ts6 ? TS6SID : Config.ServerName, "PONG %s %s", servname.c_str(), who.c_str());
+ send_cmd(ircd->ts6 ? TS6SID : Config->ServerName, "PONG %s %s", servname.c_str(), who.c_str());
}
void IRCDProto::SendInvite(const BotInfo *bi, const Anope::string &chan, const Anope::string &nick)