From 2b324203e7701ac1dd83e9879de2543e348f1499 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 9 Dec 2014 18:32:31 -0800 Subject: [PATCH 1/3] Network: changes to the 'whois' output formatting --- plugins/Network/plugin.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/plugins/Network/plugin.py b/plugins/Network/plugin.py index 8fd6f6115..702414ff3 100644 --- a/plugins/Network/plugin.py +++ b/plugins/Network/plugin.py @@ -211,13 +211,13 @@ class Network(callbacks.Plugin): # The user is in a channel the bot is in, so the ircd may have # responded with otherwise private data. if chan: - # Skip channels the callee isn't in. This helps prevents - # us leaking information when the channel is +s or the - # target is +i + # Skip channels the callee isn't in. This prevents + # us from leaking information when the channel is +s or the + # target is +i. if replyMsg.nick not in chan.users: continue # Skip +s channels the target is in only if the reply isn't - # being sent to that channel + # being sent to that channel. if 's' in chan.modes and \ not ircutils.strEqual(replyMsg.args[0], channel): continue @@ -243,7 +243,8 @@ class Network(callbacks.Plugin): L.append(format(_('is on %L'), normal)) else: if command == 'whois': - L = [_('isn\'t on any non-secret channels or has channel list hiding umode')] + L = [_('isn\'t on any non-secret channels or is using a ' + 'channel-list hiding umode.')] else: L = [] channels = format('%L', L) @@ -272,11 +273,11 @@ class Network(callbacks.Plugin): else: identify = '' if command == 'whois': - s = _('%s (%s) has been%s on server %s since %s (idle for %s) and ' + s = _('%s (%s) has been%s on server %s since %s (idle for %s). %s ' '%s.%s') % (user, hostmask, identify, server, - signon, idle, channels, away) + signon, idle, nick, channels, away) else: - s = _('%s (%s) has been%s on server %s and disconnect on %s.') % \ + s = _('%s (%s) has been%s on server %s and disconnected on %s.') % \ (user, hostmask, identify, server, signoff) replyIrc.reply(s) del self._whois[(irc, loweredNick)] From 2628dc03c4743578f2b8e7320b7b4f5e4e715167 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 9 Dec 2014 18:38:21 -0800 Subject: [PATCH 2/3] Network: More minor improvements to 'whois' output --- plugins/Network/plugin.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Network/plugin.py b/plugins/Network/plugin.py index 702414ff3..a89b77d42 100644 --- a/plugins/Network/plugin.py +++ b/plugins/Network/plugin.py @@ -262,7 +262,7 @@ class Network(callbacks.Plugin): else: server = _('') if '301' in d: - away = ' %s is away: %s.' % (nick, d['301'].args[2]) + away = ' %s is away: %s.' % (nick, d['301'].args[2]) else: away = '' if '320' in d: @@ -291,9 +291,9 @@ class Network(callbacks.Plugin): (replyIrc, replyMsg, d, command) = self._whois[(irc, loweredNick)] del self._whois[(irc, loweredNick)] if command == 'whois': - template = _('There is no %s on %s.') + template = _('There is no user %s on %s.') else: - template = _('There was no %s on %s.') + template = _('There was no user %s on %s.') s = template % (nick, irc.network) replyIrc.reply(s) do401 = do402 From ef9fbc4a07db1c18ea5d805f0b4770cc17b152d8 Mon Sep 17 00:00:00 2001 From: GLolol Date: Tue, 9 Dec 2014 22:40:29 -0800 Subject: [PATCH 3/3] Network: s/caller/callee/ --- plugins/Network/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Network/plugin.py b/plugins/Network/plugin.py index a89b77d42..e5d0f882c 100644 --- a/plugins/Network/plugin.py +++ b/plugins/Network/plugin.py @@ -211,7 +211,7 @@ class Network(callbacks.Plugin): # The user is in a channel the bot is in, so the ircd may have # responded with otherwise private data. if chan: - # Skip channels the callee isn't in. This prevents + # Skip channels the caller isn't in. This prevents # us from leaking information when the channel is +s or the # target is +i. if replyMsg.nick not in chan.users: