mIRC Home    About    Download    Register    News    Help

Print Thread
Two questions. ban protection / adverts #157109 22/08/06 02:13 PM
Joined: Nov 2005
Posts: 15
M
markspec87 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Nov 2005
Posts: 15
Two quick questions for you guys.

1. Has anyone got a little script that will kick users when they advertise? I.e #mychan message. Would be useful!.

2. Is it possible to make a ban protection script?

i.e one op uses it and when someone attempts to ban him, it will auto ban them? Or if thats not possible. a 3rd op has the script and when another op gets banned, it will ban the "banner". Basically to stop channel takeovers.

thanks!

Re: Two questions. ban protection / adverts #157110 22/08/06 03:01 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
1.
Code:
on @$*:TEXT:/^[\(\)\[\]]*(#[^\s,]*)[\.!\?\(\)\[\]]*$/i:#: {
  if (($me isop $chan) && ($nick !isop $chan)) {
    /inc -u300 %adv. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
    var %count = %adv. [ $+ [ $chan ] $+ . $+ [ $nick ] ]
    if (%count < 3) /msg $chan $nick $+ , please do not advertise in here. $iif(%count == 3, - Last Warning -)
    else if (%count < 4) /kick $chan $nick Do not advertise in here
    else if (%count < 5) {
      /mode $chan +bb $nick $address($nick, 11)
      .timer 1 30 mode $chan -bb $nick $address($nick, 11)
      /kick $chan $nick Do not advertise in here (banned 30s)
    }
    else {
      /mode $chan +bb $nick $address($nick, 11)
      .timer 1 1800 mode $chan -bb $nick $address($nick, 11)
      /kick $chan $nick Do not advertise in here (banned!)
    }
  }
}

That will kick people who announce a channel in yours. It will give them two warnings first, kick the third, ban (30 secs) the fourth, and ban (half hour) the fifth.

2. Ban 'protection' as you put it is possible by a few ways. Your better off though using channel services if you have it available, and add your name to the access list. Then, only give *special* users op and the rest maybe halfop or voice. Alternativly, this will do what you're looking for:

Code:
on @*:BAN:#: {
  if ($bnick == $me || $banmask iswm $address($me,5)) {
    /kick $chan $nick No takeovers!
    /mode $chan -bb+bb $me $banmask $nick $address($nick,2)
  }
}


Very simple, but should work.


-KingTomato
Re: Two questions. ban protection / adverts #157111 22/08/06 07:21 PM
Joined: Nov 2005
Posts: 15
M
markspec87 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Nov 2005
Posts: 15
thanks. Ill try those out now.

I was also wondering fi theres anyway ican ge tthe bot to op me if i request.

I.e When my authname joins the channel and i type "!op" or soemthing, the bot will op me.

Hope fully theres a way smile

also is there anyway to make the advert scirpt just kick? and no warnings etc :0

Last edited by markspec87; 22/08/06 07:29 PM.
Re: Two questions. ban protection / adverts #157112 22/08/06 07:35 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
on @$*:TEXT:/^[\(\)\[\]]*(#[^\s,]*)[\.!\?\(\)\[\]]*$/i:#: {
  if ($nick !isop $chan) /kick $chan $nick Do not advertise in here
}
on @*:TEXT:!op:#: { if ($address($me,2) iswm $fulladress) /mode $chan +o $nick }


Assuming you and the bot are on the same connection, the !op should work fine and be secure.

Last edited by KingTomato; 22/08/06 07:35 PM.

-KingTomato
Re: Two questions. ban protection / adverts #157113 22/08/06 07:41 PM
Joined: Nov 2005
Posts: 15
M
markspec87 Offline OP
Pikka bird
OP Offline
Pikka bird
M
Joined: Nov 2005
Posts: 15
thanks. One last thing :P

how do i ge the bot to perform two commands with one event?

i.e for simplicity,

on *:JOIN:#csh-gamingsolutions:/mode $chan +v $nick

how would i put it so in thatcode it also said "you have been voiced".

EDIT: thanskf ro quick reply, the above wont work ,we are running the bot ona dedicated server elsehwere. I was looking for something auth related if thats poss.

Thanks for all the help.

Last edited by markspec87; 22/08/06 07:42 PM.
Re: Two questions. ban protection / adverts #157114 22/08/06 08:01 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
on *:JOIN:#csh-gamingsolutions: [color:red]{[/color]
  /mode $chan +v $nick
  [color:blue]/msg $chan You have been voiced[/color]
[color:red]}[/color]


Find out your auth address (if you don't know it, type $address($me,3) in your edit box, then press tab. It will be replaced with your address), then add it to the colored section:

Code:
on @*:!op:#: {
  if ([color:blue]*!*@address[/color] iswm $fulladdress) /mode $chan +o $nick
}


-KingTomato