mIRC Homepage
Posted By: khurram_ch How to kick - 24/04/07 11:07 PM
hy, need some assistance.
1: if someone repeats a line three times so i want to my script to kick him/her out of the channel with this reason "Please do not repeat your question more than 3times(2min banned)
he/she must be banned for 2 minutes too, and after 2minutes my script unban him automatically.

2: I am Founder of a channel, if an AOp/SOp try to ban/kick me so my script ban/kick them before they do and also del them from AOp/SOp list, i use DALnet so /cs AOp #channel del nick to del AOp similarly just replace SOp to AOp. and if i am an SOp in a channel and an AOp try this so he/she kicked out before that.

please reply the questions and also tell where to put the commands which you'll tell, in aliases/remote etc.
thanks
Posted By: RusselB Re: How to kick - 25/04/07 12:28 AM
Please take a look in the Snippets section on Hawkee and check for one or more of the following
Repeat kick
Repeat ban
protection

Any scripts/snippets that you get would be loaded into the Remotes section.
Posted By: khurram_ch Re: How to kick - 25/04/07 10:05 PM
The URL you gave me cannot be opend, if you understnad my question then please answer them.
Sorry for my english i am not an English
thanks
Posted By: RusselB Re: How to kick - 25/04/07 10:26 PM
That link works fine for me and we don't usually write full scripts for people, especially when there are full scripts already done that we can refer them to, which is what I did.
Posted By: RoCk Re: How to kick - 25/04/07 10:39 PM
It didn't work for me either but this one did.
Posted By: RusselB Re: How to kick - 25/04/07 11:40 PM
sigh...for the lack of a / character at the end
Posted By: khurram_ch Re: How to kick - 09/05/07 08:39 PM
thanks guys, it is realy helping to me, got many useful things.
but my first question is still there, didnt get answer on that web too. if someone repeats a line......
Read the first question please and help me.
thanks
Posted By: sparta Re: How to kick - 09/05/07 09:06 PM
You can try this, untested tho:
Code:
on @*:text:*:#: {
  if ( %rept == $null ) { set %rept 60 }
  if ( %rep_ban == $null ) { set %repb 120 }
  if ( %rep_antal == $null ) { set %repa 3 }
  if ($nick == null) { return }
  var %rp.repeats = rp. $+ $nick $+ . $+ $chan
  var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text
  if ( % [ $+ [ %rp.repeats ] ] == $null ) {
    set -u [ $+ [ %rept ] ] % [ $+ [ %rp.repeats ] ] 1
    set -u [ $+ [ %rept ] ] % [ $+ [ %rp.text ] ] $1-
  }
  elseif ( % [ $+ [ %rp.text ] ] == $1- ) {
    inc % [ $+ [ %rp.repeats ] ]
  }
  elseif ( % [ $+ [ %rp.text ] ] != $1- ) {
    set -u [ $+ [ %rept ] ] % [ $+ [ %rp.text ] ] $1-
    set -u [ $+ [ %rept ] ] % [ $+ [ %rp.repeats ] ] 1
  }
  if ( % [ $+ [ %rp.repeats ] ] >= %repa ) { 
    kick # $nick % [ $+ [ %rp.repeats ] ] repeats in %rept second(s) Banned for $calc(%repb / 60) $+ minute(s)
    ban -u $+ %repb # $nick 3
    unset %rp. $+ $nick $+ . $+ $chan
    unset %rp. $+ $nick $+ . $+ $chan $+ . $+ text
  }
}

This will kick a user if he/she repeats something 3 times during the time 60 seconds, it will also ban that person for 2 minutes. To change the amount of time for the repeats, type: "/set %rept 60" or what ever you want it to be, to change the time the ban should last, use: "/set %repb 120" or what you want it to be, and last for how many repeats during the time type: "/set %repa 3" or how many you think it should be. To add this in your mirc, press "ALT + R" and paste it in a empty file there, and remember to remove the " " befor you try set anything: /set %rept 60 <- as an example.
Posted By: khurram_ch Re: How to kick - 09/05/07 09:28 PM
it works but it should ban first then kick, actualy when it kicks a person he suddenly join(if he's setteled his mirc to join when kicked) he get banned but after his joining.
Isnt there anyway that he bans first then kick someone.
Secondly:
Is there anyway that i put timer to every kick, whether i kick someone for repeating, advertisement, etc.
I got one in Hawkee.com but it doenst work, actually i am unable to understand that, so could you please tell me some easy way?
Posted By: RusselB Re: How to kick - 10/05/07 02:04 AM
1) To ban, then kick, swap the ban & kick lines.
2) Kicks aren't timed, if you're looking for something that will kick a person and then keep them off for a specified period of time, you'll have to use /ban -u<time> <channel> <nick>
Posted By: khurram_ch Re: How to kick - 01/12/07 10:21 PM
The code you gave me to ban/kick for repeating for a specific time works fine when i swapped ban/kick lines. Now if i want the same thing for flood protection, suppose if someone floods in channel then he should be banned for 3 minutes and after that unbanned automatically.......
Thanks for the first code, it resolved many aproblems.
Posted By: khurram_ch Re: How to kick - 01/12/07 10:25 PM
and also in both cases kicks for repeating/flooding it should count which kick is this.... at the end of the kick msg it should say somthing like 10th kick... then in next 11th kick.. similarly it should goes on.
Posted By: sparta Re: How to kick - 02/12/07 07:29 AM
use

inc %kick.counter

then %kick.counter will store the amount of kicks.

/help /inc
Posted By: khurram_ch Re: How to kick - 02/12/07 07:10 PM
Thank you, but this question is still there ==>
The code you gave me to ban/kick for repeating for a specific time works fine when i swapped ban/kick lines. Now if i want the same thing for flood protection, suppose if someone floods in channel then he should be banned for 3 minutes and after that unbanned automatically.......
Thanks for the first code, it resolved many aproblems.
Posted By: sparta Re: How to kick - 03/12/07 03:29 AM
What type of flood? ctcp, notice, text, join, part?
© mIRC Discussion Forums