mIRC Homepage
Posted By: SLiprockS TEXT ban - 19/08/07 06:49 AM
Hey Guys I'm Looking for a script which will ban anyone who will type more than 100 character without space such as:

<Alpha> oooOOOoOooOOOoOOOoOOOOOOooOOOoOoOoOooOOoOOoooooOoOoOOoOOo

Thats the pattern. Can anyone help me on that!!
Posted By: dylaninfd Re: TEXT ban - 19/08/07 07:02 AM
I dont know about a script recognizing patterns. What you could do is an on text event. type /help on text to learn more about it. For your particular situation, i would do something like this:

Code:
on 1:TEXT:*oooOOOoOooOOOoOOOoOOO*:#YOURROOM: /ban #YOURROOM $nick


You could also extend the ooooooooo to whatever length. The ban wont recognize the difference of ooo and OOO, so as long as they do excessives, they are banned.
hope this works for you.
Posted By: SLiprockS Re: TEXT ban - 19/08/07 07:25 AM
I'm actually looking for regex that will ban whoever type 100 character or more than 100 character without any space it will ban him.. Main fact is type without 100 character without any space it could b any character in it.. can anyone help me on that ??
Posted By: RusselB Re: TEXT ban - 19/08/07 07:43 AM
Not regex, but
Code:
on @*:text:*:#:{
  var %a = 1, %b = $0
  while %a <= %b {
    if $len($gettok($1-,%a,32)) => 100 {
      ban -k $chan $nick 100+ characters in the first word
      %a = %b
    }
  inc %a
}

Posted By: Bekar Re: TEXT ban - 19/08/07 08:02 AM
What about:
Quote:
ON @$*:TEXT:/\w{100,}/:#: {
ban -k # $nick 100+ characters in a word
}
Posted By: SLiprockS Re: TEXT ban - 19/08/07 08:12 AM
Originally Posted By: RusselB
Not regex, but
Code:
on @*:text:*:#:{
  var %a = 1, %b = $0
  while %a <= %b {
    if $len($gettok($1-,%a,32)) => 100 {
      ban -k $chan $nick 100+ characters in the first word
      %a = %b
    }
  inc %a
}



Your Code is working on channel not working on pvt i need both so i tried this but didnt work could tell me why ?? for fix this up for me thankS.
Code:
on @*:text:*:*:{
  var %a = 1, %b = $0
  while %a <= %b {
    if ($len($gettok($1-,%a,32)) >= 100) {
      .ban -k $chan $nick 100+ characters in the first word
      %a = %b
    }
    inc %a
  }
}
Posted By: RusselB Re: TEXT ban - 19/08/07 08:16 AM
It's not working in pm, since the $chan identifier has no value in a pm, so there's no information in regards to where the person is to be banned from.

Change $chan in your modified code to the actual channel name.
Posted By: SLiprockS Re: TEXT ban - 19/08/07 08:22 AM
Originally Posted By: Bekar
What about:
Quote:
ON @$*:TEXT:/\w{100,}/:#: {
ban -k # $nick 100+ characters in a word
}


Hey Thanks But ur one good too but same not working on pvt frown i need both for pvt and channel thanks.
Posted By: SLiprockS Re: TEXT ban - 19/08/07 08:29 AM
Originally Posted By: RusselB
It's not working in pm, since the $chan identifier has no value in a pm, so there's no information in regards to where the person is to be banned from.

Change $chan in your modified code to the actual channel name.


i also tried with this didnt worked
Code:
     .kill $nick 100+ characters in the first word 
Posted By: Bekar Re: TEXT ban - 19/08/07 08:36 AM
You can't ban someone from an unknown channel.

A private message isn't related directly to any channel.

You can *try* using $comchan() if you want, but that's fairly general.

Also, the '@' level modifier will *NOT* allow the event to trigger for a private message.

If you are protecting a single channel, then you can hard wire it.

If you want it to protect many or an unknown list of channels, learn how to use $comchan() and a /while loop.
Posted By: SLiprockS Re: TEXT ban - 19/08/07 09:09 AM
Originally Posted By: Bekar
You can't ban someone from an unknown channel.

A private message isn't related directly to any channel.

You can *try* using $comchan() if you want, but that's fairly general.

Also, the '@' level modifier will *NOT* allow the event to trigger for a private message.

If you are protecting a single channel, then you can hard wire it.

If you want it to protect many or an unknown list of channels, learn how to use $comchan() and a /while loop.


Thanks Bekar I got it know its working fine its cause of modifier.. thankS for the info smile
© mIRC Discussion Forums