mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-24 03:04:05 +01:00
Make showing startup time an option (whois_show_startup_time)
This commit is contained in:
parent
adaa6021f9
commit
556c2efb0a
@ -99,7 +99,8 @@ def handle_whois(irc, source, command, args):
|
|||||||
f(335, source, "%s :is a bot" % nick)
|
f(335, source, "%s :is a bot" % nick)
|
||||||
|
|
||||||
# :charybdis.midnight.vpn 317 GL GL 1946 1499867833 :seconds idle, signon time
|
# :charybdis.midnight.vpn 317 GL GL 1946 1499867833 :seconds idle, signon time
|
||||||
f(317, source, "%s 0 %s :seconds idle (placeholder), signon time" % (nick, irc.start_ts))
|
if conf.conf['pylink'].get('whois_show_startup_time', True):
|
||||||
|
f(317, source, "%s 0 %s :seconds idle (placeholder), signon time" % (nick, irc.start_ts))
|
||||||
|
|
||||||
# Call custom WHOIS handlers via the PYLINK_CUSTOM_WHOIS hook, unless the
|
# Call custom WHOIS handlers via the PYLINK_CUSTOM_WHOIS hook, unless the
|
||||||
# caller is marked a bot and the whois_show_extensions_to_bots option is False
|
# caller is marked a bot and the whois_show_extensions_to_bots option is False
|
||||||
|
@ -44,6 +44,10 @@ pylink:
|
|||||||
# accounts for authentication), it is recommended to leave this off.
|
# accounts for authentication), it is recommended to leave this off.
|
||||||
whois_show_extensions_to_bots: false
|
whois_show_extensions_to_bots: false
|
||||||
|
|
||||||
|
# Determines whether PyLink should return the daemon startup time in WHOIS. This defaults
|
||||||
|
# to true if not set.
|
||||||
|
#whois_show_startup_time: true
|
||||||
|
|
||||||
# Determines whether PyLink service clients should protect themselves from
|
# Determines whether PyLink service clients should protect themselves from
|
||||||
# kicks, kills, etc. using IRCd-side servprotect modes. For this to work
|
# kicks, kills, etc. using IRCd-side servprotect modes. For this to work
|
||||||
# properly, this usually requires that PyLink be U-Lined. This defaults to
|
# properly, this usually requires that PyLink be U-Lined. This defaults to
|
||||||
|
@ -613,8 +613,12 @@ class InspIRCdProtocol(TS6BaseProtocol):
|
|||||||
# <- :70MAAAAAA IDLE 1MLAAAAIG
|
# <- :70MAAAAAA IDLE 1MLAAAAIG
|
||||||
# -> :1MLAAAAIG IDLE 70MAAAAAA 1433036797 319
|
# -> :1MLAAAAIG IDLE 70MAAAAAA 1433036797 319
|
||||||
|
|
||||||
|
# Allow hiding the startup time if set to do so (if both idle and signon time is 0, InspIRCd omits
|
||||||
|
# showing this line).
|
||||||
|
start_time = self.start_ts if conf.conf['pylink'].get('whois_show_startup_time', True) else 0
|
||||||
|
|
||||||
# First arg = source, second = signon time, third = idle time
|
# First arg = source, second = signon time, third = idle time
|
||||||
self._send_with_prefix(args[0], 'IDLE %s %s 0' % (source, self.start_ts))
|
self._send_with_prefix(args[0], 'IDLE %s %s 0' % (source, start_time))
|
||||||
|
|
||||||
def handle_ftopic(self, numeric, command, args):
|
def handle_ftopic(self, numeric, command, args):
|
||||||
"""Handles incoming FTOPIC (sets topic on burst)."""
|
"""Handles incoming FTOPIC (sets topic on burst)."""
|
||||||
|
Loading…
Reference in New Issue
Block a user