mIRC Home    About    Download    Register    News    Help

Print Thread
#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.
bcancer #192863 11/01/08 09:30 PM
Joined: Feb 2003
Posts: 3,432
S
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,.) }
bcancer #192864 11/01/08 09:32 PM
Joined: Oct 2004
Posts: 8,330
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
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

bcancer #192869 11/01/08 10:32 PM
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Something like that should works :

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


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
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.

bcancer #192899 12/01/08 11:21 AM
Joined: Oct 2004
Posts: 8,330
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

Link Copied to Clipboard