This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

soulseek up?fetching a piece of text in html

Old posts that have not been replied to for several years.
Locked
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

soulseek up?fetching a piece of text in html

Post by Thunderdome »

is there a way do to a script that detects if Soulseek server is up or down and what version is the most recent?
I have searched for it but I can't find it...
Last edited by Thunderdome on Mon May 02, 2005 6:29 pm, edited 1 time in total.
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Post by Thunderdome »

Code: Select all

# Set the chans you want to enable it in to +news 
# .chanset #channel +news 

# set this to the URL of the news file 
set newsfile "http://someurl.com/file.txt" 

# want the answer to come out in notice (0) or privmsg (1)? 
set tellwho 0 

setudef flag news 

if ![info exists egghttp(version)] { 
  putlog "egghttp.tcl was NOT successfully loaded." 
  return 
} 

bind pub - !news getlist 

proc getlist {nick uhost hand chan text} { 
 if ![channel get $chan news] return 
 set sock [egghttp:geturl $::newsfile [list processlist $nick]] 
} 

proc processlist {nick sock} { 
 set data [egghttp:headers $sock] 
 egghttp:cleanup $sock 
 set parse 0 
 foreach line [split $data \n] { 
  if $parse&&![string match ####* $line] { 
   if $::tellwho { 
    putserv "NOTICE $nick :$line" 
   } { 
    putserv "PRIVMSG $nick :$line" 
   } 
  } 
  if [string match -no Content-Type:* $line] {set parse 1} 
 } 
} 

IS there a way to adapt this...
To read this: http://www.remmelt.com/slskboard/status.php
?

I only want it to put out the:

"probing server... success.

the server is up and running!"

part....

How do I do this?
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Post by Thunderdome »

Anyone ? :)
Locked