diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-03-23 00:06:40 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-03-23 00:06:40 +0000 |
commit | 3ff8e96e14606c9251d52848ce7b21dc2abc8fa4 (patch) | |
tree | ed993bc91fe0a5d30d4c6dbae09bd70434f8518d /src/core/cs_set.c | |
parent | 5d56ed015890d6aafe6bf30cca657b520b4a8f60 (diff) |
Replace manual array for ChannelInfo's access list to use an std::vector instead, cleans up the code by a huge portion and fixes bug #1024 in the process.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2184 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core/cs_set.c')
-rw-r--r-- | src/core/cs_set.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/cs_set.c b/src/core/cs_set.c index f9426b510..76ec975b8 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -464,8 +464,8 @@ class CommandCSSet : public Command int i; ChanAccess *access; - for (access = ci->access, i = 0; i < ci->accesscount; - access++, i++) { + for (i = 0; i < ci->access.size(); i++) { + access = ci->GetAccess(i); if (!access->in_use) continue; /* This will probably cause wrong levels to be set, but hey, @@ -490,6 +490,9 @@ class CommandCSSet : public Command } } + /* The above may have set an access entry to not be in use, this will clean that up. */ + ci->CleanAccess(); + reset_levels(ci); ci->flags |= CI_XOP; } |