From 5422ca830c2d5f2845c837cccf00a42f4e310fa6 Mon Sep 17 00:00:00 2001 From: Joe Robinson Date: Wed, 19 Apr 2017 12:25:54 +0100 Subject: Improve user handling, fixes crash bug on /parts --- User.py | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 User.py (limited to 'User.py') diff --git a/User.py b/User.py new file mode 100644 index 0000000..9ad3eeb --- /dev/null +++ b/User.py @@ -0,0 +1,43 @@ +class User(): + + def __init__(self): + self.nick = "" + self.mode = "" + self.host = "" + self.real_name = "" + + def __init__(self, nick, mode, host, real_name): + self.nick = nick + self.mode = mode + self.host = host + self.real_name = real_name + + def __init__(self, nick, mode): + self.nick = nick + self.mode = mode + self.host = "" + self.real_name = "" + + def get_nick(self): + return self.nick + + def set_nick(self, nick): + self.nick = nick + + def get_mode(self): + return self.mode + + def set_host(self, mode): + self.mode = mode + + def get_host(self): + return self.host + + def set_host(self, host): + self.host = host + + def get_real_name(self): + return self.real_name + + def set_real_name(self, host): + self.real_name = real_name -- cgit v1.2.3