equal
deleted
inserted
replaced
113 |
113 |
114 pub enum Action { |
114 pub enum Action { |
115 Send(PendingMessage), |
115 Send(PendingMessage), |
116 RemoveClient, |
116 RemoveClient, |
117 ByeClient(String), |
117 ByeClient(String), |
118 ReactProtocolMessage(HWProtocolMessage), |
|
119 CheckRegistered, |
118 CheckRegistered, |
120 JoinLobby, |
119 JoinLobby, |
121 RemoveRoom(RoomId), |
120 RemoveRoom(RoomId), |
122 MoveToRoom(RoomId), |
121 MoveToRoom(RoomId), |
123 MoveToLobby(String), |
122 MoveToLobby(String), |
174 server.removed_clients.push(client_id); |
173 server.removed_clients.push(client_id); |
175 if server.clients.contains(client_id) { |
174 if server.clients.contains(client_id) { |
176 server.clients.remove(client_id); |
175 server.clients.remove(client_id); |
177 } |
176 } |
178 } |
177 } |
179 ReactProtocolMessage(msg) => handlers::handle(server, client_id, msg), |
|
180 CheckRegistered => { |
178 CheckRegistered => { |
181 let client = &server.clients[client_id]; |
179 let client = &server.clients[client_id]; |
182 if client.protocol_number > 0 && client.nick != "" { |
180 if client.protocol_number > 0 && client.nick != "" { |
183 let has_nick_clash = server |
181 let has_nick_clash = server |
184 .clients |
182 .clients |