protect_and_chanowner_in_unrealircd

Add protectet users (&) und the channelowner (~) used in unrealircd to the ops list.
This commit is contained in:
Marius Rieder 2005-11-01 04:49:23 +00:00
parent e5be124e5a
commit cbb5b7aaa2
1 changed files with 3 additions and 3 deletions

View File

@ -248,13 +248,13 @@ class ChannelState(object):
def addUser(self, user):
"Adds a given user to the ChannelState. Power prefixes are handled."
nick = user.lstrip('@%+')
nick = user.lstrip('@%+&~')
if not nick:
return
while user and user[0] in '@%+':
while user and user[0] in '@%+&~':
(marker, user) = (user[0], user[1:])
assert user, 'Looks like my caller is passing chars, not nicks.'
if marker == '@':
if marker in '@&~':
self.ops.add(nick)
elif marker == '%':
self.halfops.add(nick)