diff --git a/plugins/commands.py b/plugins/commands.py index 2885c41..43f5134 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -88,8 +88,13 @@ def showchan(irc, source, args): nicks = [irc.users[u].nick for u in c.users] f('Information on channel \x02%s\x02:' % channel) - f('\x02Channel topic\x02: %s' % c.topic) - f('\x02Channel creation time\x02: %s (%s)' % (ctime(c.ts), c.ts)) + if c.topic: + f('\x02Channel topic\x02: %s' % c.topic) + + if irc.protoname != 'clientbot': + # 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)) + # 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) f('\x02Channel modes\x02: %s' % modes)