mIRC Home    About    Download    Register    News    Help

Print Thread
#203573 20/08/08 11:45 AM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Code:
on *:text:*:#: { if $nick isreg # { var %hash = $+($nick,#,$1-) | hinc -mu4 repeat %hash | if $hget(repeat,%hash) >= 3 { ban -ku300 # $nick 2 Tekrar yasaktır. | hdel -w flod * } } }

that code banning ppl who repeating on channel
if like this it works and banning
<testing> test2
<testing> test2
<testing> test2
<testing> test2
if like this its not works
<testing> test2
<testing> test3
<testing> isdetest4test
<testing> aatest5wef
also need same thing for pvt repeat confused

xyzzy #203575 20/08/08 12:38 PM
T
Typos
Typos
T
You are describing two different things. What yo have is repeat protection, what your requesting is flood protection and I will give you an example for that.

I will provide you with an example that works for both channels and pm's as requested.

When someone talks, no matter what they say, we increase a variable with the nicks address, the cid and the window in the name by 1 unless it already is greater than the maximum number you set and tell it to unset in say 2 seconds. If the variable was greater than the number you set, say 10, you kick ban. That would mean if they said more than 4 lines in 2 seconds u kick/banned em. In the example below I also show how you could send warnings first.

To make the code functional simply replace the numbers to your liking and change the echo lines to whatever you want as well.
Code:
on *:text:*:#,?: {
  var %window $iif(!$chan,$nick)
  inc -u2 $+(%,$cid,.,$wildsite,.flood,.,%window) 1
  if $($+(%,$cid,.,$wildsite,.flood,.,%window),2) == 8 { echo -a Warning 1 }
  if $($+(%,$cid,.,$wildsite,.flood,.,%window),2) == 9 { echo -a Warning 2 }
  if $($+(%,$cid,.,$wildsite,.flood,.,%window),2) >= 10 { echo -a Actions }
}

Hope this helps.

Keep in mind that since you wanted it to do private messages and channels, you cant use /ban or even /kick because the pm isnt a channel and you cannot kick someone from it. What you would do is use seperate on text events for the pm and channels and then have the chan one kick/ban and the pm one /ignore and close the pm window or someting.

Good luck.

Last edited by Typos; 20/08/08 12:41 PM.
#203576 20/08/08 01:05 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
im not sure if u got me
i didnt mean need pvt repeat in channel code
i mean this code works great i dnt need flood
if sm1 says
test
test
test
it banning
but when says
test1
test2
test3
cant it read that way to repeated ?
and for pvt some way thing with another code confused
sorry for bad english frown

xyzzy #203619 21/08/08 06:30 PM
Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
Code:
on *:text:*:#: {
  var %f = $+(rep,$site,.,$chan,.,$cid)
  hinc -mu4 Repeat %f
  if ($hget(Repeat,%f) >= 3) {
    ban -ku300 # $nick 2 Tekrar yasakt.
    hfree Repeat
  }
}


Last edited by Tomao; 21/08/08 06:35 PM.
Tomao #203620 21/08/08 06:58 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
<xyzzy> tezt
<yxxyy> test
<xyzzy> lol
(22:31:43) * AngeLus sets mode: +b *!*@930C7710.AEB5FEDB.C95978C0.IP
(22:31:43) * You were kicked from #test by test (Tekrar yasakt.)
i tryed it again smthng wrong confused

Last edited by xyzzy; 21/08/08 07:35 PM.
xyzzy #203624 22/08/08 12:38 AM
Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
Change the line to:

Code:
hinc -mu2 Repeat %f


Or

Code:
hinc -mz Repeat %f


Choose one of these two lines, replace the original line with it, and see either one of them works best for you.

Tomao #203625 22/08/08 12:51 AM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
(03:47:15) <huuuh> haha
(03:47:16) <huuuh> haha1
(03:47:17) <huuuh> haha2
(03:47:18) <huuuh> haha3
(03:47:19) <huuuh> haha4
(03:47:20) <huuuh> haha5
(03:47:21) <huuuh> haha4
ban to thisssssssss is so hard think i wanted ? crazy
examples,
haha / haha / haha > repeat ban
test1 / test / test2 > repeat ban read like *test*
no1 got me confused

xyzzy #203698 24/08/08 06:53 PM
Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
I'm not sure why it wouldn't work for you. Have you tried this one:
Code:
hinc -mu2 Repeat %f

Tomao #203699 24/08/08 07:04 PM
Joined: Nov 2006
Posts: 143
X
xyzzy Offline OP
Vogon poet
OP Offline
Vogon poet
X
Joined: Nov 2006
Posts: 143
Great work thnxx sincerely smile
can it be on pvt if same repeating ignore confused

Last edited by xyzzy; 24/08/08 07:07 PM.

Link Copied to Clipboard