mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-20 09:04:36 +01:00
Some extra methods for ChannelState; code should now use these methods instead of directly accessing .{ops,voices,halfops}.
This commit is contained in:
parent
54b56a8a53
commit
e24943b0c7
@ -233,6 +233,13 @@ class ChannelState(object):
|
|||||||
self.halfops = ircutils.IrcSet()
|
self.halfops = ircutils.IrcSet()
|
||||||
self.modes = ircutils.IrcDict()
|
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):
|
def addUser(self, user):
|
||||||
"Adds a given user to the ChannelState. Power prefixes are handled."
|
"Adds a given user to the ChannelState. Power prefixes are handled."
|
||||||
nick = user.lstrip('@%+')
|
nick = user.lstrip('@%+')
|
||||||
|
Loading…
Reference in New Issue
Block a user