rust/hedgewars-server/src/server/actions.rs
changeset 14525 6cc0fce249f9
parent 14478 98ef2913ec73
child 14692 455865ccd36c
--- a/rust/hedgewars-server/src/server/actions.rs	Thu Dec 27 23:43:54 2018 +0100
+++ b/rust/hedgewars-server/src/server/actions.rs	Fri Dec 28 03:10:05 2018 +0300
@@ -118,7 +118,6 @@
     ReactProtocolMessage(HWProtocolMessage),
     CheckRegistered,
     JoinLobby,
-    AddRoom(String, Option<String>),
     RemoveRoom(RoomId),
     MoveToRoom(RoomId),
     MoveToLobby(String),
@@ -240,26 +239,6 @@
                 ],
             );
         }
-        AddRoom(name, password) => {
-            let room_id = server.add_room();;
-
-            let r = &mut server.rooms[room_id];
-            let c = &mut server.clients[client_id];
-            r.master_id = Some(c.id);
-            r.name = name;
-            r.password = password;
-            r.protocol_number = c.protocol_number;
-
-            let actions = vec![
-                RoomAdd(r.info(Some(&c)))
-                    .send_all()
-                    .with_protocol(r.protocol_number)
-                    .action(),
-                MoveToRoom(room_id),
-            ];
-
-            server.react(client_id, actions);
-        }
         RemoveRoom(room_id) => {
             let r = &mut server.rooms[room_id];
             let actions = vec![RoomRemove(r.name.clone())