3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

relay: rename checkSendKey -> _check_send_key

This commit is contained in:
James Lu 2017-07-12 07:51:34 -07:00
parent 9a2bff25ee
commit 654df0889d

View File

@ -861,7 +861,7 @@ def handle_relay_whois(irc, source, command, args):
text = '%s %s' % (targetuser.nick, text)
irc.numeric(server, num, source, text)
def checkSendKey(infoline):
def _check_send_key(infoline):
"""
Returns whether we should send the given info line in WHOIS. This validates the
corresponding configuration option for being either "all" or "opers"."""
@ -883,11 +883,11 @@ def handle_relay_whois(irc, source, command, args):
wreply(320, ":is a remote user connected via PyLink Relay. Home network: %s; "
"Home nick: %s" % (netname, realuser.nick))
if checkSendKey('whois_show_accounts') and realuser.services_account:
if _check_send_key('whois_show_accounts') and realuser.services_account:
# Send account information if told to and the target is logged in.
wreply(330, "%s :is logged in (on %s) as" % (realuser.services_account, netname))
if checkSendKey('whois_show_server') and realirc.has_cap('can-track-servers'):
if _check_send_key('whois_show_server') and realirc.has_cap('can-track-servers'):
wreply(320, ":is actually connected via the following server:")
realserver = realirc.get_server(uid)
realserver = realirc.servers[realserver]