#NEWLINE# @ internationalizeDocstring #NEWLINE# def networks( self , irc , msg , args , opts ) : #NEWLINE# #INDENT# '[--all]\n\n        Returns the networks to which the bot is currently connected.\n        If --all is given, also includes networks known by the bot,\n        but not connected to.\n        ' #NEWLINE# opts = dict ( irc ) #NEWLINE# L = [ ( '%s: %s' % ( ircd . network , ircd . server ) ) for ircd in world . ircs ] #NEWLINE# if ( 'all' in opts ) : #NEWLINE# #INDENT# for net in conf . supybot . networks . _children . keys ( ) : #NEWLINE# #INDENT# if ( net not in [ ircd . network for ircd in world . ircs ] ) : #NEWLINE# #INDENT# L . append ( ( '%s: (%s)' % ( net , _ ( 'disconnected' ) ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# utils . sortBy ( str . lower , L ) #NEWLINE# irc . reply ( format ( '%L' , L ) )