mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
protect_and_chanowner_in_unrealircd
Add protectet users (&) und the channelowner (~) used in unrealircd to the ops list.
This commit is contained in:
parent
e5be124e5a
commit
cbb5b7aaa2
@ -248,13 +248,13 @@ class ChannelState(object):
|
|||||||
|
|
||||||
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('@%+&~')
|
||||||
if not nick:
|
if not nick:
|
||||||
return
|
return
|
||||||
while user and user[0] in '@%+':
|
while user and user[0] in '@%+&~':
|
||||||
(marker, user) = (user[0], user[1:])
|
(marker, user) = (user[0], user[1:])
|
||||||
assert user, 'Looks like my caller is passing chars, not nicks.'
|
assert user, 'Looks like my caller is passing chars, not nicks.'
|
||||||
if marker == '@':
|
if marker in '@&~':
|
||||||
self.ops.add(nick)
|
self.ops.add(nick)
|
||||||
elif marker == '%':
|
elif marker == '%':
|
||||||
self.halfops.add(nick)
|
self.halfops.add(nick)
|
||||||
|
Loading…
Reference in New Issue
Block a user