mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +01:00
inspircd: raise NotImplementedError instead of only warning when a CHG* module is missing
This commit is contained in:
parent
92427201f1
commit
7c0d279f61
@ -274,8 +274,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
||||
# It is a client on another server, use CHGIDENT/HOST/NAME.
|
||||
if field == 'IDENT':
|
||||
if 'm_chgident.so' not in self._modsupport:
|
||||
log.warning('(%s) Failed to change ident of %s to %r: load m_chgident.so!', self.name, target, text)
|
||||
return
|
||||
raise NotImplementedError('Cannot change idents as m_chgident.so is not loaded')
|
||||
|
||||
self.users[target].ident = text
|
||||
self._send_with_prefix(self.sid, 'CHGIDENT %s %s' % (target, text))
|
||||
@ -285,8 +284,7 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
||||
{'target': target, 'newident': text}])
|
||||
elif field == 'HOST':
|
||||
if 'm_chghost.so' not in self._modsupport:
|
||||
log.warning('(%s) Failed to change host of %s to %r: load m_chghost.so!', self.name, target, text)
|
||||
return
|
||||
raise NotImplementedError('Cannot change hosts as m_chghost.so is not loaded')
|
||||
|
||||
self.users[target].host = text
|
||||
self._send_with_prefix(self.sid, 'CHGHOST %s %s' % (target, text))
|
||||
@ -296,8 +294,8 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
||||
|
||||
elif field in ('REALNAME', 'GECOS'):
|
||||
if 'm_chgname.so' not in self._modsupport:
|
||||
log.warning('(%s) Failed to change real name of %s to %r: load m_chgname.so!', self.name, target, text)
|
||||
return
|
||||
raise NotImplementedError('Cannot change real names as m_chgname.so is not loaded')
|
||||
|
||||
self.users[target].realname = text
|
||||
self._send_with_prefix(self.sid, 'CHGNAME %s :%s' % (target, text))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user