parameters: (self, to=None)
docstring: Send a massive stanza with the whole game list.
  
          If no target is passed the gamelist is broadcasted to all
          clients.
  
          Arguments:
              to (sleekxmpp.jid.JID): Player to send the game list to.
                  If None, the game list will be broadcasted
docstring_summary: Send a massive stanza with the whole game list.
docstring_tokens: Send a massive stanza with the whole game list .
function: def _send_game_list(self, to=None):
          """Send a massive stanza with the whole game list.
  
          If no target is passed the gamelist is broadcasted to all
          clients.
  
          Arguments:
              to (sleekxmpp.jid.JID): Player to send the game list to.
                  If None, the game list will be broadcasted
          """
          games = self.games.get_all_games()
  
          stanza = GameListXmppPlugin()
          for jid in games:
              stanza.add_game(games[jid])
  
          if not to:
              for nick in self.plugin['xep_0045'].getRoster(self.room):
                  if nick == self.nick:
                      continue
                  jid_str = self.plugin['xep_0045'].getJidProperty(self.room, nick, 'jid')
                  jid = sleekxmpp.jid.JID(jid_str)
                  iq = self.make_iq_result(ito=jid)
                  iq.set_payload(stanza)
                  try:
                      iq.send(block=False)
                  except Exception:
                      logging.exception("Failed to send game list to %s", jid)
          else:
              iq = self.make_iq_result(ito=to)
              iq.set_payload(stanza)
              try:
                  iq.send(block=False)
              except Exception:
                  logging.exception("Failed to send game list to %s", to)
function_tokens: def _send_game_list ( self , to = None ) : games = self . games . get_all_games ( ) stanza = GameListXmppPlugin ( ) for jid in games : stanza . add_game ( games [ jid ] ) if not to : for nick in self . plugin [ 'xep_0045' ] . getRoster ( self . room ) : if nick == self . nick : continue jid_str = self . plugin [ 'xep_0045' ] . getJidProperty ( self . room , nick , 'jid' ) jid = sleekxmpp . jid . JID ( jid_str ) iq = self . make_iq_result ( ito = jid ) iq . set_payload ( stanza ) try : iq . send ( block = False ) except Exception : logging . exception ( "Failed to send game list to %s" , jid ) else : iq = self . make_iq_result ( ito = to ) iq . set_payload ( stanza ) try : iq . send ( block = False ) except Exception : logging . exception ( "Failed to send game list to %s" , to )