mirror of
https://github.com/anope/anope.git
synced 2026-07-01 01:26:39 +02:00
Rewrite access path system to be simplier and use recursion
Show where access is "from" in chanserv/status
This commit is contained in:
@@ -86,8 +86,17 @@ class CommandNSAList : public Command
|
||||
|
||||
entry["Number"] = stringify(chan_count);
|
||||
entry["Channel"] = (ci->HasExt("CS_NO_EXPIRE") ? "!" : "") + ci->name;
|
||||
for (unsigned j = 0; j < access.size(); ++j)
|
||||
entry["Access"] = entry["Access"] + ", " + access[j]->AccessSerialize();
|
||||
for (unsigned j = 0; j < access.paths.size(); ++j)
|
||||
{
|
||||
ChanAccess::Path &p = access.paths[i];
|
||||
|
||||
// not interested in indirect access
|
||||
if (p.size() != 1)
|
||||
continue;
|
||||
|
||||
ChanAccess *a = p[0];
|
||||
entry["Access"] = entry["Access"] + ", " + a->AccessSerialize();
|
||||
}
|
||||
entry["Access"] = entry["Access"].substr(2);
|
||||
entry["Description"] = ci->desc;
|
||||
list.AddEntry(entry);
|
||||
|
||||
Reference in New Issue
Block a user