mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
p10: implement FAKE and SETHOST IRCd checks
This commit is contained in:
parent
235b296a69
commit
6a32ae94fc
@ -716,6 +716,10 @@ class P10Protocol(IRCS2SProtocol):
|
||||
uobj = self.irc.users[target]
|
||||
|
||||
if self.irc.isInternalClient(target):
|
||||
# Host changing via SETHOST is only supported on nefarious and snircd.
|
||||
if self.irc.serverdata.get('p10_ircd', 'nefarious').lower() not in ('nefarious', 'snircd'):
|
||||
raise NotImplementedError
|
||||
|
||||
# Use SETHOST (umode +h) for internal clients.
|
||||
if field == 'HOST':
|
||||
# Set umode +x, and +h with the given vHost as argument.
|
||||
@ -729,6 +733,10 @@ class P10Protocol(IRCS2SProtocol):
|
||||
else:
|
||||
raise NotImplementedError
|
||||
elif field == 'HOST':
|
||||
# Host changing via FAKE is only supported on nefarious.
|
||||
if self.irc.serverdata.get('p10_ircd', 'nefarious').lower() != 'nefarious':
|
||||
raise NotImplementedError
|
||||
|
||||
# Use FAKE (FA) for external clients.
|
||||
self._send(self.irc.sid, 'FA %s %s' % (target, text))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user