3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

ircs2s_common: handle 'netadmin' umodes as an oper type

Also, make the Network Service opertype take precedence over the others.
This commit is contained in:
James Lu 2017-07-20 20:03:32 +08:00
parent d707c243f4
commit 63f52ca8b0

View File

@ -579,10 +579,12 @@ class IRCS2SProtocol(IRCCommonProtocol):
def _check_oper_status_change(self, uid, modes):
if uid in self.users:
u = self.users[uid]
if 'admin' in self.umodes and (self.umodes['admin'], None) in u.modes:
opertype = 'Server Administrator'
elif 'servprotect' in self.umodes and (self.umodes['servprotect'], None) in u.modes:
if 'servprotect' in self.umodes and (self.umodes['servprotect'], None) in u.modes:
opertype = 'Network Service'
elif 'netadmin' in self.umodes and (self.umodes['netadmin'], None) in u.modes:
opertype = 'Network Administrator'
elif 'admin' in self.umodes and (self.umodes['admin'], None) in u.modes:
opertype = 'Server Administrator'
else:
opertype = 'IRC Operator'