1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 08:36:41 +02:00

Fixed crash on setting XOP on

This commit is contained in:
Adam
2010-09-16 12:41:17 -04:00
parent 8131851058
commit ccc6109879
+3 -3
View File
@@ -39,9 +39,9 @@ class CommandCSSetXOP : public Command
{
ChanAccess *access;
for (unsigned i = ci->GetAccessCount() - 1; 0 <= i; --i)
for (unsigned i = ci->GetAccessCount(); i > 0; --i)
{
access = ci->GetAccess(i);
access = ci->GetAccess(i - 1);
/* This will probably cause wrong levels to be set, but hey,
* it's better than losing it altogether.
@@ -57,7 +57,7 @@ class CommandCSSetXOP : public Command
else if (CHECKLEV(CA_AUTOVOICE) || CHECKLEV(CA_VOICE) || CHECKLEV(CA_VOICEME))
access->level = ACCESS_VOP;
else
ci->EraseAccess(i);
ci->EraseAccess(i - 1);
}
reset_levels(ci);