How do I write current server to a file?
#4
/curserver can do that. It takes a numerical argument to decide what to output.
Example:
alias serverinfo [
echo IP:Port: (curserver)    // outputs IP and port
echo IP: (curserver 1) // outputs IP
echo hostname: (curserver 2) // outputs hostname
echo Port: (curserver 3) // outputs port
]
With the examples I posted, you can type /serverinfo at any time you're connected, and stream your console output to a text file by editing your assaultcube.bat file:
bin_win32\ac_client.exe --mod=mods --init %1 %2 %3 %4 %5  >>log.txt
Running the .bat file will create (and thereafter add to) a text file called log.txt containing all your console output. You can then extract server information by searching specific strings relating to it.



Another way to do this is to save an alias-creating alias and use writecfg to store it in saved.cfg:
alias storeinfo [alias serverinfo (curserver); writecfg]
then, typing /storeinfo at any time when you are connected will store the info in saved.cfg. You can extract the info from saved.cfg (It is basically just a text file) by searching for the string "serverinfo".
Thanks given by:


Messages In This Thread
RE: How do I write current server to a file? - by V-Man - 06 Nov 10, 02:23PM