mIRC Home    About    Download    Register    News    Help

Print Thread
#197881 16/04/08 03:05 AM
Joined: Jul 2007
Posts: 1,124
T
Tomao Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
I am an op and can ban IP addresses, and I was wondering if anyone can show me a snippet that bans an IP as such: 64.125.13.*
Yes, instead of banning the whole octets, I would like it to leave out the last number and replace it with * at the end.

I hope you get my drift.

p.s. I was thinking using the $right, $remove, $replace and $mid identifiers to go about this, but I'm sure you have a better idea to show me the right way.

Thanks in advance

Last edited by Tomao; 16/04/08 03:07 AM.
Tomao #197886 16/04/08 04:39 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Presuming the IP address is in $1, then use $+($gettok($1,1-3,46),.*)

Joined: Jul 2007
Posts: 1,124
T
Tomao Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
smile Thanks so much for the answer, RusselB! You rock!


Link Copied to Clipboard