summaryrefslogtreecommitdiff
path: root/modules/protocol/ngircd.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
committerAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
commit1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch)
tree4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/protocol/ngircd.cpp
parent781defb7076ddfddf723ca08cd0a518b6657b64f (diff)
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/protocol/ngircd.cpp')
-rw-r--r--modules/protocol/ngircd.cpp11
1 files changed, 5 insertions, 6 deletions
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<unsigned>(data);
- if (Config->NickLen != newlen)
+ unsigned newlen = convertTo<unsigned>(data), len = Config->GetBlock("networkinfo")->Get<unsigned>("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]);
}
};