napa182 commented on a Page, givesmehope socket  -  Feb 04, 2010

jsg55 instead of using this

 on $*:TEXT:/^[!@.]gmh/Si:#:{
sockopen gmh givesmehope.com 80
if (@ isin $1) sockmark gmh msg #
elseif (! isin $1) || (. isin $1) sockmark gmh notice $nick
}
on *:sockopen:gmh: {
var %x $r(1,154)
sockwrite -nt $sockname GET /?page= $+ %x HTTP/1.1
sockwrite -n $sockname Host: $+(www.givesmehope.com,$str($crlf,2))
}

i would use this instead

 on $*:TEXT:/^([!.@])gmh$/iS:#:{
  if ($sock(gmh)) sockclose gmh
  sockopen gmh givesmehope.com 80
  sockmark gmh $r(1,154) $iif($istok(!|.,$regml(1),124),.notice $nick,msg #)
}
on *:sockopen:gmh: {
  sockwrite -nt $sockname GET $+(/?page=,$gettok($sock(gmh).mark,1,32)) HTTP/1.1
  sockwrite -n $sockname Host: $+(www.givesmehope.com,$str($crlf,2))
}

then on output to the chan or notice use

$gettok($sock(gmh).mark,2-,32)
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.