if you need an eggdrop script that interfaces those games/systems/servers/whatever, provide detailed interface protocol specifications and hope for the best (i.e. someone with nothing better to do to bother and write it for you)
or hope someone will have exactly what you want, chanses of which are slim to none
bind time - * qstat ;# runs every minute
proc qstat {m h d mo y} {
if ![catch {set res [exec /path/to/qstat -ut2s 217.77.176.198:7777]}] {
foreach line [split $res \n] {
puthelp "privmsg #channel :$line"
}
}
}
is it possible to just have the map map name so in the channel it shows something like
eggdropbot: map has changed to ONS-Dinora-32p-
also the script prints the qstat output every minute as some rounds can last over an hour could it be changed to only print the map name when the map changes to a different one?
I suggest you use something else like the rcon module then, i'm sure that can detect map changes upon change. Having to do it with a timer is probably messy unless you make variables to even see if the map has changed.
Also, there is a script called Qstat4Eggdrop in the TCL Archive. You can use that script to query servers and get the stats/players.
is tcl a poor language?
even with my very basic understanding of (er) basic i managed this.
--------------------------------------------------------------------------------------
WHILE INKEY="" #loop until you hit a key
RUN "/usr/local/bin/qstat -ut2s 217.77.176.198:7777 -xml -of /home/lee/documents/qstat.output" #run qstat & output to a file
OPEN "/home/lee/documents/qstat.output" FOR INPUT as #1 #open the file
FOR a=1 to 6 : LINEINPUT #1, blank$ : NEXT a #skip the first 6 lines
LINEINPUT #1, mapline$ #read the map line
qstat$=MID(mapline$,8,LEN(mapline$)-13) #cut out the map name
IF qstat$<>map$ THEN map$=qstat$ : PRINT map$;" is starting on titan 32p Onslaught" #print the map name and extra text
CLOSE #1 #close the file
now that's a great occasion for you to learn some Tcl; apparently you already have some programming skills, so it wouldn't be that hard to give Tcl a try; there is hardly any use of Basic these days, but Tcl will enrich your programming experience and possibly help you with your school projects (or who knows, maybe even help you to get a job if you need one)