|
Joined: Oct 2005
Posts: 34
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2005
Posts: 34 |
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!!
|
|
|
|
dylaninfd
|
dylaninfd
|
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:
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.
|
|
|
|
Joined: Oct 2005
Posts: 34
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2005
Posts: 34 |
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 ??
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
Not regex, but 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
}
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 503 |
What about: ON @$*:TEXT:/\w{100,}/:#: { ban -k # $nick 100+ characters in a word }
|
|
|
|
Joined: Oct 2005
Posts: 34
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2005
Posts: 34 |
Not regex, but 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.
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
}
}
|
|
|
|
Joined: Aug 2004
Posts: 7,168
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,168 |
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.
|
|
|
|
Joined: Oct 2005
Posts: 34
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2005
Posts: 34 |
What about: 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  i need both for pvt and channel thanks.
Last edited by SLiprockS; 19/08/07 08:23 AM.
|
|
|
|
Joined: Oct 2005
Posts: 34
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2005
Posts: 34 |
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
.kill $nick 100+ characters in the first word
|
|
|
|
Joined: Dec 2002
Posts: 503
Fjord artisan
|
Fjord artisan
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.
|
|
|
|
Joined: Oct 2005
Posts: 34
Ameglian cow
|
OP
Ameglian cow
Joined: Oct 2005
Posts: 34 |
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 
|
|
|
|
|