mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +01:00
inspircd: new use_experimental_whois option, which forces PyLink to handle WHOIS requests locally
This commit is contained in:
parent
57afa806e3
commit
f458a40e1c
@ -120,6 +120,13 @@ servers:
|
||||
# This setting defaults to sha256.
|
||||
#ssl_fingerprint_type: sha256
|
||||
|
||||
# The following option is specific to InspIRCd networks:
|
||||
|
||||
# Force PyLink to handle WHOIS requests locally for all its clients
|
||||
# (experimental). This is required if you want custom WHOIS handlers
|
||||
# implemented by plugins like relay to work. Defaults to false.
|
||||
#use_experimental_whois: false
|
||||
|
||||
ts6net:
|
||||
ip: ::1
|
||||
|
||||
@ -374,13 +381,15 @@ relay:
|
||||
show_ips: false
|
||||
|
||||
# Determines whether NickServ login info should be shown in the /whois output for
|
||||
# relay users. This works on most IRCds EXCEPT InspIRCd.
|
||||
# relay users. For InspIRCd networks, this requires "use_experimental_whois" to be
|
||||
# set.
|
||||
# Valid options include "all" (show this to everyone), "opers" (show only to
|
||||
# opers), and "none" (disabled). Defaults to none if not specified.
|
||||
whois_show_accounts: all
|
||||
|
||||
# Determines whether the origin server should be shown in the /whois output for
|
||||
# relay users. This works on most IRCds EXCEPT InspIRCd.
|
||||
# relay users. For InspIRCd networks, this requires "use_experimental_whois" to be
|
||||
# set.
|
||||
# Valid options include "all" (show this to everyone), "opers" (show only to
|
||||
# opers), and "none" (disabled). Defaults to none if not specified.
|
||||
whois_show_server: opers
|
||||
|
@ -607,7 +607,14 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
||||
# -> :1MLAAAAIG IDLE 70MAAAAAA 1433036797 319
|
||||
sourceuser = numeric
|
||||
targetuser = args[0]
|
||||
self._send(targetuser, 'IDLE %s %s 0' % (sourceuser, self.irc.users[targetuser].ts))
|
||||
|
||||
if self.irc.serverdata.get("use_experimental_whois"):
|
||||
# EXPERIMENTAL HACK: make PyLink handle all WHOIS requests if configured to do so.
|
||||
# This works by silently ignoring the idle time request, and sending our WHOIS data as
|
||||
# raw numerics instead.
|
||||
return {'target': args[0], 'parse_as': 'WHOIS'}
|
||||
else:
|
||||
self._send(targetuser, 'IDLE %s %s 0' % (sourceuser, self.irc.users[targetuser].ts))
|
||||
|
||||
def handle_ftopic(self, numeric, command, args):
|
||||
"""Handles incoming FTOPIC (sets topic on burst)."""
|
||||
|
Loading…
Reference in New Issue
Block a user