Skip to content
Snippets Groups Projects
Commit ef1d7630 authored by Randy Sommerfeld's avatar Randy Sommerfeld
Browse files

Allow different passwords for inbound/outbound connects in .ini

parent 8e5bab52
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -451,9 +451,17 @@ function ini_Hub(arg, ini) { ...@@ -451,9 +451,17 @@ function ini_Hub(arg, ini) {
function ini_Server(arg, ini) { function ini_Server(arg, ini) {
var ircclass, port; var ircclass, port;
if (!ini.Servername || !ini.Hostname || !ini.Port || !ini.Password || !ini.Class) { if (!ini.Servername || !ini.Hostname || !ini.Class) {
log(LOG_WARNING,format( log(LOG_WARNING,format(
"!WARNING Missing information from Server:%s. Section ignored.", "!WARNING Missing information from [Server:%s], Section ignored.",
arg
));
return;
}
if ((!ini.InboundPassword || !ini.OutboundPassword) && !ini.Password) {
log(LOG_WARNING,format(
"!WARNING No password provided for [Server:%s], Section ignored.",
arg arg
)); ));
return; return;
...@@ -462,16 +470,17 @@ function ini_Server(arg, ini) { ...@@ -462,16 +470,17 @@ function ini_Server(arg, ini) {
port = parseInt(ini.Port); port = parseInt(ini.Port);
if (port != ini.Port) { if (port != ini.Port) {
log(LOG_WARNING,format( log(LOG_WARNING,format(
"!WARNING Malformed port in Server:%s. Using 6667.", "!WARNING Malformed or missing port in [Server:%s], Using %u.",
arg arg,
Default_Port
)); ));
port = 6667; port = Default_Port;
} }
ircclass = parseInt(ini.Class); ircclass = parseInt(ini.Class);
if (ircclass != ini.Class) { if (ircclass != ini.Class) {
log(LOG_WARNING,format( log(LOG_WARNING,format(
"!WARNING Malformed IRC Class in Server:%s. Using default class of 0.", "!WARNING Malformed IRC Class in [Server:%s], Using default class of 0.",
arg arg
)); ));
ircclass = 0; ircclass = 0;
...@@ -482,14 +491,14 @@ function ini_Server(arg, ini) { ...@@ -482,14 +491,14 @@ function ini_Server(arg, ini) {
CLines.push(new CLine( CLines.push(new CLine(
ini.Hostname, ini.Hostname,
ini.Password, ini.OutboundPassword ? ini.OutboundPassword : ini.Password,
ini.Servername, ini.Servername,
port, port,
ircclass ircclass
)); ));
NLines.push(new NLine( NLines.push(new NLine(
ini.Hostname, ini.Hostname,
ini.Password, ini.InboundPassword ? ini.InboundPassword : ini.Password,
ini.Servername, ini.Servername,
parse_nline_flags(ini.Flags), parse_nline_flags(ini.Flags),
ircclass ircclass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment