mIRC Home    About    Download    Register    News    Help

Print Thread
TEXT ban #183321 19/08/07 06:49 AM
Joined: Oct 2005
Posts: 24
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 24
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!!

Re: TEXT ban [Re: SLiprockS] #183324 19/08/07 07:02 AM
Joined: Jul 2007
Posts: 34
D
dylaninfd Offline
Ameglian cow
Offline
Ameglian cow
D
Joined: Jul 2007
Posts: 34
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.

Last edited by dylaninfd; 19/08/07 07:04 AM.
Re: TEXT ban [Re: dylaninfd] #183325 19/08/07 07:25 AM
Joined: Oct 2005
Posts: 24
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 24
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 ??

Re: TEXT ban [Re: SLiprockS] #183329 19/08/07 07:43 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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
}


Re: TEXT ban [Re: RusselB] #183333 19/08/07 08:02 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
What about:
Quote:
ON @$*:TEXT:/\w{100,}/:#: {
ban -k # $nick 100+ characters in a word
}

Re: TEXT ban [Re: RusselB] #183334 19/08/07 08:12 AM
Joined: Oct 2005
Posts: 24
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 24
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
  }
}

Re: TEXT ban [Re: SLiprockS] #183335 19/08/07 08:16 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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.

Re: TEXT ban [Re: Bekar] #183336 19/08/07 08:22 AM
Joined: Oct 2005
Posts: 24
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 24
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.

Last edited by SLiprockS; 19/08/07 08:23 AM.
Re: TEXT ban [Re: RusselB] #183341 19/08/07 08:29 AM
Joined: Oct 2005
Posts: 24
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 24
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 

Re: TEXT ban [Re: SLiprockS] #183344 19/08/07 08:36 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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.

Re: TEXT ban [Re: Bekar] #183350 19/08/07 09:09 AM
Joined: Oct 2005
Posts: 24
S
SLiprockS Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 24
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