Some extra methods for ChannelState; code should now use these methods instead of directly accessing .{ops,voices,halfops}.

This commit is contained in:
Jeremy Fincher 2004-11-30 04:43:09 +00:00
parent 54b56a8a53
commit e24943b0c7
1 changed files with 7 additions and 0 deletions

View File

@ -233,6 +233,13 @@ class ChannelState(object):
self.halfops = ircutils.IrcSet()
self.modes = ircutils.IrcDict()
def isOp(self, nick):
return nick in self.ops
def isVoice(self, nick):
return nick in self.voices
def isHalfop(self, nick):
return nick in self.halfops
def addUser(self, user):
"Adds a given user to the ChannelState. Power prefixes are handled."
nick = user.lstrip('@%+')