Moved the networks command here from the Relay plugin.

This commit is contained in:
Jeremy Fincher 2004-08-23 12:14:37 +00:00
parent f467550400
commit 1c5faf37b2
1 changed files with 9 additions and 0 deletions

View File

@ -573,6 +573,15 @@ class Misc(callbacks.Privmsg):
text = privmsgs.getArgs(args)
irc.reply(text, notice=True)
def networks(self, irc, msg, args):
"""takes no arguments
Returns the networks to which the bot is currently connected.
"""
L = ['%s: %s' % (irc.network, irc.server) for irc in world.ircs]
utils.sortBy(str.lower, L)
irc.reply(utils.commaAndify(L))
Class = Misc