summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-05 23:19:57 +0500
committerilotterytea <iltsu@alright.party>2025-12-05 23:19:57 +0500
commitc2b77f1586851cdc472910ff42a38b90c23afa9a (patch)
treed053bc1bb7d4414fd477f07da68f8e0aa4e43b3d
parent16c648abdc6d052fe9d8efa5f4e048e25f911c34 (diff)
fix: invalid argument when badge isn't just a number
-rw-r--r--bot/src/irc/message.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/src/irc/message.hpp b/bot/src/irc/message.hpp
index f8ce995..d0882fb 100644
--- a/bot/src/irc/message.hpp
+++ b/bot/src/irc/message.hpp
@@ -27,7 +27,7 @@ namespace bot {
std::string display_name;
int id;
- std::map<std::string, int> badges;
+ std::map<std::string, std::string> badges;
// More fields will be here
};
@@ -59,7 +59,7 @@ namespace bot {
for (const std::string &badge :
utils::string::split_text(msg.tags.at("badges"), ',')) {
auto b = utils::string::split_text_n(badge, "/", 1);
- sender.badges.insert_or_assign(b[0], std::stoi(b[1]));
+ sender.badges.insert_or_assign(b[0], b[1]);
}
source.login = msg.params.front();