Page 3 of 3

Posted: 09 Feb 2007 15:26
by Brianetta
It'll go in there at some point, but I'm currently more interested in getting the GUI working. If you want me to look at incorporating your changes, send me a diff against the current SVN version and I'll have a look at it.

Posted: 09 Feb 2007 16:12
by DaGeek
my Kludge's are a Major change of your brilliant code, just to make my exact
setup work..

I will post in a short wile with the whole script as my changes are like i say, Major...

The major changes are getting the 'Console Screenshots' working and moving
them to a predifined location, but i have also made some changes to make the autopilot
work with a 'Multi Server Instance' System from a Single script, rather than having the script copied all over the server.

I have a server setup that can create OpenTTD Game Servers 'On the Fly' with
AP support, so i just have 1 AP script and then one hell of a lot of SymLinks :)

I do use the MySQL add-on for AP but I'm just working on getting it to log more info.
Like ALL chat from ALL clients, just in case someone says something they shouldn't, I will have it logged.

Posted: 09 Feb 2007 21:44
by DaGeek
Hello Again Brianetta

In post 540872 @ http://www.tt-forums.net/viewtopic.php?p=540872#540872
you posted the code of your Banner Script...

I have been messing around with a few things and
wondered if you could point me in the correct direction...

How do you call the TCL script to make the .png file ?
Do you do it from the CLI or is it directly via http/Apache
I understand and can follow what the code is doing,
I just cant seem to see how you call the script..

Sorry if this soundz like a Lame Question. :oops:

Posted: 09 Feb 2007 22:57
by Brianetta
No, it's fine. It's called by the server as a CGI script. The source I posted is the CGI script. Use the same URL, but replace .tcl with .cgi - the two URLs are the same file, hardinked. I just use Apache rewrite rules to convert a .png filename into a script URL internally to the web server.

If you want a CLI-only version, have a look at this one:
http://ppcis.org/standard/udp_query.tcl

It just dumps the info as text to the console.

Posted: 10 Feb 2007 15:05
by DaGeek
Brianetta wrote:I just use Apache rewrite rules to convert a .png filename into a script URL internally to the web server.
Would you mind showing us your rewrite rules for this ?
If you want a CLI-only version, have a look at this one:
I have tried this from the CLI and I got an error..
After looking @ the code I found that the was an error on line 126.

Line 126 Should read:-

Code: Select all

puts $server_socket [binary format sc 3 0]
and not:-

Code: Select all

puts $-nonewline server_socket [binary format sc 3 0]

Posted: 10 Feb 2007 16:24
by DaGeek
I have added this feature to autopilot as a kind of Add-On..

With the Modz that I have made to my setup the CLI version is now
called/run every 60 Seconds, again this is now running on a server that
runs quite a few different instances of OpenTTD @ once so the way I have
set it up is to out put the info into separate file that are www accessible @
http://openttd.dageek.co.uk/{My OTTD Server Name}.txt

for example:- http://openttd.dageek.co.uk/DaGeek_Serv ... xample.txt

Posted: 11 Feb 2007 14:45
by Brianetta
DaGeek wrote:Line 126 Should read:-

Code: Select all

puts $server_socket [binary format sc 3 0]
and not:-

Code: Select all

puts $-nonewline server_socket [binary format sc 3 0]
Any Ideas ?
Yeah, I found and fixed that in the signature image script last week. I didn't update the CLI one, because I never use it and don't maintain it. The only problem with the extra newline is an additional packet containing only that CR, which produces an error on the dedicated server's console. It's ugly and wrong, but not the end of the world...

Posted: 18 Apr 2007 03:48
by minime
I have taken the liberty to port Brianetta's script to PHP and play with the banners a little bit. Here are a few examples of the banners produced:

Image

Image

Source code is licensed under Gnu GPL, you can get it via [url=svn://svn.dan-masek.eu/code/php_ottd_info/trunk]SVN[/url] or browse it online.
For more information, examples and a banner link generator, check out http://dan-masek.eu/ottd/ .

minime

Posted: 18 Apr 2007 22:00
by osai
minime,
That is awesome!
May I use your php script to show server information at our homepage?
And of course I want this banner in my signature. :)


Thx,
Osai

Posted: 18 Apr 2007 22:33
by minime
Of course you can. Just keep in mind this still more of an alpha-stage software.

So far I have tested it under Debian/Apache 2.2/mod_php 5.2.0 and WinXP/Apache 2.2/mod_php 5.2.1

Posted: 19 Apr 2007 20:58
by osai
No Problem Minime,
almost everything we use is nightly or stable or whatever :)

I checked out your repo via svn, so we are always up-to-date.
I tweacked the .htaccess file a bit, so you can only access our Banner via our url code. To prevent usage of others. This might also be a "feature".

I also showed the banner to some ppl, for feedback. And they said the font-size is a little bit too small, the information are not good readable.

Regards,
Osai

Posted: 19 Apr 2007 23:31
by minime
And they said the font-size is a little bit too small, the information are not good readable.
Yeah, I'll have to switch to using TrueType fonts in order to support UTF-8 properly, I'll use the opportunity to enlarge the text a little.

Thanks for the feedback.