# HG changeset patch # User Teemu Piippo # Date 1432750552 -10800 # Node ID 3bd32eec3d576c3ffd13498dd4b0bd72ade34f1d # Parent f992b027374b6eac23eb962a40935d58a9b7893c# Parent 08bfc3d9d2ae10007b627eaf3e5c23e513c65f8f Merged with default diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/coloredline.cpp --- a/sources/coloredline.cpp Tue May 26 18:46:24 2015 +0300 +++ b/sources/coloredline.cpp Wed May 27 21:15:52 2015 +0300 @@ -125,6 +125,14 @@ // ------------------------------------------------------------------------------------------------- // +void ColoredLine::add_string (const String& text) +{ + for (char a : text) + add_char (a); +} + +// ------------------------------------------------------------------------------------------------- +// void ColoredLine::set_color (Color a, bool on) { switch (a) diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/coloredline.h --- a/sources/coloredline.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/coloredline.h Wed May 27 21:15:52 2015 +0300 @@ -65,6 +65,7 @@ const Vector& data() const { return m_data; } int length() const { return m_length; } void add_char (char ch); + void add_string (const String& msg); void finalize(); int rows (int cols) const; diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/interface.cpp diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/interface.h --- a/sources/interface.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/interface.h Wed May 27 21:15:52 2015 +0300 @@ -56,6 +56,7 @@ void need_refresh(); void tab_complete (const String& part, String complete); RCONSession* get_session() { return &Session; } + void disconnected(); void vprint (const char* fmtstr, va_list args); void __cdecl print (const char* fmtstr, ...); @@ -80,7 +81,7 @@ Function DisconnectConfirmFunction = nullptr; IPAddress CurrentAddress; String StatusBarText; - StringList PlayerNames; + List PlayerNames; String PasteBuffer; RCONSession Session; @@ -104,4 +105,4 @@ void yank (int a, int b); int find_previous_word(); int find_next_word(); -}; +}; \ No newline at end of file diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/mystring.cpp --- a/sources/mystring.cpp Tue May 26 18:46:24 2015 +0300 +++ b/sources/mystring.cpp Wed May 27 21:15:52 2015 +0300 @@ -302,7 +302,7 @@ // ------------------------------------------------------------------------------------------------- // -bool String::starts_with (const String& other) +bool String::starts_with (const String& other) const { if (length() < other.length()) return false; diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/mystring.h --- a/sources/mystring.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/mystring.h Wed May 27 21:15:52 2015 +0300 @@ -104,8 +104,9 @@ void replace (int pos, int n, const String &a) { m_string.replace (pos, n, a.chars()); } void shrink_to_fit() { m_string.shrink_to_fit(); } void __cdecl sprintf (const char* fmtstr, ...); + void sprintf (const char* fmtstr, ...); void vsprintf (const char* fmtstr, va_list args); - bool starts_with (const String &other); + bool starts_with (const String &other) const; String strip (char unwanted) { return strip ({unwanted}); } String strip (const List &unwanted); void trim (int n); diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/network/rconsession.cpp diff -r 08bfc3d9d2ae -r 3bd32eec3d57 sources/network/rconsession.h --- a/sources/network/rconsession.h Tue May 26 18:46:24 2015 +0300 +++ b/sources/network/rconsession.h Wed May 27 21:15:52 2015 +0300 @@ -37,7 +37,7 @@ // enum { - RCON_PROTOCOL_VERSION = 4 + RCON_PROTOCOL_VERSION = 5 }; // ------------------------------------------------------------------------------------------------- @@ -53,6 +53,11 @@ SVRC_UPDATE, SVRC_TABCOMPLETE, SVRC_TOOMANYTABCOMPLETES, + SVRC_WATCHINGCVAR, + SVRC_ALREADYWATCHINGCVAR, + SVRC_WATCHCVARNOTFOUND, + SVRC_CVARCHANGED, + SVRC_YOUREDISCONNECTED, }; // ------------------------------------------------------------------------------------------------- @@ -65,6 +70,7 @@ CLRC_PONG, CLRC_DISCONNECT, CLRC_TABCOMPLETE, + CLRC_WATCHCVAR, }; // -------------------------------------------------------------------------------------------------