This was my First socket I made for my new site I purchased...
It's pretty easy, but I'm new to sockets, so here.
Edit: If any one can provide some Socket Tutorials that would be great :) and maybe give me some tips, much appreciated
alias -l htmlfree {
; It's local because it won't be used by the command line, only this file.
; Local aliases avoid conflicting names.
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, )
return %x
}
on *:text:!forums:#:{
/sockopen f2 thecodebook.org 80
set %nick $nick
}
on *:sockopen:f2:{
sockwrite -n $sockname GET /index.php HTTP/1.1
sockwrite -n $sockname Host: thecodebook.org $+ $crlf $+ $crlf
}
on *:sockread:f2:{
if ($sockerr) {
echo -a Error.
halt
sockclose $sockname
}
else {
set %h
sockread %h
if (*users online* iswm $remove(%h,$chr(09))) {
echo -t $regsub(%h,/<[^>]*>/g,,%h)
notice %nick Their are a total of $gettok(%h,5,32) Users on HTttp://TheCodeBook.org $gettok(%h,9,32) Registered, $gettok(%h,11,32) Hidden, $gettok(%h,14,32) Guests.
sockclose $sockname
}
}
}