19 Jan 13, 03:51AM
I'm working on a script that requires the IP of a player. Is there a way to parse whois or is there another command I should use to get the player IP for a certain CN?
Thanks.
Thanks.
Getting a player IP through CubeScript
|
19 Jan 13, 03:51AM
I'm working on a script that requires the IP of a player. Is there a way to parse whois or is there another command I should use to get the player IP for a certain CN?
Thanks.
19 Jan 13, 05:21AM
I know you could with tools.cfg, but that probably wouldn't be the best method
19 Jan 13, 05:36AM
Its not pretty, currently it involves using a recursive alias to scan the contents of $conline after a /whois is initiated.
I've suggested a method for silently returning player IPs via cubescript a few different times now, since its already possible with some (kludgy) cubescript, hopefully it will be implemented sooner or later.
I tried writing the recursive alias one, but it didn't work. Anybody know how to do it (preferably using tools.cfg)?
I have not used tools.cfg in a while, but it looks like something like this (may) work:
[cubescript] getIP = [ whois $arg1 result (at $whoisline 2) ] [/cubescript] /echo (getIP CN) Thank V-Man for doing all the hard work for you with alias whoisline. :)
19 Jan 13, 10:51PM
(19 Jan 13, 05:36AM)Bukz Wrote: Its not pretty, currently it involves using a recursive alias to scan the contents of $conline after a /whois is initiated. It exists already in SVN. Something like (player ip)
19 Jan 13, 11:02PM
I see. <3
20 Jan 13, 12:16AM
Thanks a lot, Bukz. I tried this, it was exactly what I needed.
|
« Next Oldest | Next Newest »
|