mIRC Home    About    Download    Register    News    Help

Print Thread
exempt ip #192858 11/01/08 08:40 PM
Joined: Oct 2007
Posts: 102
B
bcancer Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2007
Posts: 102
Any code that I can use to exempt certain ip from being ban from my script?

Last edited by bcancer; 11/01/08 08:40 PM.
Re: exempt ip [Re: bcancer] #192863 11/01/08 09:30 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Give the hosts you want to protect a level above 1, the return if the users level => 1


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: exempt ip [Re: bcancer] #192864 11/01/08 09:32 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The method depends on how your script is set up and also whether or not you're actually using IP's or if you're using the address mask, which may be a host instead of an IP.

The basic idea would be:

Code:
  if (255.255.255.255 isin $address($nick,2)) { return }
  else { ban code }


Note that you could also just use the User list and check for the user level and if the user has a "protected" level, don't ban. Like I said, it depends on your script and how you want to do it.


Invision Support
#Invision on irc.irchighway.net
Re: exempt ip [Re: Riamus2] #192868 11/01/08 10:15 PM
Joined: Oct 2007
Posts: 102
B
bcancer Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2007
Posts: 102
Cool it works, can I add more then one ip on that line? if so exemple please :P

Re: exempt ip [Re: bcancer] #192869 11/01/08 10:32 PM
Joined: Jul 2006
Posts: 3,702
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,702
Something like that should works :

if ($istok(Ip1 Ip2 Ip3 IpN,$token($wildsite,2,64),32)) { return }
else { ban code }


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: exempt ip [Re: Wims] #192876 11/01/08 11:35 PM
Joined: Oct 2007
Posts: 102
B
bcancer Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2007
Posts: 102
Tkx guys.

Re: exempt ip [Re: bcancer] #192899 12/01/08 11:21 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Wims showed you an example using the same idea I gave, but if you really want multiple exceptions, you're better off using the User List.


Invision Support
#Invision on irc.irchighway.net