class Channel(): def __init__(self): self.name = "" self.topic = "" self.users = {} self.modes = list() def __init__(self, name, topic, userlist, modes): self.name = name self.topic = topic users = userlist.split(" ") self.users = {} self.modes = list() def __init__(self, name): self.name = name self.topic = "" self.users = {} self.modes = list() def get_name(self): return self.name def set_name(self, name): self.name = name def get_topic(self): return self.topic def set_topic(self, topic): self.topic = topic def get_users(self): return self.users def set_users(self, users): for user in users: self.users[user.get_nick()] = user def add_user(self, user): self.users[user.get_nick()] = user def remove_user(self, nick): del(self.users[nick]) def get_view(self): return self.view def set_view(self, view): self.view = view