mIRC Home    About    Download    Register    News    Help

Print Thread
#90565 15/07/04 01:50 PM
Joined: Jul 2004
Posts: 40
D
dmmrs Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jul 2004
Posts: 40
ok, im not sure if anyone will be able to help.

i have this in my remotes:

ON *:TEXT:!ping*:#:/run ping.exe

now what i want is when someone types in "!ping xx.xx.xx.xx xx.xx.xx.xx" itll run the ping program with this command: "ping.exe xx.xx.xx.xx xx.xx.xx.xx"

where the two sets of groups of xx's are ip addresses, so that the ping program can ping a whole range at once. however, if someone then types !ping xx.xx.xx.xx xx.xx.xx.xx then my copy of mirc will read the two ips and run the ping.exe program with the two ips after the command.

not sure if im making total sense here, but if not then ask me to explain and i will.

thanks in advance.



i script, therefore i am smirk
theres logic in there somewhere...
#90566 15/07/04 02:03 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
I dont know why you want to /run ping.exe, but i certainly hope its not for some abusive reason and i hope you dont mean /ctcp .. ping - but in any event, if you want to PING each IP after the word !ping.. you would need to run a bat file since ping.exe uses only the last ip..

On *:Text:!ping*:#:{
write -c runping.bat
var %i = $numtok($2-,32)
while (%i) {
write runping.bat ping $gettok($2-,%i,32)
dec %i
}
run runping.bat
}


!ping xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx

Eamonn.

#90567 15/07/04 02:11 PM
Joined: Jul 2004
Posts: 40
D
dmmrs Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jul 2004
Posts: 40
thankyou for your help so far, and i assure you this is not for any abusive reasons.

its for my own channel, and i want to be able to check if someone is inactive cos we are on quite a buggy server.

the code you put works fine, however, it only comes up with one ip in the bat file.

i wanted it to run with both ips, with a space between.

can i only have 1 ip?

and the ping.eze file is one i have made myself that pings all ips between the two numbers, which is why i need the bat to note both ips...


i script, therefore i am smirk
theres logic in there somewhere...
#90568 15/07/04 02:14 PM
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Oh if your running your own file, then you can do:

On *:text:!ping*:#:{ .run -n yourfile.exe $2 $3 }

!ping xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx

Eamonn.


Link Copied to Clipboard