Ticket #2491: global-XMPP-receive-v2.diff
File global-XMPP-receive-v2.diff, 5.2 KB (added by , 10 years ago) |
---|
-
binaries/data/mods/public/gui/session/session.js
435 435 436 436 // Clear renamed entities list 437 437 Engine.GuiInterfaceCall("ClearRenamedEntities"); 438 439 // If the lobby is running, wake it up every 10 seconds so we stay connected.440 if (Engine.HasXmppClient() && (Date.now() - lastXmppClientPoll) > 10000)441 {442 Engine.RecvXmppClient();443 lastXmppClientPoll = Date.now();444 }445 438 } 446 439 447 440 function checkPlayerState() -
binaries/data/mods/public/gui/lobby/lobby.js
446 446 447 447 function onTick() 448 448 { 449 // Wake up XmppClient450 Engine.RecvXmppClient();451 452 449 updateTimers(); 453 450 checkSpamMonitor(); 454 451 -
binaries/data/mods/public/gui/lobby/prelobby.js
138 138 // The XmppClient has been created, we are waiting 139 139 // to be connected or to receive an error. 140 140 141 //Wake up XmppClient142 Engine.RecvXmppClient();143 144 141 //Receive messages 145 142 while (true) 146 143 { -
binaries/data/mods/public/gui/gamesetup/gamesetup.js
704 704 handleNetMessage(message); 705 705 } 706 706 } 707 708 // If the lobby is running, wake it up every 10 seconds so we stay connected.709 if (Engine.HasXmppClient() && (Date.now() - lastXmppClientPoll) > 10000)710 {711 Engine.RecvXmppClient();712 lastXmppClientPoll = Date.now();713 }714 707 } 715 708 716 709 // Called when user selects number of players -
source/lobby/XmppClient.cpp
22 22 #include "lib/utf8.h" 23 23 24 24 // Debug 25 // TODO: Use builtin error/warning/logging functions.26 #include <iostream>27 25 #include "ps/CLogger.h" 28 26 29 27 // Gloox -
source/lobby/scripting/JSInterface_Lobby.cpp
80 80 g_XmppClient->disconnect(); 81 81 } 82 82 83 void JSI_Lobby::RecvXmppClient(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))84 {85 if (!g_XmppClient)86 return;87 g_XmppClient->recv();88 }89 90 83 void JSI_Lobby::SendGetGameList(ScriptInterface::CxPrivate* UNUSED(pCxPrivate)) 91 84 { 92 85 if (!g_XmppClient) -
source/lobby/scripting/JSInterface_Lobby.h
34 34 void StopXmppClient(ScriptInterface::CxPrivate* pCxPrivate); 35 35 void ConnectXmppClient(ScriptInterface::CxPrivate* pCxPrivate); 36 36 void DisconnectXmppClient(ScriptInterface::CxPrivate* pCxPrivate); 37 void RecvXmppClient(ScriptInterface::CxPrivate* pCxPrivate);38 37 void SendGetGameList(ScriptInterface::CxPrivate* pCxPrivate); 39 38 void SendGetBoardList(ScriptInterface::CxPrivate* pCxPrivate); 40 39 void SendGetRatingList(ScriptInterface::CxPrivate* pCxPrivate); -
source/main.cpp
66 66 #include "network/NetClient.h" 67 67 #include "network/NetServer.h" 68 68 #include "network/NetSession.h" 69 #include "lobby/IXmppClient.h" 69 70 #include "graphics/Camera.h" 70 71 #include "graphics/GameView.h" 71 72 #include "graphics/TextureManager.h" … … 348 349 if (g_NetClient) 349 350 g_NetClient->Flush(); 350 351 352 // Keep us connected to any XMPP servers 353 if (g_XmppClient) 354 g_XmppClient->recv(); 355 351 356 g_UserReporter.Update(); 352 357 353 358 g_Console->Update(realTimeSinceLastFrame); -
source/gui/scripting/ScriptFunctions.cpp
957 957 scriptInterface.RegisterFunction<void, &JSI_Lobby::StopXmppClient>("StopXmppClient"); 958 958 scriptInterface.RegisterFunction<void, &JSI_Lobby::ConnectXmppClient>("ConnectXmppClient"); 959 959 scriptInterface.RegisterFunction<void, &JSI_Lobby::DisconnectXmppClient>("DisconnectXmppClient"); 960 scriptInterface.RegisterFunction<void, &JSI_Lobby::RecvXmppClient>("RecvXmppClient");961 960 scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList"); 962 961 scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetBoardList>("SendGetBoardList"); 963 962 scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetRatingList>("SendGetRatingList");