mIRC Home    About    Download    Register    News    Help

Print Thread
#258536 23/07/16 03:32 PM
Joined: Jul 2016
Posts: 6
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?

Joined: Feb 2011
Posts: 448
K
Pan-dimensional mouse
Offline
Pan-dimensional mouse
K
Joined: Feb 2011
Posts: 448
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 } }

Joined: Jul 2016
Posts: 6
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!

Joined: Jul 2016
Posts: 6
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

Joined: Jun 2003
Posts: 994
C
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
Joined: Jul 2016
Posts: 6
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.

Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
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.

Joined: Jul 2016
Posts: 6
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

Joined: Dec 2015
Posts: 148
Vogon poet
Offline
Vogon poet
Joined: Dec 2015
Posts: 148
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)
  }
}

Joined: Jul 2016
Posts: 6
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
-


Link Copied to Clipboard