| View previous topic :: View next topic |
| Author |
Message |
dAmN123 Voice
Joined: 24 Apr 2006 Posts: 2
|
Posted: Mon Apr 24, 2006 3:36 pm Post subject: Query a CS:S Server and say it to channel in specified time |
|
|
| Code: | set channel "#css.worldwide"
set time 20
set text {
"84.254.76.25:27015 #css.worldwide"
"There are currently $player players on $map"
"css.worldwide is powered by Linemax.de"
}
if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 60] }
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
proc go {} {
global channel time text timer
foreach chan $channel {
putserv "MODE $chan +m-c"
foreach line $text { putserv "PRIVMSG $chan :$line" }
putserv "MODE $chan -m+c"
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
} |
Now my Description:
Every 20 Minutes the Eggdrop have to set mode -c+m than he should wrote the text and $player stand e.g. for 10/14 and $map e.g. de_dust2
Now i don`t know how to go on i hope you can help me |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Mon Apr 24, 2006 5:36 pm Post subject: |
|
|
do you have a webpage with that infos or will the script be forced to trigger a direct query to the cs:s server? afaik that was a UDP/IP connection, if I am not mistaken which would require to call an extern IP app/script to fetch it. I am pretty sure there is some PERL script lurking around for that purpose. you will then have to fileevent (async exec with open |) and when its finished you can print your line (or print server down, if query failed ). _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
dAmN123 Voice
Joined: 24 Apr 2006 Posts: 2
|
Posted: Tue Apr 25, 2006 2:59 am Post subject: |
|
|
| hmm i have a website but not a script for query a gameserver and i`m not as good in tcl. can you give me the code? |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed Apr 26, 2006 5:11 am Post subject: |
|
|
If you have a website, easiest would be to use package http to query it. The FAQ Parsing webpages made easy is a nice example.
As mentioned above, as far as I know, CS:S servers uses UDP only and neither TCL nor Eggdrop supports UDP (though I think it wouldnt be that hard to rewrite CONNECT to something like CONNECTUDP, but its totally unneccesarrily effort). _________________ De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens... |
|
| Back to top |
|
 |
kanibus Halfop
Joined: 03 May 2005 Posts: 44
|
Posted: Mon May 22, 2006 1:36 pm Post subject: |
|
|
| there is a really nice rcon module written for the hl1 engine @ www.limit.org but im not sure if it will work for source servers as well |
|
| Back to top |
|
 |
|