mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
formatWhois: fix error and restore formatting changes lost in supybot merge
This reapplies content from commits2b324203e7
,2628dc03c4
,ef9fbc4a07
,41effcea13
, and5f23855d27
.
This commit is contained in:
parent
82b8bf801a
commit
c651bc5482
@ -427,15 +427,15 @@ def formatWhois(irc, replies, caller='', channel='', command='whois'):
|
||||
# The user is in a channel the bot is in, so the ircd may have
|
||||
# responded with otherwise private data.
|
||||
if chanState:
|
||||
# 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 caller isn't in. This prevents
|
||||
# us from leaking information when the channel is +s or the
|
||||
# target is +i.
|
||||
if caller not in chanState.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 chanState.modes and \
|
||||
not ircutils.strEqual(channel or '', chan):
|
||||
not strEqual(channel or '', chan):
|
||||
continue
|
||||
if not modes:
|
||||
normal.append(chan)
|
||||
@ -459,7 +459,7 @@ def formatWhois(irc, replies, caller='', channel='', command='whois'):
|
||||
L.append(format(_('is on %L'), normal))
|
||||
else:
|
||||
if command == 'whois':
|
||||
L = [_('isn\'t on any non-secret channels')]
|
||||
L = [_('isn\'t on any publicly visible channels')]
|
||||
else:
|
||||
L = []
|
||||
channels = format('%L', L)
|
||||
@ -487,11 +487,11 @@ def formatWhois(irc, replies, caller='', channel='', command='whois'):
|
||||
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)
|
||||
return s
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user