From 1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 5 May 2013 01:55:04 -0400 Subject: Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in. --- modules/protocol/ngircd.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'modules/protocol/ngircd.cpp') diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index c749a2d7d..3d1a727e7 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -53,7 +53,7 @@ class ngIRCdProto : public IRCDProto void SendConnect() anope_override { - UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink]->password << " 0210-IRC+ Anope|" << Anope::VersionShort() << ":CLHMSo P"; + UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink].password << " 0210-IRC+ Anope|" << Anope::VersionShort() << ":CLHMSo P"; /* Make myself known to myself in the serverlist */ SendServer(Me); /* finish the enhanced server handshake and register the connection */ @@ -184,11 +184,10 @@ struct IRCDMessage005 : IRCDMessage } else if (parameter == "NICKLEN") { - unsigned newlen = convertTo(data); - if (Config->NickLen != newlen) + unsigned newlen = convertTo(data), len = Config->GetBlock("networkinfo")->Get("nicklen"); + if (len != newlen) { - Log() << "NickLen changed from " << Config->NickLen << " to " << newlen; - Config->NickLen = newlen; + Log() << "Warning: NICKLEN is " << newlen << " but networkinfo:nicklen is " << len; } } } @@ -540,7 +539,7 @@ struct IRCDMessageServer : IRCDMessage * when receiving a new server and then finish sync once we * get a pong back from that server. */ - IRCD->SendPing(Config->ServerName, params[0]); + IRCD->SendPing(Me->GetName(), params[0]); } }; -- cgit