From 010beb52b1f3c697a07f9a130d2ed9335fe1cd98 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 3 May 2025 17:07:07 +0100 Subject: Store the setter and ts for all modes and try to restore them. This is mostly for preserving channel list mode info. --- modules/rpc/rpc_data.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/rpc') diff --git a/modules/rpc/rpc_data.cpp b/modules/rpc/rpc_data.cpp index 71c0fee71..13dec3cf2 100644 --- a/modules/rpc/rpc_data.cpp +++ b/modules/rpc/rpc_data.cpp @@ -220,15 +220,15 @@ public: } std::vector modelist = { "+" }; - for (const auto &[mname, mvalue] : c->GetModes()) + for (const auto &[mname, mdata] : c->GetModes()) { auto *cm = ModeManager::FindChannelModeByName(mname); if (!cm || cm->type == MODE_LIST) continue; modelist.front().push_back(cm->mchar); - if (!mvalue.empty()) - modelist.push_back(mvalue); + if (!mdata.value.empty()) + modelist.push_back(mdata.value); } auto &modes = root.ReplyArray("modes"); for (const auto &modeparam : modelist) @@ -522,15 +522,15 @@ public: root.Reply("fingerprint", u->fingerprint); std::vector modelist = { "+" }; - for (const auto &[mname, mvalue] : u->GetModeList()) + for (const auto &[mname, mdata] : u->GetModeList()) { auto *um = ModeManager::FindUserModeByName(mname); if (!um || um->type == MODE_LIST) continue; modelist.front().push_back(um->mchar); - if (!mvalue.empty()) - modelist.push_back(mvalue); + if (!mdata.value.empty()) + modelist.push_back(mdata.value); } auto &modes = root.ReplyArray("modes"); for (const auto &modeparam : modelist) -- cgit