From 709b1d2eadcb7bfe2a1ed03aec7a5998d4f913d4 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 9 Apr 2017 14:52:44 -0700 Subject: [PATCH] commands: show TS on networks without has-ts as well --- plugins/commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/commands.py b/plugins/commands.py index 654c5b3..a21c5db 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -108,9 +108,9 @@ def showchan(irc, source, args): if c.topic: f('\x02Channel topic\x02: %s' % c.topic) - if irc.proto.hasCap('has-ts'): - # Clientbot-specific hack: don't show channel TS because it's not properly tracked. - f('\x02Channel creation time\x02: %s (%s)' % (ctime(c.ts), c.ts)) + # Mark TS values as untrusted on Clientbot and others (where TS is read-only or not trackable) + f('\x02Channel creation time\x02: %s (%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. modes = irc.joinModes([m for m in c.modes if m[0] not in irc.cmodes['*A']], sort=True)