summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-04-15 14:26:17 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-04-15 14:26:17 +0000
commitf590c52321ad35b7aadd358996a1d10b1bd7bcd0 (patch)
tree6f1f1f27134c615624aa527de0c4bd1d6ebb46c6 /src
parent911cc43d9c2a562318a2f9d4e2287f0b48529ee4 (diff)
Fixed bug #1154 - Fixed a potential crash in cs_clear ops
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2895 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/cs_clear.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/cs_clear.c b/src/core/cs_clear.c
index adf0ef221..b1aaa81ee 100644
--- a/src/core/cs_clear.c
+++ b/src/core/cs_clear.c
@@ -186,6 +186,7 @@ int do_clear(User * u)
struct c_userlist *cu, *next;
if (ircd->svsmode_ucmode) {
+ av[0] = chan;
anope_cmd_svsmode_chan(av[0], "-o", NULL);
if (ircd->owner) {
anope_cmd_svsmode_chan(av[0], ircd->ownerunset, NULL);
@@ -206,7 +207,7 @@ int do_clear(User * u)
snprintf(tmp, BUFSIZE, "-%s%s%s", (isop ? "o" : ""), (isadmin ?
ircd->adminunset+1 : ""), (isown ? ircd->ownerunset+1 : ""));
- av[0] = chan;
+ av[0] = chan; /* do_cmode can modify av[0] */
if (ircdcap->tsmode) {
snprintf(buf, BUFSIZE - 1, "%ld", (long int) time(NULL));
av[1] = buf;