diff --git a/Changes b/Changes index 2bba3b974..cc0e674a6 100644 --- a/Changes +++ b/Changes @@ -18,6 +18,8 @@ Provided by Anope Dev. - 2009 08/30 F Fixed MLOCK superseding DEFCON mode lock. [ #00] 09/09 F Fixed number of TS6 compatibility issues. [#1096] 10/06 F Fixed CS FORBID not clearing excepts & invites. [#1097] +11/25 F Fixed a number of major XOP related issues. [ #00] +11/25 F Fixed a bug in CLEAR OPS causing incorrect mode removal. [#1114] Provided by Han` - 2009 07/28 F Updated german language file. [ #00] diff --git a/src/core/cs_clear.c b/src/core/cs_clear.c index c3934d840..0b55a965d 100644 --- a/src/core/cs_clear.c +++ b/src/core/cs_clear.c @@ -186,7 +186,6 @@ 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); @@ -207,6 +206,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; if (ircdcap->tsmode) { snprintf(buf, BUFSIZE - 1, "%ld", (long int) time(NULL)); av[1] = buf; @@ -226,7 +226,6 @@ int do_clear(User * u) do_cmode(s_ChanServ, ac, av); } } else { - av[0] = chan; for (cu = c->users; cu; cu = next) { next = cu->next; isop = chan_has_user_status(c, cu->user, CUS_OP); @@ -243,6 +242,7 @@ int do_clear(User * u) snprintf(tmp2, BUFSIZE, "%s %s %s", (isop ? GET_USER(cu->user) : ""), (isadmin ? GET_USER(cu->user) : ""), (isown ? GET_USER(cu->user) : "")); + av[0] = chan; if (ircdcap->tsmode) { snprintf(buf, BUFSIZE - 1, "%ld", (long int) time(NULL)); av[1] = buf; diff --git a/src/core/cs_xop.c b/src/core/cs_xop.c index 849cc5fba..5cf377650 100644 --- a/src/core/cs_xop.c +++ b/src/core/cs_xop.c @@ -174,9 +174,10 @@ int do_vop(User * u) int xop_del(User * u, ChannelInfo * ci, ChanAccess * access, int *perm, int uacc, int xlev) { + char *nick; if (!access->in_use || !access->nc || access->level != xlev) return 0; - char *nick = access->nc->display; + nick = access->nc->display; if (!is_services_admin(u) && uacc <= access->level) { (*perm)++; return 0; @@ -339,7 +340,7 @@ int do_xop(User * u, char *xname, int xlev, int *xmsgs) } } else if (stricmp(cmd, "DEL") == 0) { - int deleted, a, b; + int deleted; if (readonly) { notice_lang(s_ChanServ, u, xmsgs[1]); return MOD_CONT; @@ -439,9 +440,6 @@ int do_xop(User * u, char *xname, int xlev, int *xmsgs) if (!sent_header) notice_lang(s_ChanServ, u, xmsgs[7], chan); } else if (stricmp(cmd, "CLEAR") == 0) { - uint16 j = 0; - int a, b; - if (readonly) { notice_lang(s_ChanServ, u, CHAN_ACCESS_DISABLED); return MOD_CONT; diff --git a/version.log b/version.log index 06f2ebca4..7faa614d1 100644 --- a/version.log +++ b/version.log @@ -9,9 +9,11 @@ VERSION_MAJOR="1" VERSION_MINOR="8" VERSION_PATCH="2" VERSION_EXTRA="-svn" -VERSION_BUILD="2667" +VERSION_BUILD="2671" # $Log$ # Changes since 1.8.2 Release +#Revision 2671 - Fix bug #1114. Fixed a bug in cs_clear caused by do_cmode() modifying params passed to it. Also fixed some warnings in cs_xop. +#Revision 2668 - Fix a few more XOP related problems. #Revision 2667 - Cleaned up a lot of the channel access reordering code, properly change users with less than voice access on channels to XOP, and fix a potential crashbug after switching to XOP on IRCds that do not support halfop #Revision 2601 - All usermodes are now recognized and properly set internally on Insp 1.2. #Revision 2598 - More dynamic detection of channel modes on InspIRCd 1.2. Also fixes params being linked to the wrong mode.