diff options
author | Joe Robinson <joe@lc8n.com> | 2017-04-15 16:08:40 +0200 |
---|---|---|
committer | Joe Robinson <joe@lc8n.com> | 2017-04-15 16:08:40 +0200 |
commit | 166a8206a3747628182a97acbc25bf393e78eac9 (patch) | |
tree | 7725fbfd060ed4ac0e6ec698ab2eb20199b699b5 /Channel.py | |
parent | cb1429328b11e1acef99e4c5730e55e3384b19fd (diff) |
Handle joining of channels, tab UI, probably some other things
Diffstat (limited to 'Channel.py')
-rw-r--r-- | Channel.py | 50 |
1 files changed, 50 insertions, 0 deletions
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 |