Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
02297d1a
Commit
02297d1a
authored
Jul 13, 2021
by
Randy Sommerfeld
Browse files
Don't auto-connect to an invalid port. Reported by nelgin, thanks!
parent
e53c5926
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
exec/load/ircd/core.js
exec/load/ircd/core.js
+15
-5
No files found.
exec/load/ircd/core.js
View file @
02297d1a
...
@@ -270,17 +270,28 @@ function handle_outbound_server_connect() {
...
@@ -270,17 +270,28 @@ function handle_outbound_server_connect() {
Unregistered
[
id
].
server
=
true
;
/* Avoid recvq limitation */
Unregistered
[
id
].
server
=
true
;
/* Avoid recvq limitation */
Unregistered
[
id
].
ircclass
=
this
.
cline
.
ircclass
;
Unregistered
[
id
].
ircclass
=
this
.
cline
.
ircclass
;
this
.
callback_id
=
this
.
on
(
"
read
"
,
Socket_Recv
);
this
.
callback_id
=
this
.
on
(
"
read
"
,
Socket_Recv
);
}
else
{
return
true
;
}
if
(
YLines
[
this
.
cline
.
ircclass
].
connfreq
>
0
&&
parseInt
(
this
.
cline
.
port
)
>
0
)
{
umode_notice
(
USERMODE_ROUTING
,
"
Routing
"
,
format
(
umode_notice
(
USERMODE_ROUTING
,
"
Routing
"
,
format
(
"
Failed to connect to %s (%s). Trying again in %d seconds.
"
,
"
Failed to connect to %s (%s). Trying again in %d seconds.
"
,
this
.
cline
.
servername
,
this
.
cline
.
servername
,
this
.
cline
.
host
,
this
.
cline
.
host
,
YLines
[
this
.
cline
.
ircclass
].
connfreq
YLines
[
this
.
cline
.
ircclass
].
connfreq
));
));
this
.
close
();
Reset_Autoconnect
(
this
.
cline
,
YLines
[
this
.
cline
.
ircclass
].
connfreq
*
1000
);
Reset_Autoconnect
(
this
.
cline
,
YLines
[
this
.
cline
.
ircclass
].
connfreq
*
1000
);
}
else
{
umode_notice
(
USERMODE_ROUTING
,
"
Routing
"
,
format
(
"
Failed to connect to %s (%s).
"
,
this
.
cline
.
servername
,
this
.
cline
.
host
));
}
}
this
.
cline
.
lastconnect
=
system
.
timer
;
this
.
close
();
return
false
;
}
}
function
Write_All_Opers
(
str
)
{
function
Write_All_Opers
(
str
)
{
...
@@ -2882,8 +2893,7 @@ function CLine(host,password,servername,port,ircclass) {
...
@@ -2882,8 +2893,7 @@ function CLine(host,password,servername,port,ircclass) {
this
.
servername
=
servername
;
this
.
servername
=
servername
;
this
.
port
=
port
;
this
.
port
=
port
;
this
.
ircclass
=
ircclass
;
this
.
ircclass
=
ircclass
;
this
.
lastconnect
=
0
;
if
(
YLines
[
ircclass
].
connfreq
>
0
&&
parseInt
(
port
)
>
0
)
if
(
YLines
[
ircclass
].
connfreq
>
0
)
Reset_Autoconnect
(
this
,
1
/* connect immediately */
);
Reset_Autoconnect
(
this
,
1
/* connect immediately */
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment