mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 13:09:23 +01:00
plugins: migrate to server capabilities
This commit is contained in:
parent
ad00fdfa53
commit
f188b29911
@ -108,7 +108,7 @@ def showchan(irc, source, args):
|
||||
if c.topic:
|
||||
f('\x02Channel topic\x02: %s' % c.topic)
|
||||
|
||||
if irc.protoname != 'clientbot':
|
||||
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))
|
||||
|
||||
|
@ -204,7 +204,7 @@ def rpm(irc, source, args):
|
||||
return
|
||||
|
||||
relay = world.plugins.get('relay')
|
||||
if irc.protoname != 'clientbot':
|
||||
if irc.proto.hasCap('can-spawn-clients'):
|
||||
irc.error('This command is only supported on Clientbot networks. Try /msg %s <text>' % target)
|
||||
return
|
||||
elif relay is None:
|
||||
|
@ -78,7 +78,7 @@ def _map(irc, source, args, show_relay=True):
|
||||
# This is a relay server - display the remote map of the network it represents
|
||||
relay_server = serverlist[leaf].remote
|
||||
remoteirc = world.networkobjects[relay_server]
|
||||
if remoteirc.protoname != 'clientbot':
|
||||
if remoteirc.proto.hasCap('can-track-servers'):
|
||||
# Only ever show relay subservers once - this prevents infinite loops.
|
||||
showall(remoteirc, remoteirc.sid, hops=hops, is_relay_server=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user