From ec4036a501fb5f9c3dd958da2af3bbb30bfafd9f Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 27 Jan 2017 21:39:51 +0000 Subject: [PATCH] Add get_user_status func to IRCChannel --- IRCChannel.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/IRCChannel.py b/IRCChannel.py index 14de133f..3ecfb110 100644 --- a/IRCChannel.py +++ b/IRCChannel.py @@ -75,3 +75,10 @@ class Channel(object): if nickname.lower() in self.modes.get(mode, []): return True 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