mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
relay: fix incorrect in-place changes of modedelta modes
This caused the database to be filled with extraneous "-modename" entries when removing modes from the previous modedelta.
This commit is contained in:
parent
61d559926f
commit
bf9eb8d4ea
@ -2847,7 +2847,8 @@ def modedelta(irc, source, args):
|
||||
|
||||
if modes:
|
||||
old_modes = db[relay].get('modedelta', [])
|
||||
db[relay]['modedelta'] = target_modes = modes
|
||||
db[relay]['modedelta'] = modes
|
||||
target_modes = modes.copy()
|
||||
log.debug('channel: %s', str(channel))
|
||||
irc.reply('Set the mode delta for \x02%s\x02 to: %s' % (channel, modes))
|
||||
else: # No modes given, so show the list.
|
||||
@ -2867,8 +2868,7 @@ def modedelta(irc, source, args):
|
||||
continue
|
||||
|
||||
remote_modes = []
|
||||
# For each leaf channel, unset the old mode delta and set the new one
|
||||
# if applicable.
|
||||
# For each leaf channel, unset the old mode delta and set the new one if applicable.
|
||||
log.debug('(%s) modedelta target modes for %s/%s: %s', irc.name, remotenet, remotechan, target_modes)
|
||||
for modepair in target_modes:
|
||||
modeprefix = modepair[0][0]
|
||||
|
Loading…
Reference in New Issue
Block a user