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
Compare Revisions
485440f1ea548f7362b26dbcf82a6e702ccc5f98...d062af234c864bbaff9e1011c8cec9f9dcf369a4
Commits (1)
Only purge queue on connection reset. Clean up user QUIT a bit.
· d062af23
Randy Sommerfeld
authored
May 28, 2021
d062af23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
exec/load/ircd/core.js
exec/load/ircd/core.js
+3
-0
exec/load/ircd/user.js
exec/load/ircd/user.js
+10
-8
No files found.
exec/load/ircd/core.js
View file @
d062af23
...
...
@@ -487,6 +487,9 @@ function ircout(str) {
/* this = socket object passed from sock.on() */
function
Socket_Recv
()
{
if
(
!
this
.
is_connected
)
{
/* We purge the queue and send immediately */
this
.
irc
.
recvq
.
purge
();
this
.
irc
.
sendq
.
purge
();
this
.
irc
.
quit
(
"
Connection reset by peer.
"
);
return
1
;
}
...
...
exec/load/ircd/user.js
View file @
d062af23
...
...
@@ -1496,8 +1496,7 @@ function User_Quit(str,suppress_bcast,is_netsplit,origin) {
var
ww_serverdesc
=
ServerDesc
;
var
tmp
=
"
QUIT :
"
+
str
;
this
.
bcast_to_uchans_unique
(
tmp
);
this
.
bcast_to_uchans_unique
(
format
(
"
QUIT :%s
"
,
str
));
for
(
i
in
this
.
channels
)
{
this
.
rmchan
(
this
.
channels
[
i
]);
}
...
...
@@ -1510,8 +1509,14 @@ function User_Quit(str,suppress_bcast,is_netsplit,origin) {
WhoWas
[
nick_uc
]
=
new
Array
;
var
ww
=
WhoWas
[
nick_uc
];
var
ptr
=
ww
.
unshift
(
new
WhoWasObj
(
this
.
nick
,
this
.
uprefix
,
this
.
hostname
,
this
.
realname
,
this
.
servername
,
ww_serverdesc
))
-
1
;
var
ptr
=
ww
.
unshift
(
new
WhoWasObj
(
this
.
nick
,
this
.
uprefix
,
this
.
hostname
,
this
.
realname
,
this
.
servername
,
ww_serverdesc
))
-
1
;
WhoWasMap
.
unshift
(
ww
[
ptr
]);
if
(
WhoWasMap
.
length
>
MAX_WHOWAS
)
{
...
...
@@ -1523,12 +1528,9 @@ function User_Quit(str,suppress_bcast,is_netsplit,origin) {
}
if
(
!
suppress_bcast
)
this
.
bcast_to_servers
(
tmp
);
this
.
bcast_to_servers
(
format
(
"
QUIT :%s
"
,
str
)
);
if
(
this
.
local
)
{
/* We purge the queue and send immediately */
this
.
recvq
.
purge
();
this
.
sendq
.
purge
();
if
(
this
.
socket
.
is_connected
)
{
this
.
socket
.
send
(
format
(
"
ERROR :Closing Link: [%s@%s] (%s)
\r\n
"
,
this
.
uprefix
,
...
...