Add get_user_status func to IRCChannel

This commit is contained in:
jesopo 2017-01-27 21:39:51 +00:00
parent facd9d69cb
commit ec4036a501
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3

View file

@ -75,3 +75,10 @@ class Channel(object):
if nickname.lower() in self.modes.get(mode, []): if nickname.lower() in self.modes.get(mode, []):
return True return True
return False return False
def get_user_status(self, nickname):
modes = ""
for mode in self.server.mode_prefixes.values():
if nickname.lower() in self.modes.get(mode, []):
modes += mode
return modes