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

FordLawnmower Said:

still think it makes no sense at all to generate a random number to get the GMH message from the top of the page when you can get a truly random GMH message from here -->> http://api.givesmehope.com/view/random

 on $*:text:/^([!@])gmh$/iS:#: { 
  if ($sock(gmh)) sockclose gmh 
  sockopen gmh api.givesmehope.com 80 
  sockmark gmh $iif($regml(1) == @,msg #,.notice $nick) 
}
on *:sockopen:gmh: { 
  sockwrite -nt $sockname GET /view/random HTTP/1.1 
  sockwrite -nt $sockname Host: $+(api.givesmehope.com,$str($crlf,2)) 
}
on *:sockread:gmh: {
  var %gmh | sockread %gmh
  if ($regex(%gmh,/<author>(.+)<\/author>/)) { sockmark gmh $addtok($sock(gmh).mark,$regml(1),32) }
  if ($regex(%gmh,/<date>(.+)<\/date>/)) { sockmark gmh $addtok($sock(gmh).mark,$regml(1),32) }
  if ($regex(%gmh,/<text><\S+(.+)\]\]><\/text>/)) { $sock(gmh).mark $replace($remove($regml(1),<b>,</b>,<BR>),&quot;,") | sockclose gmh }
}
@gmh <&Sick0> gabysm11 2009-09-02 I was 10 I went to a presentation in other country with the dance group from school. When we got back, my mom was supposed to pick me up but something came up and I had to wait hours. My dance teacher took me to her house and even made me dinner while my mom got her things sorted and could get there. She GMH.
!gmh -Sick0- Anon123 2009-06-29 family and I disowned my sister for her years of her drugs and alcohol abuse. I found out she was in a homeless shelter so I picked her up and took her in. She has been sober for a year, and helps my brother every day with his baby because his wife is terminally ill with cancer. Now, she is the one holding the family together. GMH
 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.