I wanna know if exists a tcl what can change topic of the shell channel , for example, when its working it changes the topic to "Shell UP, visit us at blablabla" and when something happens and its go down it will change the topic.
this depends if the bot is running on the shell thats going down or not . you might want to check its avaiblity using socket either checking timed based or just hoping your system will close the tcp sock, if the shell goes down . you can always change the topic like:
putserv "TOPIC $chan :Shell is \002down\002 - $defaulttopictext"
for further infos about socket and events connected to such, you should read "The Manual". Its quite an intressting story .
De Kus wrote:you should read "The Manual". Its quite an intressting story .
The ending made me cry..
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
There is no actual way to detect that. Because when the box is down nothing on it can run not even an eggdrop. So we are unable to detect it.
However if the box is offline then maybe if we try to resolve some dns's on the vhosts or the hosts they may not resolve which can be a possible YES the box is down.
So heres my suggestion:
Load 2 eggdrops. Eggdrop #1 on the machine where you want to find the status, if it is UP or DOWN and Eggdrop #2 on some other machine. Both eggdrops should be on the same channel.
When Eggdrop #1 quits from the channel, hopefully ping out or say doesnt get klined, banned or whatsoever make Eggdrop #2 set the topic as STATUS: DOWN as your box went down generally the message is "Client closed connection" if the process wasn't killed and the box was restarted or went down. When Eggdrop #1 comes back up joins the channel make Eggdrop #2 set the topic STATUS: UP.
Now detecting them in channels wouldn't be my kind of idea. You can maybe try to add both to the watch/notify list.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
seem I have point out my suggestion. If the bot doing the topic change is on another box, then the box itself. I would just recommend to do open a socket on a port which is always open (like 113 for identd, or 80 for http or 23 for ssh, just as 3 suggestions. maybe you check all 3 of them). if the connection fails the box is down, simply idea, what? thats at least the way you usually check avaiblity of servers. no matter if shell, game server or whatever .
If you set a timed event every minute (make sure timeout is below 60sec, otherwise better make 5min interval or so) you can check very accurate. In case of 1min you could even say you will ignore first failure and declare offline only on the second in a row.
yeah but its not certain that the bot is on the same box but anyway you could make sur and when the bot splits check sshd with async socket, no point doing this timed .. i have never know a ssh to be down or an ftp.. so.. no use
but if a eggdrop splits from a botnet that can be lots of reasons so when the bot splits you could check a socket and see if it's still online..