Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
734a9d1a
Commit
734a9d1a
authored
3 years ago
by
Randy Sommerfeld
Browse files
Options
Downloads
Patches
Plain Diff
Only allow one outbound CONNECT at a time
parent
ccc0e401
No related branches found
No related tags found
1 merge request
!463
MRC mods by Codefenix (2024-10-20)
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exec/ircd.js
+2
-0
2 additions, 0 deletions
exec/ircd.js
exec/load/ircd/core.js
+25
-2
25 additions, 2 deletions
exec/load/ircd/core.js
with
27 additions
and
2 deletions
exec/ircd.js
+
2
−
0
View file @
734a9d1a
...
...
@@ -96,6 +96,8 @@ var Default_Port = 6667;
var
Time_Config_Read
;
/* Stores unix epoch of when the config was last read */
var
Outbound_Connect_in_Progress
=
false
;
/* Will this server try to enforce good network behaviour? */
/* Setting to "true" results in bouncing bad modes, KILLing bogus NICKs, etc. */
var
Enforcement
=
true
;
...
...
This diff is collapsed.
Click to expand it.
exec/load/ircd/core.js
+
25
−
2
View file @
734a9d1a
...
...
@@ -243,6 +243,17 @@ function Automatic_Server_Connect() {
return
false
;
}
if
(
Outbound_Connect_in_Progress
)
{
this
.
next_connect
=
js
.
setTimeout
(
Automatic_Server_Connect
,
1000
,
this
);
return
false
;
}
Outbound_Connect_in_Progress
=
true
;
umode_notice
(
USERMODE_ROUTING
,
"
Routing
"
,
format
(
"
Auto-connecting to %s (%s) on port %u
"
,
this
.
servername
,
...
...
@@ -260,6 +271,11 @@ function Automatic_Server_Connect() {
function
handle_outbound_server_connect
()
{
var
id
;
if
(
!
Outbound_Connect_in_Progress
)
log
(
LOG_DEBUG
,
"
WARNING: Outbound connection while !Outbound_Connect_in_Progress
"
);
Outbound_Connect_in_Progress
=
false
;
if
(
this
.
is_connected
)
{
umode_notice
(
USERMODE_ROUTING
,
"
Routing
"
,
"
Connected! Sending info...
"
);
this
.
send
(
format
(
"
PASS %s :TS
\r\n
"
,
this
.
cline
.
password
));
...
...
@@ -276,7 +292,7 @@ function handle_outbound_server_connect() {
if
(
YLines
[
this
.
cline
.
ircclass
].
connfreq
>
0
&&
parseInt
(
this
.
cline
.
port
)
>
0
)
{
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 %
u
seconds.
"
,
this
.
cline
.
servername
,
this
.
cline
.
host
,
YLines
[
this
.
cline
.
ircclass
].
connfreq
...
...
@@ -1637,8 +1653,9 @@ function IRCClient_do_connect(con_server,con_port) {
if
(
!
con_cline
)
{
this
.
numeric402
(
con_server
);
return
0
;
return
false
;
}
if
(
!
con_port
&&
con_cline
.
port
)
con_port
=
con_cline
.
port
;
if
(
!
con_port
&&
!
con_cline
.
port
)
...
...
@@ -1647,6 +1664,12 @@ function IRCClient_do_connect(con_server,con_port) {
this
.
server_notice
(
"
Invalid port:
"
+
con_port
);
return
false
;
}
if
(
Outbound_Connect_in_Progress
)
{
this
.
server_notice
(
"
Already busy with an outbound connection. CONNECT ignored.
"
);
return
false
;
}
msg
=
format
(
"
CONNECT %s %u from %s [%s@%s]
"
,
con_cline
.
servername
,
con_port
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment