Don't try to add new users if we're changing usermodes on ourselves.
The actor in this case will either be ourself (in which case users.Bot already exists), or a services nick (which may not have a full hostmask, and therefore cause hashing errors). Only try to add a user if we're changing a channel mode. This may still break on chanmodes, needs more testing in that regard.
This commit is contained in:
parent
08a81fbc09
commit
6d401fd461
@ -316,11 +316,11 @@ def mode_change(cli, rawnick, chan, mode, *targets):
|
||||
|
||||
"""
|
||||
|
||||
actor = users._add(cli, nick=rawnick) # FIXME
|
||||
if chan == users.Bot.nick: # we only see user modes set to ourselves
|
||||
users.Bot.modes.update(mode)
|
||||
return
|
||||
|
||||
actor = users._add(cli, nick=rawnick) # FIXME
|
||||
target = channels.add(chan, cli)
|
||||
target.queue("mode_change", {"mode": mode, "targets": targets}, (var, actor, target))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user