diff --git a/protocols/ts6.py b/protocols/ts6.py index d14ff26..571f77c 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -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. diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index 2364030..56289a2 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -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])} diff --git a/protocols/unreal.py b/protocols/unreal.py index b87786e..8f1f3d3 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -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