[srvx-commits] commit: ChanServ bugfixes for +z and addbans in suspended channels
Brought to you by:
entrope
From: Michael P. <md...@tr...> - 2004-09-13 13:12:09
|
Revision: srvx--devo--1.3--patch-80 Archive: sr...@sr...--2004-srvx Creator: Michael Poole <md...@tr...> Date: Mon Sep 13 09:11:38 EDT 2004 Standard-date: 2004-09-13 13:11:38 GMT Modified-files: ChangeLog src/chanserv.c srvx.conf.example New-patches: sr...@sr...--2004-srvx/srvx--devo--1.3--patch-80 Summary: ChanServ bugfixes for +z and addbans in suspended channels Keywords: If ChanServ should use MODE_REGISTERED, update that when moving channels. Do not check for bans against an auth'ing user in suspended channels. Change the example entries for off_channel and use_registered_mode to make the enabled/on values more obvious. * added files {arch}/srvx/srvx--devo/srvx--devo--1.3/sr...@sr...--2004-srvx/patch-log/patch-80 * modified files --- orig/ChangeLog +++ mod/ChangeLog @@ -2,6 +2,24 @@ # arch-tag: aut...@sr...--2004-srvx/srvx--devo--1.3 # +2004-09-13 13:11:38 GMT Michael Poole <md...@tr...> patch-80 + + Summary: + ChanServ bugfixes for +z and addbans in suspended channels + Revision: + srvx--devo--1.3--patch-80 + + If ChanServ should use MODE_REGISTERED, update that when moving channels. + + Do not check for bans against an auth'ing user in suspended channels. + + Change the example entries for off_channel and use_registered_mode to + make the enabled/on values more obvious. + + modified files: + ChangeLog src/chanserv.c srvx.conf.example + + 2004-09-08 23:36:51 GMT Michael Poole <md...@tr...> patch-79 Summary: --- orig/src/chanserv.c +++ mod/src/chanserv.c @@ -1845,6 +1845,7 @@ static CHANSERV_FUNC(cmd_move) { + struct mod_chanmode change; struct chanNode *target; struct modeNode *mn; struct userData *uData; @@ -1886,6 +1887,7 @@ } } + mod_chanmode_init(&change); if(!(target = GetChannel(argv[1]))) { target = AddChannel(argv[1], now, NULL, NULL); @@ -1905,14 +1907,23 @@ } else if(!IsSuspended(channel->channel_info)) { - struct mod_chanmode change; - mod_chanmode_init(&change); change.argc = 1; change.args[0].mode = MODE_CHANOP; change.args[0].u.member = AddChannelUser(chanserv, target); mod_chanmode_announce(chanserv, target, &change); } + if(chanserv_conf.use_registered_mode) + { + /* Clear MODE_REGISTERED from old channel, add it to new. */ + change.argc = 0; + change.modes_clear = MODE_REGISTERED; + mod_chanmode_announce(chanserv, channel, &change); + change.modes_clear = 0; + change.modes_set = MODE_REGISTERED; + mod_chanmode_announce(chanserv, target, &change); + } + /* Move the channel_info to the target channel; it shouldn't be necessary to clear timeq callbacks for the old channel. */ @@ -6023,7 +6034,8 @@ struct banData *ban; if((user->channels.list[ii]->modes & (MODE_CHANOP|MODE_VOICE)) - || !channel->channel_info) + || !channel->channel_info + || IsSuspended(channel->channel_info)) continue; for(jj = 0; jj < channel->banlist.used; ++jj) if(user_matches_glob(user, channel->banlist.list[jj]->ban, 1)) --- orig/srvx.conf.example +++ mod/srvx.conf.example @@ -193,10 +193,10 @@ // "modes" "+iok"; // Does your ircd have off-channel services support? // Bahamut does; ircu2.10.11 does not. - "off_channel" "no"; + "off_channel" "off"; // Does your ircd have a mode for registered channels? // Bahamut does; ircu2.10.11 does not. - "use_registered_mode" "no"; + "use_registered_mode" "off"; // how long should a person be unseen before resending infoline? "info_delay" "120"; // maximum greeting length |