add option to change chat command character

This commit is contained in:
Martin Michelsen
2026-01-04 00:32:46 -08:00
parent 4aa206bd4b
commit a469b4355e
6 changed files with 24 additions and 5 deletions
+4 -1
View File
@@ -3628,7 +3628,10 @@ static asio::awaitable<void> on_06(shared_ptr<Client> c, Channel::Message& msg)
co_return;
}
char command_sentinel = (c->version() == Version::DC_11_2000) ? '@' : '$';
auto s = c->require_server_state();
char command_sentinel = s->chat_command_sentinel
? s->chat_command_sentinel
: ((c->version() == Version::DC_11_2000) ? '@' : '$');
if ((text[0] == command_sentinel) && c->can_use_chat_commands()) {
if (text[1] == command_sentinel) {
text = text.substr(1);