mirror of
https://github.com/anope/anope.git
synced 2026-06-30 18:46:38 +02:00
BUILD : 1.7.21 (1360) BUGS : 839 NOTES : Removed old code from cs_clear and fixed a memory leak in there as well
git-svn-id: svn://svn.anope.org/anope/trunk@1360 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1075 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
parent
b0f9385857
commit
aef8102b5b
@@ -12,6 +12,7 @@ Anope Version S V N
|
||||
01/26 F Memory leaks in OperServ CLEARMODES. [#836]
|
||||
01/26 F Check for LogChannel when running with -logchan option. [#837]
|
||||
01/26 F Enough LogChannel checks for bs_say and bs_act with LogBot on. [#838]
|
||||
01/26 F Memory leak and old code in ChanServ CLEAr. [#839]
|
||||
|
||||
Provided by Jan Milants <jan_renee@msn.com> - 2008
|
||||
01/16 F Server traversion with next_server() failed to list all servers. [#831]
|
||||
|
||||
+2
-42
@@ -146,7 +146,6 @@ int do_clear(User * u)
|
||||
free(invites);
|
||||
|
||||
} else if (stricmp(what, "modes") == 0) {
|
||||
char buf[BUFSIZE], *end = buf;
|
||||
char *argv[2];
|
||||
|
||||
if (c->mode) {
|
||||
@@ -190,45 +189,7 @@ int do_clear(User * u)
|
||||
}
|
||||
check_modes(c);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* TODO: decide if the above implementation is better than this one. */
|
||||
|
||||
if (0) {
|
||||
CBModeInfo *cbmi = cbmodeinfos;
|
||||
CBMode *cbm;
|
||||
|
||||
do {
|
||||
if (c->mode & cbmi->flag)
|
||||
*end++ = cbmi->mode;
|
||||
} while ((++cbmi)->flag != 0);
|
||||
|
||||
cbmi = cbmodeinfos;
|
||||
|
||||
do {
|
||||
if (cbmi->getvalue && (c->mode & cbmi->flag)
|
||||
&& !(cbmi->flags & CBM_MINUS_NO_ARG)) {
|
||||
char *value = cbmi->getvalue(c);
|
||||
|
||||
if (value) {
|
||||
*end++ = ' ';
|
||||
while (*value)
|
||||
*end++ = *value++;
|
||||
|
||||
/* Free the value */
|
||||
cbm = &cbmodes[(int) cbmi->mode];
|
||||
cbm->setvalue(c, NULL);
|
||||
}
|
||||
}
|
||||
} while ((++cbmi)->flag != 0);
|
||||
|
||||
*end = 0;
|
||||
|
||||
anope_cmd_mode(whosends(ci), c->name, "-%s", buf);
|
||||
c->mode = 0;
|
||||
check_modes(c);
|
||||
}
|
||||
|
||||
notice_lang(s_ChanServ, u, CHAN_CLEARED_MODES, chan);
|
||||
} else if (stricmp(what, "ops") == 0) {
|
||||
char *av[3];
|
||||
@@ -245,7 +206,6 @@ int do_clear(User * u)
|
||||
}
|
||||
for (cu = c->users; cu; cu = next) {
|
||||
next = cu->next;
|
||||
av[0] = sstrdup(chan);
|
||||
if (!chan_has_user_status(c, cu->user, CUS_OP)) {
|
||||
if (!chan_has_user_status(c, cu->user, CUS_PROTECT)) {
|
||||
if (!chan_has_user_status(c, cu->user, CUS_OWNER)) {
|
||||
@@ -267,8 +227,8 @@ int do_clear(User * u)
|
||||
do_cmode(s_ChanServ, 3, av);
|
||||
free(av[2]);
|
||||
free(av[1]);
|
||||
free(av[0]);
|
||||
}
|
||||
free(av[0]);
|
||||
} else {
|
||||
for (cu = c->users; cu; cu = next) {
|
||||
next = cu->next;
|
||||
|
||||
+5
-1
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="7"
|
||||
VERSION_PATCH="21"
|
||||
VERSION_EXTRA="-svn"
|
||||
VERSION_BUILD="1359"
|
||||
VERSION_BUILD="1360"
|
||||
|
||||
# $Log$
|
||||
#
|
||||
# BUILD : 1.7.21 (1360)
|
||||
# BUGS : 839
|
||||
# NOTES : Removed old code from cs_clear and fixed a memory leak in there as well
|
||||
#
|
||||
# BUILD : 1.7.21 (1359)
|
||||
# BUGS : 838
|
||||
# NOTES : Fixed various checks for LogBot in bs_say and bs_act
|
||||
|
||||
Reference in New Issue
Block a user