mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-23 19:19:31 +01:00
protocols: move handle_whois to ts6_common
This commit is contained in:
parent
6a1349847f
commit
d91589c4da
@ -634,18 +634,6 @@ class TS6Protocol(TS6BaseProtocol):
|
||||
self.irc.applyModes(channel, modes)
|
||||
return {'target': channel, 'modes': modes, 'ts': ts}
|
||||
|
||||
def handle_whois(self, numeric, command, args):
|
||||
"""Handles incoming WHOIS commands.
|
||||
|
||||
Note: The core of WHOIS handling is done by coreplugin.py
|
||||
(IRCd-independent), and not here."""
|
||||
# <- :42XAAAAAB WHOIS 5PYAAAAAA :pylink-devel
|
||||
# First argument is the server that should reply to the WHOIS request
|
||||
# or the server hosting the UID given. We can safely assume that any
|
||||
# WHOIS commands received are for US, since we can't host any servers
|
||||
# behind us to route it to.
|
||||
return {'target': self.irc.nickToUid(args[-1])}
|
||||
|
||||
def handle_472(self, numeric, command, args):
|
||||
"""Handles the incoming 472 numeric.
|
||||
|
||||
|
@ -458,4 +458,15 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
||||
|
||||
def handle_version(self, numeric, command, args):
|
||||
"""Handles requests for the PyLink server version."""
|
||||
return {} # See coreplugin.py for how this hook is used
|
||||
return {} # See coremods/handlers.py for how this hook is used
|
||||
|
||||
def handle_whois(self, numeric, command, args):
|
||||
"""Handles incoming WHOIS commands.."""
|
||||
# <- :42XAAAAAB WHOIS 5PYAAAAAA :pylink-devel
|
||||
|
||||
# First argument is the server that should reply to the WHOIS request
|
||||
# or the server hosting the UID given. We can safely assume that any
|
||||
# WHOIS commands received are for us, since we don't host any real servers
|
||||
# to route it to.
|
||||
|
||||
return {'target': self._getUid(args[-1])}
|
||||
|
@ -773,18 +773,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
return {'channel': channel, 'setter': setter, 'ts': ts, 'text': topic,
|
||||
'oldtopic': oldtopic}
|
||||
|
||||
def handle_whois(self, numeric, command, args):
|
||||
"""Handles WHOIS queries."""
|
||||
# <- :GL WHOIS PyLink-devel :pylink-devel
|
||||
# In this case, the first argument is actually the server that the
|
||||
# WHOIS query is requested from - IRCds should pass these requests on
|
||||
# to the server in question. Since we're a services server, we can just
|
||||
# process it regardless.
|
||||
# The second argument is the ACTUAL nick requested.
|
||||
|
||||
# The actual WHOIS handling is done protocol-independently by coreplugin.
|
||||
return {'target': self._getUid(args[-1])}
|
||||
|
||||
def handle_setident(self, numeric, command, args):
|
||||
"""Handles SETIDENT, used for self ident changes."""
|
||||
# <- :70MAAAAAB SETIDENT test
|
||||
|
Loading…
Reference in New Issue
Block a user