diff options
| author | ilotterytea <iltsu@alright.party> | 2025-04-15 04:34:23 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-04-15 04:34:23 +0500 |
| commit | 2a6efa35f2720415a535765efdc2cd76f22ccd30 (patch) | |
| tree | ff86be51446bff2262cc3778361f0c0f025ddc61 /bot | |
| parent | 583d2e3085443800e1ca65542d38821940efbed7 (diff) | |
feat: channel.prefix placeholder
Diffstat (limited to 'bot')
| -rw-r--r-- | bot/src/commands/lua.cpp | 3 | ||||
| -rw-r--r-- | bot/src/localization/localization.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/bot/src/commands/lua.cpp b/bot/src/commands/lua.cpp index e8ac0c2..2665b68 100644 --- a/bot/src/commands/lua.cpp +++ b/bot/src/commands/lua.cpp @@ -332,7 +332,8 @@ namespace bot::command::lua { std::map<std::string, std::string> token_map = { {"{sender.alias_name}", request["sender"]["alias_name"]}, {"{source.alias_name}", request["channel"]["alias_name"]}, - {"{default.prefix}", DEFAULT_PREFIX}}; + {"{default.prefix}", DEFAULT_PREFIX}, + {"{channel.prefix}", request["channel_preference"]["prefix"]}}; for (const auto &pair : token_map) { int pos = line.find(pair.first); diff --git a/bot/src/localization/localization.cpp b/bot/src/localization/localization.cpp index 48c6d52..b8659ea 100644 --- a/bot/src/localization/localization.cpp +++ b/bot/src/localization/localization.cpp @@ -116,7 +116,8 @@ namespace bot { std::map<std::string, std::string> token_map = { {"{sender.alias_name}", request.user.get_alias_name()}, {"{source.alias_name}", request.channel.get_alias_name()}, - {"{default.prefix}", DEFAULT_PREFIX}}; + {"{default.prefix}", DEFAULT_PREFIX}, + {"{channel.prefix}", request.channel_preferences.get_prefix()}}; for (const auto &pair : token_map) { int pos = line.find(pair.first); |
