Ver código fonte

Always set lobby creator as referee

kiwec 4 meses atrás
pai
commit
e5e879f516
2 arquivos alterados com 2 adições e 1 exclusões
  1. 2 0
      ranked.js
  2. 0 1
      website_api.js

+ 2 - 0
ranked.js

@@ -549,6 +549,8 @@ async function init_lobby(lobby, data, created_just_now) {
     // Lobbies are ScoreV1 - but we ignore the results and get the full score info from osu's API.
     await lobby.send(`!mp set 0 0 16`);
 
+    await lobby.send(`!mp addref #${lobby.data.creator_id}`);
+
     update_map_selection_query(lobby);
     await set_new_title(lobby);
   } else {

+ 0 - 1
website_api.js

@@ -435,7 +435,6 @@ async function register_routes(app) {
       try {
         console.info(`Creating lobby for ${lobby_data.creator}...`);
         lobby = await bancho.make(Config.IS_PRODUCTION ? `New o!RL lobby` : `test lobby`);
-        await lobby.send(`!mp addref #${req.signedCookies.user}`);
       } catch (err) {
         http_res.status(400).json({error: 'Could not create the lobby', details: err.message});
         return;