diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-15 14:26:17 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-15 14:26:17 +0000 |
commit | f590c52321ad35b7aadd358996a1d10b1bd7bcd0 (patch) | |
tree | 6f1f1f27134c615624aa527de0c4bd1d6ebb46c6 /src/core/cs_clear.c | |
parent | 911cc43d9c2a562318a2f9d4e2287f0b48529ee4 (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/core/cs_clear.c')
-rw-r--r-- | src/core/cs_clear.c | 3 |
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; |