diff options
| -rw-r--r-- | localization/english.json | 2 | ||||
| -rw-r--r-- | localization/russian.json | 2 | ||||
| -rw-r--r-- | src/modules/ping.hpp | 21 |
3 files changed, 21 insertions, 4 deletions
diff --git a/localization/english.json b/localization/english.json index 97b74d7..1ef48cb 100644 --- a/localization/english.json +++ b/localization/english.json @@ -19,7 +19,7 @@ "error.external_api_error": "External API error (%s%s)", "error.insufficient_rights": "Insufficient rights", - "ping.response": "{sender.alias_name}: Pong! Uptime: %s · Used memory: %sMB", + "ping.response": "{sender.alias_name}: funnywhitecat Pong! %s Uptime: %s · Used memory: %sMB", "event.on": "{sender.alias_name}: New event \"%s\" has been successfully created!", "event.off": "{sender.alias_name}: The event \"%s\" has been deleted!", diff --git a/localization/russian.json b/localization/russian.json index ab0ebff..aee1bc4 100644 --- a/localization/russian.json +++ b/localization/russian.json @@ -19,7 +19,7 @@ "error.external_api_error": "Ошибка стороннего API (%s%s)", "error.insufficient_rights": "Недостаточно прав", - "ping.response": "{sender.alias_name}: Понг! Время сессии: %s · ОЗУ: %sМБ", + "ping.response": "{sender.alias_name}: funnywhitecat Понг! %s Время сессии: %s · ОЗУ: %sМБ", "event.on": "{sender.alias_name}: Событие \"%s\" успешно создано!", "event.off": "{sender.alias_name}: Событие \"%s\" удалено!", diff --git a/src/modules/ping.hpp b/src/modules/ping.hpp index b6409ca..836917d 100644 --- a/src/modules/ping.hpp +++ b/src/modules/ping.hpp @@ -32,9 +32,26 @@ namespace bot { int used_memory = usage.ru_maxrss / 1024; + std::string cpp_info; + +#ifdef __cplusplus + cpp_info.append("C++" + std::to_string(__cplusplus).substr(2, 2)); +#endif + +#ifdef __VERSION__ + cpp_info.append(" (gcc " + + bot::utils::string::split_text(__VERSION__, ' ')[0] + + ")"); +#endif + + if (!cpp_info.empty()) { + cpp_info.append(" · "); + } + return bundle.localization - .get_formatted_line(request, loc::LineId::PingResponse, - {uptime, std::to_string(used_memory)}) + .get_formatted_line( + request, loc::LineId::PingResponse, + {cpp_info, uptime, std::to_string(used_memory)}) .value(); } }; |
