diff --git a/irc.py b/irc.py index 0f5ecf8..397b3f1 100644 --- a/irc.py +++ b/irc.py @@ -385,7 +385,9 @@ class PesterHandler(DefaultCommandHandler): modes = list(self.parent.mainwindow.modes) if modes and modes[0] == "+": modes = modes[1:] if mode[0] == "+": - modes.extend(mode[1:]) + for m in mode[1:]: + if m not in modes: + modes.extend(m) elif mode[0] == "-": for i in mode[1:]: try: diff --git a/memos.py b/memos.py index d14453a..6818826 100644 --- a/memos.py +++ b/memos.py @@ -616,7 +616,9 @@ class PesterMemo(PesterConvo): if chanmodes and chanmodes[0] == "+": chanmodes = chanmodes[1:] modes = str(modes) if modes[0] == "+": - chanmodes.extend(modes[1:]) + for m in modes[1:]: + if m not in chanmodes: + chanmodes.extend(m) if modes.find("s") >= 0: self.chanHide.setChecked(True) if modes.find("i") >= 0: self.chanInvite.setChecked(True) if modes.find("m") >= 0: self.chanMod.setChecked(True)