diff --git a/core/irc.py b/core/irc.py index 50ff379..8a89af2 100755 --- a/core/irc.py +++ b/core/irc.py @@ -184,9 +184,13 @@ class IRC(object): def join(self, channel): self.cmd("JOIN", [channel]) - + if channel not in self.channels: + self.channels.append(channel) + def part(self, channel): self.cmd("PART", [channel]) + if channel in self.channels: + self.channels.remove(channel) def msg(self, target, text): self.cmd("PRIVMSG", [target, text])