mIRC Home    About    Download    Register    News    Help

Print Thread
#84153 26/05/04 12:58 AM
Joined: Oct 2003
Posts: 306
J
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Oct 2003
Posts: 306
on @1:join:#: { if ($istok(%malnicks,$nick,44)) { mode # +b $nick | kick # $nick Nick not allowed } }

%malnicks chupa,activo,pasivo,sexhot,sex_hot,bi16,bi_16,bi

i want kick the all nicks who is started with bi o act_

please thnx


mess with the best
#84154 26/05/04 04:00 AM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
on @*:join:#: {
if (( bi* iswm $nick ) || ($nick isin %malnicks)) {
mode # +b $nick
kick # $nick Nick not allowed
}
}

%malnicks chupa activo pasivo sexhot sex_hot

#84155 26/05/04 05:04 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

I'm going to guess a bit since I don' know what you mean with who is started with bi o act_

Does that mean nicks who can't be begin with "bi" or "act_" or does it mean that nicks can't begin with "bi" "o" or "act_" ...clueless

Anyway, the following piece of code will ban/kick any users that

1) has a nickname beginning with "bi" or "act_"
2) is a nickname that is in the variable %malnicks
Code:
  
on @*:JOIN:#: if $istok(%malnicks,$nick,44) || $regex($nick,/^(?:bi|act_)/) { ban -k # $nick 2 Bad nickname! }

%malnicks chupa,activo,pasivo,sexhot,sex_hot


Greetz


Gone.
#84156 26/05/04 10:54 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Just realized that "$istok(%malnicks,$nick,44)" is much better than "$nick isin %malnicks".

As for regex ... I would like to understand it, but .....

Last edited by gemeau50; 26/05/04 10:58 PM.
#84157 26/05/04 11:05 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I don't know if it's going to work, but maybe try $wildtok?


"All we are saying is give peace a chance" -- John Lennon
#84158 26/05/04 11:09 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
^ means that the string has to start with whatever follows it.
?: means that $regml() isn't filled with anything, so the $regex is quicker.
| is "OR", so it matches bi or act_.


New username: hixxy
#84159 26/05/04 11:25 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

here's 2 links that could really help you on your way regarding $regex:

http://www.mircscripts.org/archive/tutorials

You'll find some tutorials there, also one from tidy_trax in a very nice layout and well illustrated with colors. There's another one by Sigh_, and by Trystan.

Personally, I like this one a lot: http://www.regular-expressions.info/

After going through those tutorials, you should be able to already make basic regexes, and be able to explore more in depth of what great functionality regex offers.

Greetz


Gone.
#84160 27/05/04 01:23 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
tidy_trax FiberOPtics
Tx for the info.
smile


Link Copied to Clipboard