40:cf85b5f77541 | 41:9ab869656b9e |
---|---|
35 | 35 |
36 // ------------------------------------------------------------------------------------------------- | 36 // ------------------------------------------------------------------------------------------------- |
37 // | 37 // |
38 enum | 38 enum |
39 { | 39 { |
40 RCON_PROTOCOL_VERSION = 3 | 40 RCON_PROTOCOL_VERSION = 4 |
41 }; | 41 }; |
42 | 42 |
43 // ------------------------------------------------------------------------------------------------- | 43 // ------------------------------------------------------------------------------------------------- |
44 // | 44 // |
45 enum ServerResponse | 45 enum ServerResponse |
49 SVRC_SALT, | 49 SVRC_SALT, |
50 SVRC_LOGGEDIN, | 50 SVRC_LOGGEDIN, |
51 SVRC_INVALIDPASSWORD, | 51 SVRC_INVALIDPASSWORD, |
52 SVRC_MESSAGE, | 52 SVRC_MESSAGE, |
53 SVRC_UPDATE, | 53 SVRC_UPDATE, |
54 SVRC_TABCOMPLETE, | |
55 SVRC_TOOMANYTABCOMPLETES, | |
54 }; | 56 }; |
55 | 57 |
56 // ------------------------------------------------------------------------------------------------- | 58 // ------------------------------------------------------------------------------------------------- |
57 // | 59 // |
58 enum ClientRequest | 60 enum ClientRequest |
60 CLRC_BEGINCONNECTION = 52, | 62 CLRC_BEGINCONNECTION = 52, |
61 CLRC_PASSWORD, | 63 CLRC_PASSWORD, |
62 CLRC_COMMAND, | 64 CLRC_COMMAND, |
63 CLRC_PONG, | 65 CLRC_PONG, |
64 CLRC_DISCONNECT, | 66 CLRC_DISCONNECT, |
67 CLRC_TABCOMPLETE, | |
65 }; | 68 }; |
66 | 69 |
67 // ------------------------------------------------------------------------------------------------- | 70 // ------------------------------------------------------------------------------------------------- |
68 // | 71 // |
69 enum RCONUpdateType | 72 enum RCONUpdateType |
105 METHOD bump_last_ping() -> void; | 108 METHOD bump_last_ping() -> void; |
106 METHOD send_command (const String& message) -> bool; | 109 METHOD send_command (const String& message) -> bool; |
107 METHOD state() const -> RCONSessionState; | 110 METHOD state() const -> RCONSessionState; |
108 METHOD level() const -> const String&; | 111 METHOD level() const -> const String&; |
109 METHOD is_active() const -> bool; | 112 METHOD is_active() const -> bool; |
113 METHOD request_tab_complete (const String& part) -> void; | |
110 | 114 |
111 static METHOD new_session() -> RCONSession*; | 115 static METHOD new_session() -> RCONSession*; |
112 static METHOD get_session() -> RCONSession*; | 116 static METHOD get_session() -> RCONSession*; |
113 | 117 |
114 private: | 118 private: |
122 String m_salt; | 126 String m_salt; |
123 int m_serverProtocol; | 127 int m_serverProtocol; |
124 String m_hostname; | 128 String m_hostname; |
125 int m_numAdmins; | 129 int m_numAdmins; |
126 String m_level; | 130 String m_level; |
131 String m_lastTabComplete; | |
127 }; | 132 }; |