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>),",") | 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