3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-02-02 23:54:08 +01:00

commands: show TS on networks without has-ts as well

This commit is contained in:
James Lu 2017-04-09 14:52:44 -07:00
parent bf1d7812e2
commit 709b1d2ead

View File

@ -108,9 +108,9 @@ def showchan(irc, source, args):
if c.topic: if c.topic:
f('\x02Channel topic\x02: %s' % c.topic) f('\x02Channel topic\x02: %s' % c.topic)
if irc.proto.hasCap('has-ts'): # Mark TS values as untrusted on Clientbot and others (where TS is read-only or not trackable)
# Clientbot-specific hack: don't show channel TS because it's not properly tracked. f('\x02Channel creation time\x02: %s (%s)%s' % (ctime(c.ts), c.ts,
f('\x02Channel creation time\x02: %s (%s)' % (ctime(c.ts), c.ts)) ' [UNTRUSTED]' if not irc.proto.hasCap('has-ts') else ''))
# Show only modes that aren't list-style modes. # Show only modes that aren't list-style modes.
modes = irc.joinModes([m for m in c.modes if m[0] not in irc.cmodes['*A']], sort=True) modes = irc.joinModes([m for m in c.modes if m[0] not in irc.cmodes['*A']], sort=True)