gameServer2/src/server/handlers/inroom.rs
changeset 13528 c8b626b0a3ad
parent 13527 e3ae9eea0689
child 13529 662f7df89d06
equal deleted inserted replaced
13527:e3ae9eea0689 13528:c8b626b0a3ad
   273             } else {
   273             } else {
   274                 Vec::new()
   274                 Vec::new()
   275             };
   275             };
   276             server.react(client_id, actions);
   276             server.react(client_id, actions);
   277         }
   277         }
       
   278         Save(name, location) => {
       
   279             let actions = vec![server_chat(format!("Room config saved as {}", name))
       
   280                 .send_all().in_room(room_id).action()];
       
   281             server.rooms[room_id].save_config(name, location);
       
   282             server.react(client_id, actions);
       
   283         }
       
   284         Delete(name) => {
       
   285             let actions = if !server.rooms[room_id].delete_config(&name) {
       
   286                 vec![Warn(format!("Save doesn't exist: {}", name))]
       
   287             } else {
       
   288                 vec![server_chat(format!("Room config {} has been deleted", name))
       
   289                     .send_all().in_room(room_id).action()]
       
   290             };
       
   291             server.react(client_id, actions);
       
   292         }
   278         CallVote(None) => {
   293         CallVote(None) => {
   279             server.react(client_id, vec![
   294             server.react(client_id, vec![
   280                 server_chat("Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs <number>".to_string())
   295                 server_chat("Available callvote commands: kick <nickname>, map <name>, pause, newseed, hedgehogs <number>".to_string())
   281                     .send_self().action()])
   296                     .send_self().action()])
   282         }
   297         }