#######################################################################################################################* *-------------------------------------------------------Generic chat------------------------------------------------------* *#########################################################################################################################*/
| 253 | *-------------------------------------------------------Generic chat------------------------------------------------------* |
| 254 | *#########################################################################################################################*/ |
| 255 | static void LogInputUsage(const cc_string* text) { |
| 256 | /* Simplify navigating through input history by not logging duplicate entries */ |
| 257 | if (Chat_InputLog.count) { |
| 258 | int lastIndex = Chat_InputLog.count - 1; |
| 259 | cc_string last = StringsBuffer_UNSAFE_Get(&Chat_InputLog, lastIndex); |
| 260 | |
| 261 | if (String_Equals(text, &last)) return; |
| 262 | } |
| 263 | StringsBuffer_Add(&Chat_InputLog, text); |
| 264 | } |
| 265 | |
| 266 | void Chat_Send(const cc_string* text, cc_bool logUsage) { |
| 267 | if (!text->length) return; |
no test coverage detected