This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Game Server Query Script

Old posts that have not been replied to for several years.
A
Abysmal

Game Server Query Script

Post by Abysmal »

Hi all,

Well im pretty new to eggdrop and TCL, and so don't know a great deal :-? What I am after, is a TCL script that queries a game server, for example in a file you had the lists of a company, and their server numbers and then IP addresses. Say you wanted to query server 1 from barrysworld. Is this possible?
!query barrysworld 1 cs
Ive seen a script about on the web before, but it just would not work for me, the functions were idential to what I would like. It used Q stat, thats about as much as i can remember. Please if anyone can help me out with this, ill be a truely happy bunny :D
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I am in the mood for writting such a script, but I am unable to locate protocols of any games servers.

If such info becomes available, I may write one.
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

[quote="ppslim"]I am in the mood for writting such a script, but I am unable to locate protocols of any games servers.

If such info becomes available, I may write one.[/quote0]

use qstat tool, it querys Q1 / Q2 / Q3 / HL Engine Servers (this includes mods !!).

I've modified my qstat4eggdrop.tcl so that I can define servers in 2 lines.

But i'm not into tcl scripting, so i can't do it by partline..maybe i'll start learing TCL...
A
Abysmal

Post by Abysmal »

ppslim,

Game server queries are done with UDP i think. At least thats what gamespy and other PHP query scripts use.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

If it is done via UDP, then there is no current way of doing it.

However, I have heard of *nix programs, that will download stats from game servers.

The output can be re-directed to file (via a cron job, so that the load on the script, is not too high), and read by a script.
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

ppslim wrote:If it is done via UDP, then there is no current way of doing it.

However, I have heard of *nix programs, that will download stats from game servers.

The output can be re-directed to file (via a cron job, so that the load on the script, is not too high), and read by a script.
may i tell ya that qstat does EXACTLY this ? it dumps server infos directli into a template file (eg. The $servername is having $players / $maxplayers ....) which the bot gives out...
A
Abysmal

Post by Abysmal »

yea thats what the script i seen done, however it didnt work, and was a discontinued script, so it wont be finished :( If anyone fancys a hack at it, http://www.qstat.org for Qstat.
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

nah, the scripts works perfekt...

maybe u didn't edit the template, qstat4eggdrop 1.5 is workin perfekt

u can chek @ #pmp in quakenet, Daddelgott is my bot...
S
Squirre1
Voice
Posts: 14
Joined: Thu Jul 18, 2002 12:49 am

Post by Squirre1 »

You say you have qstat4eggdrop 1.5...

I am only finding 1.0..

If you have a newer version can you post a link to it. That would be greatly appreciated...
E
Eequalsmcsquare

Post by Eequalsmcsquare »

Here is a newer version: http://www.zvdk.nl/~lagg/qstat4eggdrop2.0.tcl
Here is the site for Qstats: http://www.qstats.org
And here is the site of the maker of the OLD qstat4eggdrop with a little HOWTO (very little): http://micke.peachpuff.com/eggdrop/qstat4eggdrop.html

I was working on it too, but i can't get it to work.
Now I am using qstats 1.5, but i can't get over it that i have to use an outdated version.

I run a server community with a few people with more then seven servers and a lively IRC channel #zvdk on quakenet.

The 2.0 version of qstat4eggdrop.tcl only has a little piece of quake2 code, and i am too n00b to convert it to HL.

Can anyone of you guys help me?

[ZVDK]Eequalsmcsquare
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

just get back to 1.5 and modify it..

look @ daddelgott in #pmp @ qnet
S
Squirre1
Voice
Posts: 14
Joined: Thu Jul 18, 2002 12:49 am

Post by Squirre1 »

GodOfSuicide wrote:just get back to 1.5 and modify it..

look @ daddelgott in #pmp @ qnet
Once Again where is 1.5....
User avatar
GodOfSuicide
Master
Posts: 463
Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria

Post by GodOfSuicide »

E
Eequalsmcsquare

Post by Eequalsmcsquare »

GodOfSuicide wrote:just get back to 1.5 and modify it..

look @ daddelgott in #pmp @ qnet
And modify it, modify what?
I suck at coding .TCL, that's why i'm here, to ask for help.

[ZVDK]Eequalsmcsquare
S
Squirre1
Voice
Posts: 14
Joined: Thu Jul 18, 2002 12:49 am

Post by Squirre1 »

Does anyone have the *.qstat files aka. the templates...

When I try to do the query, it just returns this error...
[12:49] Tcl error [hls]: couldn't duplicate input handle: bad file number
Last edited by Squirre1 on Sun Jul 21, 2002 1:49 pm, edited 1 time in total.
Locked