Ticket #4151: 4151-remove-sendgetratinglist-rev1.patch
File 4151-remove-sendgetratinglist-rev1.patch, 4.3 KB (added by , 7 years ago) |
---|
-
binaries/data/mods/public/gui/lobby/lobby.js
147 147 }), 148 148 "isSpecial": true 149 149 }); 150 Engine.SendGetRatingList();151 150 }, 152 151 "leave": msg => { 153 152 addChatMessage({ -
source/lobby/IXmppClient.h
33 33 virtual void recv() = 0; 34 34 virtual void SendIqGetGameList() = 0; 35 35 virtual void SendIqGetBoardList() = 0; 36 virtual void SendIqGetRatingList() = 0;37 36 virtual void SendIqGetProfile(const std::string& player) = 0; 38 37 virtual void SendIqGameReport(ScriptInterface& scriptInterface, JS::HandleValue data) = 0; 39 38 virtual void SendIqRegisterGame(ScriptInterface& scriptInterface, JS::HandleValue data) = 0; -
source/lobby/XmppClient.cpp
299 299 } 300 300 301 301 /** 302 * Request the rating data from the server.303 */304 void XmppClient::SendIqGetRatingList()305 {306 glooxwrapper::JID xpartamuppJid(m_xpartamuppId);307 308 // Send IQ309 BoardListQuery* b = new BoardListQuery();310 b->m_Command = "getratinglist";311 glooxwrapper::IQ iq(gloox::IQ::Get, xpartamuppJid);312 iq.addExtension(b);313 DbgXMPP("SendIqGetRatingList [" << tag_xml(iq) << "]");314 m_client->send(iq);315 }316 317 /**318 302 * Send game report containing numerous game properties to the server. 319 303 * 320 304 * @param data A JS array of game statistics -
source/lobby/XmppClient.h
63 63 void recv(); 64 64 void SendIqGetGameList(); 65 65 void SendIqGetBoardList(); 66 void SendIqGetRatingList();67 66 void SendIqGetProfile(const std::string& player); 68 67 void SendIqGameReport(ScriptInterface& scriptInterface, JS::HandleValue data); 69 68 void SendIqRegisterGame(ScriptInterface& scriptInterface, JS::HandleValue data); -
source/lobby/scripting/JSInterface_Lobby.cpp
41 41 scriptInterface.RegisterFunction<void, &JSI_Lobby::DisconnectXmppClient>("DisconnectXmppClient"); 42 42 scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetGameList>("SendGetGameList"); 43 43 scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetBoardList>("SendGetBoardList"); 44 scriptInterface.RegisterFunction<void, &JSI_Lobby::SendGetRatingList>("SendGetRatingList");45 44 scriptInterface.RegisterFunction<void, std::wstring, &JSI_Lobby::SendGetProfile>("SendGetProfile"); 46 45 scriptInterface.RegisterFunction<void, JS::HandleValue, &JSI_Lobby::SendRegisterGame>("SendRegisterGame"); 47 46 scriptInterface.RegisterFunction<void, JS::HandleValue, &JSI_Lobby::SendGameReport>("SendGameReport"); … … 134 133 g_XmppClient->SendIqGetBoardList(); 135 134 } 136 135 137 void JSI_Lobby::SendGetRatingList(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))138 {139 if (!g_XmppClient)140 return;141 g_XmppClient->SendIqGetRatingList();142 }143 144 136 void JSI_Lobby::SendGetProfile(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), const std::wstring& player) 145 137 { 146 138 if (!g_XmppClient) -
source/lobby/scripting/JSInterface_Lobby.h
38 38 void DisconnectXmppClient(ScriptInterface::CxPrivate* pCxPrivate); 39 39 void SendGetGameList(ScriptInterface::CxPrivate* pCxPrivate); 40 40 void SendGetBoardList(ScriptInterface::CxPrivate* pCxPrivate); 41 void SendGetRatingList(ScriptInterface::CxPrivate* pCxPrivate);42 41 void SendGetProfile(ScriptInterface::CxPrivate* pCxPrivate, const std::wstring& player); 43 42 void SendGameReport(ScriptInterface::CxPrivate* pCxPrivate, JS::HandleValue data); 44 43 void SendRegisterGame(ScriptInterface::CxPrivate* pCxPrivate, JS::HandleValue data);