Skip to content

Commit c18c62d

Browse files
committed
better quit handling
1 parent f9e5a10 commit c18c62d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ function unsubscribe() {
131131
UNSUBBED=true
132132
debug "pipe: closed: $SUBSCRIPTION"
133133
[[ ! -z "$SUBSCRIPTION" ]] && rm -f "$SUBSCRIPTION"
134+
printf "%s\r\n" ":$NICK!$USER@$IRC_SERVER_HOST QUIT :$QUIT_MESSAGE" | broadcast
134135
query 'DELETE FROM conns WHERE id = ?;' "$CONN_ID"
135136
rm -rf "$HEARTBEAT"
136137
}
@@ -346,8 +347,6 @@ else
346347
fi
347348
;;
348349
QUIT)
349-
QUIT_MESSAGE="${arr[*]#:}"
350-
printf "%s\r\n" ":$NICK!$USER@$IRC_SERVER_HOST QUIT :$QUIT_MESSAGE" | broadcast
351350
exit 0
352351
;;
353352
PART)

0 commit comments

Comments
 (0)