diff options
author | Adam <Adam@anope.org> | 2012-07-14 02:17:23 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-07-14 02:17:23 -0400 |
commit | 670e73d69d2d8ab46c04c2c8bd8fef9a33a67993 (patch) | |
tree | c21a91c428ca3a72fb0dbd47088e10d34226893e | |
parent | 07fffb0b905cbf8e09d2235162ff3680cac12a2d (diff) |
Fixed crash with cs_enforce and registered empty permanent channels
-rw-r--r-- | Changes | 1 | ||||
-rw-r--r-- | src/modules/cs_enforce.c | 20 | ||||
-rw-r--r-- | version.log | 3 |
3 files changed, 11 insertions, 13 deletions
@@ -3,6 +3,7 @@ Anope Version 1.8 - GIT 12/31 F Fixed os_svsnick to allow changing the case of a users' nick [#1369] 02/22 F Fixed several grammar errors in docs/ (patch provided by Simba) [ #00] 02/25 F Do not allow akill masks to end in @ [#1380] +07/14 F Fixed crash with cs_enforce and empty permanent channels [ #00] Anope Version 1.8.7 ----------------------- diff --git a/src/modules/cs_enforce.c b/src/modules/cs_enforce.c index c3f7f51f8..30370d925 100644 --- a/src/modules/cs_enforce.c +++ b/src/modules/cs_enforce.c @@ -82,12 +82,10 @@ void do_enforce_secureops(Channel * c) flags = ci->flags; ci->flags |= CI_SECUREOPS; - user = c->users; - do { + for (user = c->users; user; user = next) { next = user->next; chan_set_correct_modes(user->user, c, 0); - user = next; - } while (user); + } ci->flags = flags; } @@ -113,9 +111,9 @@ void do_enforce_restricted(Channel * c) if (ci->levels[CA_NOJOIN] < 0) ci->levels[CA_NOJOIN] = 0; - user = c->users; - do { + for (user = c->users; user; user = next) { next = user->next; + u = user->user; if (check_access(u, c->ci, CA_NOJOIN)) { get_idealban(ci, u, mask, sizeof(mask)); @@ -128,8 +126,7 @@ void do_enforce_restricted(Channel * c) av[2] = reason; do_kick(s_ChanServ, 3, av); } - user = next; - } while (user); + } ci->levels[CA_NOJOIN] = old_nojoin_level; } @@ -151,9 +148,9 @@ void do_enforce_cmode_R(Channel * c) if (debug) alog("debug: cs_enforce: Enforcing mode +R on %s", c->name); - user = c->users; - do { + for (user = c->users; user; user = next) { next = user->next; + u = user->user; if (!nick_identified(u)) { get_idealban(ci, u, mask, sizeof(mask)); @@ -168,8 +165,7 @@ void do_enforce_cmode_R(Channel * c) av[2] = reason; do_kick(s_ChanServ, 3, av); } - user = next; - } while (user); + } } /* Enforcing Group Functions */ diff --git a/version.log b/version.log index 1afd81821..754243b61 100644 --- a/version.log +++ b/version.log @@ -8,9 +8,10 @@ VERSION_MAJOR="1" VERSION_MINOR="8" VERSION_PATCH="8" VERSION_EXTRA="-git" -VERSION_BUILD="3094" +VERSION_BUILD="3095" # Changes since 1.8.7 Release +#Revision 3095 - Fixed crash with cs_enforce and registered empty permanent channels #Revision 3094 - Bug #1380 - Do not allow akill masks to end in @ #Revision 3093 - Fixed several grammar errors in docs/ (patch provided by Simba) #Revision 3092 - Updated Copyright to 2012 |