raw
9991-improved-log...    1 import os
9991-improved-log... 2
genesis 3 class Channel(object):
genesis 4 def __init__(self, server, name):
genesis 5 self.server = server
genesis 6 self.name = name
genesis 7 self.members = set()
genesis 8
genesis 9 def add_member(self, client):
genesis 10 self.members.add(client)
genesis 11
genesis 12 def remove_client(self, client):
genesis 13 self.members.discard(client)
genesis 14 if not self.members:
genesis 15 self.server.remove_channel(self)