irc.py now keeps track of channels properly
This commit is contained in:
parent
4538b67a20
commit
fe2a7b8a3c
1 changed files with 5 additions and 1 deletions
|
@ -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])
|
||||
|
|
Reference in a new issue