From cb368439cf91b31ccac39740424fa6055d98df7f Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 12 Jul 2017 08:28:32 -0700 Subject: [PATCH] inspircd: bring back extended WHOIS replies via a force_whois_extensions option --- example-conf.yml | 4 ++++ protocols/inspircd.py | 3 +++ 2 files changed, 7 insertions(+) diff --git a/example-conf.yml b/example-conf.yml index 452432e..2d31130 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -214,6 +214,10 @@ servers: # This setting is EXPERIMENTAL as of PyLink 1.2.x. #encoding: utf-8 + # InspIRCd specific option: determines whether we should display WHOIS extensions by overriding + # InspIRCd's default WHOIS formatting. This defaults to true for consistency with PyLink 1.x. + #force_whois_extensions: true + ts6net: ip: ::1 diff --git a/protocols/inspircd.py b/protocols/inspircd.py index af83680..dee673b 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -613,6 +613,9 @@ class InspIRCdProtocol(TS6BaseProtocol): # <- :70MAAAAAA IDLE 1MLAAAAIG # -> :1MLAAAAIG IDLE 70MAAAAAA 1433036797 319 + if self.serverdata.get('force_whois_extensions', True): + return {'target': args[0], 'parse_as': 'WHOIS'} + # Allow hiding the startup time if set to do so (if both idle and signon time is 0, InspIRCd omits # showing this line). target = args[0]