mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-20 15:41:09 +01:00
Add support for UltimateIRCd's ! (protected) user mode.
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
927c8c963a
commit
56ba12aa4b
@ -251,15 +251,16 @@ class ChannelState(utils.python.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
|
||||||
# & is used to denote protected users in UnrealIRCd
|
# & is used to denote protected users in UnrealIRCd
|
||||||
# ~ is used to denote channel owner in UnrealIRCd
|
# ~ is used to denote channel owner in UnrealIRCd
|
||||||
while user and user[0] in '@%+&~':
|
# ! is used to denote protected users in UltimateIRCd
|
||||||
|
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 in '@&~':
|
if marker in '@&~!':
|
||||||
self.ops.add(nick)
|
self.ops.add(nick)
|
||||||
elif marker == '%':
|
elif marker == '%':
|
||||||
self.halfops.add(nick)
|
self.halfops.add(nick)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user