egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Query a CS:S Server and say it to channel in specified time

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
dAmN123
Voice


Joined: 24 Apr 2006
Posts: 2

PostPosted: Mon Apr 24, 2006 3:36 pm    Post subject: Query a CS:S Server and say it to channel in specified time Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Mon Apr 24, 2006 5:36 pm    Post subject: Reply with quote

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 Very Happy).
_________________
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
View user's profile Send private message MSN Messenger
dAmN123
Voice


Joined: 24 Apr 2006
Posts: 2

PostPosted: Tue Apr 25, 2006 2:59 am    Post subject: Reply with quote

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
View user's profile Send private message
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Apr 26, 2006 5:11 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
kanibus
Halfop


Joined: 03 May 2005
Posts: 44

PostPosted: Mon May 22, 2006 1:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber