all i would like to know, is how to make tcl give socket information to users who type a certain trigger. like if someone types !serverstats - it should notice the user whether the a server is up/online or down/offline... my question is then, how do i make a tcl like that? whats the code?
set ip "127.0.0.1"
set port "21"
bind pub -|- !serverstats pub:serverstats
proc pub:serverstats {nick uhost hand chan text} {
global ip port
if {[catch {socket $ip $port} msg]} {
putserv "PRIVMSG $chan :Server is offline. "
} else {
putserv "PRIVMSG $chan :Server is online. "
close $msg
}
oh... thanks! is it also possible to make it ping-check the server? like, when it gives the info that the server is on,it tells the ping for that server as well. where do i add that?
also,how do i make a partyline command for this function? (how to check if the server is on/off via partyline)
thanks a lot for the help, gb, and thanks again if you or/and someone else can help me with this!
hmm....i would like my bot to display/notice the user 2, 3 or more server info (if the servers are on or off + ping),how do i make the script to display more than 1 server info/stats + ping at a time? like, here's the bot's respond when i type the trigger !serverstats: server 1 = online + ping, server 2 = offline + no ping and server 3 = online + ping.
how??
thank you A LOT in advance..... sry to be such a bother!!
so theres NO ONE that knows how to do this?? if there IS someone, please help me so i can stop bothering,which i dont like to do,thus im probably doing it right now,sorry...
alot of us know how to do this... but you can't just come in here and expect us to make the scripts for you.
If you'd bothered to learn a minimum of tcl you would know how to make it into a partyline command, but since you don't seem to wanna learn, I won't, and I doubt others will, make this script for you. Do an effort to learn and we will help you once/if you get stuck.