From 166a8206a3747628182a97acbc25bf393e78eac9 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Sat, 15 Apr 2017 16:08:40 +0200 Subject: Handle joining of channels, tab UI, probably some other things --- Channel.py | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Channel.py (limited to 'Channel.py') diff --git a/Channel.py b/Channel.py new file mode 100644 index 0000000..1729c4e --- /dev/null +++ b/Channel.py @@ -0,0 +1,50 @@ +class Channel(): + + def __init__(self): + self.name = "" + self.topic = "" + self.users = list() + self.modes = list() + + def __init__(self, name, topic, userlist, modes): + self.name = name + self.topic = topic + users = userlist.split(" ") + self.users = list(users) + self.modes = list() + + def __init__(self, name): + self.name = name + self.topic = "" + self.users = list() + self.modes = list() + + def get_name(self): + return self.name + + def set_name(name): + self.name = name + + def get_topic(): + return self.topic + + def set_topic(topic): + self.topic = topic + + def get_users(self): + return self.users + + def set_users(self, users): + self.users = users + + def add_user(user): + self.users.append(user) + + def remove_user(user): + self.users.delete(user) + + def get_view(self): + return self.view + + def set_view(self, view): + self.view = view -- cgit v1.2.3