mIRC Home    About    Download    Register    News    Help

Print Thread
#135760 16/11/05 09:35 PM
Joined: Nov 2005
Posts: 2
N
Niss Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Nov 2005
Posts: 2
I need a script to do something that's too hard blush .

Code:
(22:24:02) (.Niss) !pi
(22:24:03) (.NEWMAPSBOT) Id      Name     Score Side  Ping       Address  Kbits/s  Time           RG
(22:24:03) (.NEWMAPSBOT) 1    ryg5hnvdh  221    GDI  194      81.68.145.X  117 000.08.27        x 


In short when i do a !pi (Player Info) the bot will show a list of people who are ingame playing and some info, including IP.
I have a Banlist of IP's (list is over 100 people, and servers are almost always full with 40 players) and checking every single IP is too much work, specially with people leaving/joining every time.

Now i need a script to check the IP (6th word bot will say) and if it matches ban on sight list ban the second word bot say's (Players name).

I got to this:

Code:
}
on *:TEXT:#: {
   if ( $6 == IP ) {
      msg # !kb $2 BOS
   }
}


It doesn't work am i doing something wrong confused.

EDIT: Btw if this IS correct tell me so i will get someone else to try it since my IRC is scripted and very weird grin.

Last edited by Niss; 16/11/05 09:38 PM.
#135761 16/11/05 11:28 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
First create a text file called BANNED_IPS.TXT with the one IP per line, ie
192.168.0.1
10.0.0.1
127.0.0.1
etc

Then try this remote

on *:TEXT:& & & & & & & & &:#:{ if (($nick == NEWMAPSBOT) && ($read(banned_ips.txt,nts,$6) || $readn)) { inc -z %delay.msg.chan.!kb | .timer 1 %delay.msg.chan.!kb msg $chan !kb $remove($2,$) } }

#135762 22/11/05 06:05 PM
Joined: Nov 2005
Posts: 2
N
Niss Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
N
Joined: Nov 2005
Posts: 2
Sorry for not responding a while we thought our host was cutting us off for no reason (Again) but our router was malfunctioning blush.

I will try that right now thanks smile.


Link Copied to Clipboard