Getting a player IP through CubeScript
#1
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 given by:
#2
I know you could with tools.cfg, but that probably wouldn't be the best method
Thanks given by:
#3
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.
Thanks given by:
#4
I tried writing the recursive alias one, but it didn't work. Anybody know how to do it (preferably using tools.cfg)?
Thanks given by:
#5
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. :)
Thanks given by:
#6
(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.

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.

It exists already in SVN. Something like (player ip)
Thanks given by:
#7
I see. <3
Thanks given by:
#8
Thanks a lot, Bukz. I tried this, it was exactly what I needed.
Thanks given by: