diff options
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | channels.c | 23 | ||||
-rw-r--r-- | services.h | 2 | ||||
-rw-r--r-- | version.log | 6 |
4 files changed, 22 insertions, 12 deletions
@@ -6,11 +6,12 @@ Provided by Anope Dev. <dev@anope.org> - 2004 05/24 A New NSNickTracking directive to provide nick tracking. [ #71] 05/21 A Auto enforce upon AKICK addition. [ #63] 05/21 A New file docs/OLDCHANGES contains all change history. [ #65] +06/04 F Rewrite of del_exception() fixing segfault and memory leak. [ #78] 06/04 F MemoServ send limit does no longer apply for services operators. [ #84] -05/28 F Fixed botserv bug with HAS_EXCEPTION (chmode +e). [ #80] 06/03 F Reversed pthread library detection order on ./configure script. [ #67] 06/02 F Fixed bug where people who set memoserv notify off were notified. [ #79] 05/30 F HostServ functions no longer called for non VHOST capable ircds. [ #77] +05/28 F Fixed botserv bug with HAS_EXCEPTION (chmode +e). [ #80] 05/26 F Repaired /NS GROUP for compiled but disabled MySQL support. [ #73] 05/24 F Fixed typo in example.conf. [ #70] 05/24 F Cleaned up compile errors on older compilers. [ #69] diff --git a/channels.c b/channels.c index d25e662a1..2429905d6 100644 --- a/channels.c +++ b/channels.c @@ -1430,19 +1430,22 @@ static void del_ban(Channel * chan, char *mask) static void del_exception(Channel * chan, char *mask) { - int reset = 0, i; - for (i = 0; i <= chan->exceptcount; i++) { - if (chan->excepts[i] == mask) { + int i; + int reset = 0; + + for (i = 0; i < chan->exceptcount; i++) { + if ((!reset) && (strcasecmp(chan->excepts[i], mask) == 0)) { + free(chan->excepts[i]); reset = 1; } - if (reset) { - if (i == chan->exceptcount) - chan->excepts[i] = NULL; - else - chan->excepts[i] = chan->excepts[i + 1]; - } + if (reset) + chan->excepts[i] = + (i == chan->exceptcount) ? NULL : chan->excepts[i + 1]; } - chan->exceptcount--; + + if (reset) + chan->exceptcount--; + if (debug) alog("debug: Deleted except %s to channel %s", mask, chan->name); } diff --git a/services.h b/services.h index 44f23a0d2..2c798722e 100644 --- a/services.h +++ b/services.h @@ -1016,8 +1016,10 @@ struct channel_ { int32 bancount, bansize; char **bans; +#ifdef HAS_EXCEPT int32 exceptcount, exceptsize; char **excepts; +#endif struct c_userlist { struct c_userlist *next, *prev; diff --git a/version.log b/version.log index 42a9a9fae..9c3cb3b3b 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,14 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="3" -VERSION_BUILD="167" +VERSION_BUILD="169" # $Log$ # +# BUILD : 1.7.3 (169) +# BUGS : 78 +# NOTES : Rewrite of del_exception() fixing segfault and memory leak +# # BUILD : 1.7.3 (167) # BUGS : # NOTES : Fixed a typo in my last submit, which caused a compile error. |