mIRC Home    About    Download    Register    News    Help

Print Thread
Auto Unban Chanserv Bans #258536 23/07/16 03:32 PM
Joined: Jul 2016
Posts: 6
FilteredRiddle Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Jul 2016
Posts: 6
I have some restricted channels, where the vast majority of people who get banned are actual members who forgot to identify first, pinged, failed to identify quickly enough, etc.

I would like a script which automatically unbans those banned by ChanServ. If it could delineate between ChanServ autobans and OPs banning that'd be great, though I don't believe it's possible.

Please help?

Re: Auto Unban Chanserv Bans [Re: FilteredRiddle] #258538 24/07/16 04:07 AM
Joined: Feb 2011
Posts: 330
K
KindOne Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Feb 2011
Posts: 330
You could apply channel mode +R or +r (depends on ircd / services) to only allow identified nicks in.

Grant them access to use ChanServ's UNBAN command on themselves, assuming that command exists on the network.


I /think/ this is valid, I didn't test it.

on @:ban:#channel:{ if ($nick == ChanServ) { mode $chan -b $banmask } }


irc.swiftirc.net #msl (mIRC Scripting Language)
Re: Auto Unban Chanserv Bans [Re: KindOne] #258540 24/07/16 12:15 PM
Joined: Jul 2016
Posts: 6
FilteredRiddle Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Jul 2016
Posts: 6
The channel is +r, which is why people get banned if they haven't identified for some reason.

I'll give that script a go!

Re: Auto Unban Chanserv Bans [Re: FilteredRiddle] #258546 25/07/16 08:41 PM
Joined: Jul 2016
Posts: 6
FilteredRiddle Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Jul 2016
Posts: 6
Unfortunately, the script doesn't seem to work.

As a more detailed example, when this happens:

[14:34:25] * User (User@swc-irc.2jr.f9f.fsnneb.IP) has joined #cmg-channel
[14:34:25] * ChanServ sets mode: +b *!*@swc-irc.2jr.f9f.fsnneb.IP
[14:34:25] * User was kicked by ChanServ (You are not authorized to be on this channel)

I'd like a script which causes me to automatically do this:

FilteredRiddle sets mode: -b *!*@swc-irc.2jr.f9f.fsnneb.IP

Re: Auto Unban Chanserv Bans [Re: FilteredRiddle] #258548 26/07/16 01:45 AM
Joined: Jun 2003
Posts: 994
C
CtrlAltDel Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
This works for me on DALnet:
Code:
on me:*:kick:#channelname: {
  if (restricted channel isin $1-) {
    msg ChanServ@services.dal.net unban $1
  }
}


I refuse to engage in a battle of wits with an unarmed person. wink
Re: Auto Unban Chanserv Bans [Re: CtrlAltDel] #258550 26/07/16 08:29 PM
Joined: Jul 2016
Posts: 6
FilteredRiddle Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Jul 2016
Posts: 6
I tried this, but it does not appear to work for me either.

Re: Auto Unban Chanserv Bans [Re: FilteredRiddle] #258555 27/07/16 11:23 AM
Joined: Dec 2015
Posts: 133
Dazuz Offline
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 133
Code:
on *:kick:#CHANNEL: {
  if ($nick == ChanServ) && ($1- == You are not authorized to be on this channe) && ($me isop #) {
    var %a = $address($knick,5),%x 1,%b
    while ($ibl(#,%x)) { if ($v1 iswm %a) var %b = %b $v1 | inc %x }
    massmode # -b %b
  }
}

alias massmode {
  while ($3) {
    mode $1 $left($2,1) $+ $str($right($2,1),$modespl) $gettok($3-,1- $+ $modespl,32)
    tokenize 32 $1-2 $gettok($3-,$calc(1+$modespl) $+ -,32)
  }
}

Remember to change the #CHANNEL on the kick event.

The massmode alias is a bit overkill, but it's there just in case there's somehow more than $modespl amount of bans matching the user who got kicked.

Re: Auto Unban Chanserv Bans [Re: Dazuz] #258561 27/07/16 10:36 PM
Joined: Jul 2016
Posts: 6
FilteredRiddle Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Jul 2016
Posts: 6
In my remote tab, I put:

Code:
on *:kick:#cmg-channel: {
  if ($nick == ChanServ) && ($1- == You are not authorized to be on this channe) && ($me isop #) {
    var %a = $address($knick,5),%x 1,%b
    while ($ibl(#,%x)) { if ($v1 iswm %a) var %b = %b $v1 | inc %x }
    massmode # -b %b
  }
}

alias massmode {
  while ($3) {
    mode $1 $left($2,1) $+ $str($right($2,1),$modespl) $gettok($3-,1- $+ $modespl,32)
    tokenize 32 $1-2 $gettok($3-,$calc(1+$modespl) $+ -,32)
  }
}


#cmg-channel is the channel in question. However, upon someone getting banned, I still had to manually unban them:

[16:20:33] * User (User@swc-irc.9s2.4pn.7aksvo.IP) has joined #cmg-channel
[16:20:33] * ChanServ sets mode: +b *!*@swc-irc.9s2.4pn.7aksvo.IP
[16:20:33] * User was kicked by ChanServ (You are not authorized to be on this channel)
[16:30:54] * FilteredRiddle sets mode: -b *!*@swc-irc.9s2.4pn.7aksvo.IP

Is there something I'm doing wrong here? frown

Re: Auto Unban Chanserv Bans [Re: FilteredRiddle] #258562 27/07/16 11:38 PM
Joined: Dec 2015
Posts: 133
Dazuz Offline
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 133
Looks like I missed one "L" from the end of the kick reason. Fixed version:

Code:
on *:kick:#CHANNEL: {
  if ($nick == ChanServ) && ($1- == You are not authorized to be on this channel) && ($me isop #) {
    var %a = $address($knick,5),%x 1,%b
    while ($ibl(#,%x)) { if ($v1 iswm %a) var %b = %b $v1 | inc %x }
    massmode # -b %b
  }
}

alias massmode {
  while ($3) {
    mode $1 $left($2,1) $+ $str($right($2,1),$modespl) $gettok($3-,1- $+ $modespl,32)
    tokenize 32 $1-2 $gettok($3-,$calc(1+$modespl) $+ -,32)
  }
}

Re: Auto Unban Chanserv Bans [Re: Dazuz] #258575 29/07/16 08:20 PM
Joined: Jul 2016
Posts: 6
FilteredRiddle Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Jul 2016
Posts: 6
It appears to work!

[14:01:59] * Test|19660 (6b029375@swc-irc.lh6.kde.veueic.IP) has joined #cmg-channel
[14:02:00] * ChanServ sets mode: +b *!*@swc-irc.lh6.kde.veueic.IP
[14:02:00] * Test|19660 was kicked by ChanServ (You are not authorized to be on this channel)
[14:02:00] * FilteredRiddle sets mode: -b *!*@swc-irc.lh6.kde.veueic.IP
[14:02:00] * FilteredRiddle sets mode: +e FilteredRiddle!*@*
[14:02:00] * ChanServ sets mode: +v FilteredRiddle
-