diff options
author | Sadie Powell <sadie@witchery.services> | 2025-05-03 17:07:07 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2025-05-03 21:28:56 +0100 |
commit | 010beb52b1f3c697a07f9a130d2ed9335fe1cd98 (patch) | |
tree | 734750a5677afff443f2117dc34ba14d3351fb28 /modules/rpc/rpc_data.cpp | |
parent | c95594141346ef6fb65a5af177bed35ed865234d (diff) |
Store the setter and ts for all modes and try to restore them.
This is mostly for preserving channel list mode info.
Diffstat (limited to 'modules/rpc/rpc_data.cpp')
-rw-r--r-- | modules/rpc/rpc_data.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<Anope::string> 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<Anope::string> 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) |