mirror of
https://github.com/anope/anope.git
synced 2026-07-08 05:23:13 +02:00
BUILD : 1.7.18 (1238) BUGS : 662 NOTES : Fixed array count not being decremented on ChanServ access lists (provided by Jan Milants)
git-svn-id: svn://svn.anope.org/anope/trunk@1238 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@957 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
ab0dc81bc2
commit
092d240f6b
@@ -20,6 +20,9 @@ Anope Version S V N
|
||||
03/18 F Password length checking in some cases was out. [ #00]
|
||||
04/21 F DefCon did not force DefCon modes while in DefCon mode. [#661]
|
||||
|
||||
Provided by Jan Milants <jan_renee@msn.com> - 2007
|
||||
04/21 F Array count decremention in the ChanServ access lists. [#662]
|
||||
|
||||
Anope Version 1.7.18
|
||||
--------------------
|
||||
12/09 A Ability to see if AutoOp is enabled in NickServ INFO displays. [#621]
|
||||
|
||||
+25
-11
@@ -233,21 +233,23 @@ int do_access(User * u)
|
||||
}
|
||||
}
|
||||
|
||||
/* All entries should be in use so we no longer need
|
||||
* to go over the entire list..
|
||||
for (i = 0; i < ci->accesscount; i++) {
|
||||
if (!ci->access[i].in_use)
|
||||
break;
|
||||
}
|
||||
if (i == ci->accesscount) {
|
||||
if (i < CSAccessMax) {
|
||||
ci->accesscount++;
|
||||
ci->access =
|
||||
srealloc(ci->access,
|
||||
sizeof(ChanAccess) * ci->accesscount);
|
||||
} else {
|
||||
notice_lang(s_ChanServ, u, CHAN_ACCESS_REACHED_LIMIT,
|
||||
CSAccessMax);
|
||||
return MOD_CONT;
|
||||
}
|
||||
*/
|
||||
|
||||
if (i < CSAccessMax) {
|
||||
ci->accesscount++;
|
||||
ci->access =
|
||||
srealloc(ci->access,
|
||||
sizeof(ChanAccess) * ci->accesscount);
|
||||
} else {
|
||||
notice_lang(s_ChanServ, u, CHAN_ACCESS_REACHED_LIMIT,
|
||||
CSAccessMax);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
access = &ci->access[i];
|
||||
@@ -346,6 +348,18 @@ int do_access(User * u)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* After reordering only the entries at the end could still be empty.
|
||||
* We ll free the places no longer in use... */
|
||||
for (i = ci->accesscount - 1; i >= 0; i--) {
|
||||
if (ci->access[i].in_use == 1)
|
||||
break;
|
||||
|
||||
ci->accesscount--;
|
||||
}
|
||||
ci->access =
|
||||
srealloc(ci->access,sizeof(ChanAccess) * ci->accesscount);
|
||||
|
||||
/* We don't know the nick if someone used numbers, so we trigger the event without
|
||||
* nick param. We just do this once, even if someone enters a range. -Certus */
|
||||
if (na)
|
||||
|
||||
+25
-11
@@ -301,21 +301,22 @@ int do_xop(User * u, char *xname, int xlev, int *xmsgs)
|
||||
}
|
||||
|
||||
if (!change) {
|
||||
/* All entries should be in use so we no longer need
|
||||
* to go over the entire list..
|
||||
for (i = 0; i < ci->accesscount; i++)
|
||||
if (!ci->access[i].in_use)
|
||||
break;
|
||||
*/
|
||||
|
||||
if (i == ci->accesscount) {
|
||||
if (i < CSAccessMax) {
|
||||
ci->accesscount++;
|
||||
ci->access =
|
||||
srealloc(ci->access,
|
||||
sizeof(ChanAccess) * ci->accesscount);
|
||||
} else {
|
||||
notice_lang(s_ChanServ, u, CHAN_XOP_REACHED_LIMIT,
|
||||
CSAccessMax);
|
||||
return MOD_CONT;
|
||||
}
|
||||
if (i < CSAccessMax) {
|
||||
ci->accesscount++;
|
||||
ci->access =
|
||||
srealloc(ci->access,
|
||||
sizeof(ChanAccess) * ci->accesscount);
|
||||
} else {
|
||||
notice_lang(s_ChanServ, u, CHAN_XOP_REACHED_LIMIT,
|
||||
CSAccessMax);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
access = &ci->access[i];
|
||||
@@ -431,6 +432,19 @@ int do_xop(User * u, char *xname, int xlev, int *xmsgs)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If the patch provided in bug #706 is applied, this should be placed
|
||||
* before sending the events! */
|
||||
/* After reordering only the entries at the end could still be empty.
|
||||
* We ll free the places no longer in use... */
|
||||
for (i = ci->accesscount - 1; i >= 0; i--) {
|
||||
if (ci->access[i].in_use == 1)
|
||||
break;
|
||||
|
||||
ci->accesscount--;
|
||||
}
|
||||
ci->access =
|
||||
srealloc(ci->access,sizeof(ChanAccess) * ci->accesscount);
|
||||
}
|
||||
} else if (stricmp(cmd, "LIST") == 0) {
|
||||
int sent_header = 0;
|
||||
|
||||
+5
-1
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="18"
|
||||
VERSION_EXTRA="-svn"
|
||||
VERSION_BUILD="1237"
|
||||
VERSION_BUILD="1238"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.18 (1238)
|
||||
# BUGS : 662
|
||||
# NOTES : Fixed array count not being decremented on ChanServ access lists (provided by Jan Milants)
|
||||
#
|
||||
# BUILD : 1.7.18 (1237)
|
||||
# BUGS : 661
|
||||
# NOTES : Fixed DefCon which did not force DefConChanModes when it was enabled
|
||||
|
||||
Reference in New Issue
Block a user