mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 14:49:28 +01:00
commands: show topic only if it exists, disable TS output on clientbot
This commit is contained in:
parent
0fc0f104bd
commit
197d9fc14a
@ -88,8 +88,13 @@ def showchan(irc, source, args):
|
|||||||
nicks = [irc.users[u].nick for u in c.users]
|
nicks = [irc.users[u].nick for u in c.users]
|
||||||
|
|
||||||
f('Information on channel \x02%s\x02:' % channel)
|
f('Information on channel \x02%s\x02:' % channel)
|
||||||
|
if c.topic:
|
||||||
f('\x02Channel topic\x02: %s' % 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))
|
f('\x02Channel creation time\x02: %s (%s)' % (ctime(c.ts), c.ts))
|
||||||
|
|
||||||
# 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)
|
||||||
f('\x02Channel modes\x02: %s' % modes)
|
f('\x02Channel modes\x02: %s' % modes)
|
||||||
|
Loading…
Reference in New Issue
Block a user