rust/hedgewars-server/src/protocol/messages.rs
changeset 14791 b889d9e1115f
parent 14787 0e64acbc3f8b
child 14795 add191d825f4
equal deleted inserted replaced
14790:e94fbf6cad2b 14791:b889d9e1115f
    64     LoadRoom(String),
    64     LoadRoom(String),
    65     Malformed,
    65     Malformed,
    66     Empty,
    66     Empty,
    67 }
    67 }
    68 
    68 
    69 #[derive(Debug)]
    69 #[derive(Debug, Clone, Copy)]
    70 pub enum ProtocolFlags {
    70 pub enum ProtocolFlags {
    71     InRoom,
    71     InRoom,
    72     RoomMaster,
    72     RoomMaster,
    73     Ready,
    73     Ready,
    74     InGame,
    74     InGame,
    75     Authenticated,
    75     Registered,
    76     Admin,
    76     Admin,
    77     Contributor,
    77     Contributor,
    78 }
    78 }
    79 
    79 
    80 impl ProtocolFlags {
    80 impl ProtocolFlags {
    83         match self {
    83         match self {
    84             ProtocolFlags::InRoom => 'i',
    84             ProtocolFlags::InRoom => 'i',
    85             ProtocolFlags::RoomMaster => 'h',
    85             ProtocolFlags::RoomMaster => 'h',
    86             ProtocolFlags::Ready => 'r',
    86             ProtocolFlags::Ready => 'r',
    87             ProtocolFlags::InGame => 'g',
    87             ProtocolFlags::InGame => 'g',
    88             ProtocolFlags::Authenticated => 'u',
    88             ProtocolFlags::Registered => 'u',
    89             ProtocolFlags::Admin => 'a',
    89             ProtocolFlags::Admin => 'a',
    90             ProtocolFlags::Contributor => 'c',
    90             ProtocolFlags::Contributor => 'c',
    91         }
    91         }
    92     }
    92     }
    93 
    93