Skip to content

Commit

Permalink
Maybe fix a user tracking issue on /quit
Browse files Browse the repository at this point in the history
No idea if this actually works or not, but it's the only thing I can
think of that looked off.
  • Loading branch information
skizzerz committed Mar 12, 2024
1 parent af75272 commit 974fa4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,10 @@ def on_quit(cli, rawnick, reason):
"""

user = users.get(rawnick, allow_bot=True, update=True)
user.disconnected = True
Event("server_quit", {}).dispatch(user, reason)

# removing the user from all channels marks them as a ghost if they're playing,
# so doing that explicitly here is unnecessary
for chan in set(user.channels):
if user is users.Bot:
chan.clear()
Expand Down

0 comments on commit 974fa4a

Please sign in to comment.