Koolio
New member
"you could just remove the password."
You can understand why not many would assume that right, because that does not make any logical sense, remove password means remote connections are blocked, who would have thought
I've left the password on and just done the iptables as I have tried remote telnet directly.
does the server need to be restarted for new hooks to be used, and if the file is changed on the fly its updated without restart?
also basedir as in /home/sdtd/hooks/playerConnect/ping.sh ? or can the basedir be from the instance? /home/sdtd/instances/<Name>/
You can understand why not many would assume that right, because that does not make any logical sense, remove password means remote connections are blocked, who would have thought

I been waiting for something like this, gonna try it outSo I've been succesfully running PHP scripts in your evented .sh scripts with the #!/usr/bin/php shebang with the assistance of https://github.com/ngharo/Random-PHP-Classes/blob/master/Telnet.class.php .
<basedir>/hooks/playerConnect/ping.sh
And your done, the same goes for all other hooks like responding to chat /commands and cron for timed server messages.Code:#!/usr/bin/php <?php require_once('class-telnet.php'); .... $telnet = new Telnet('127.0.0.1','8081',10,''); $ping = getPing($argv[6]); $country = geoip_country_name_by_name($argv[6]); $telnet->exec('Welcome, '.$argv[4].'. Your ping is '.$ping.'ms ('.$country.')'; ?>
(remember cron doesn't unfortunately support incrementals so running something every 43 minutes actually only runs once an hour at 43 minutes past the hour, instead of 0:43, 1:26, 2:09, 2:52, etc... I'm not quite sure why but it sounds so retarded that there has to be a really, really, really absolute reason for it. Marvels of *nix I guess.)

does the server need to be restarted for new hooks to be used, and if the file is changed on the fly its updated without restart?
also basedir as in /home/sdtd/hooks/playerConnect/ping.sh ? or can the basedir be from the instance? /home/sdtd/instances/<Name>/