napa182 commented on a Page, Random fact  -  Mar 30, 2010

NaX Said:

Is there a way to make a "msg" command? Like:

/msg fact

or

!fact

Random fact :D ? trigger for ur self is /fact for others @fact ``` alias fact { if (!%f) { inc -u3 %f if ($sock(facts)) sockclose facts sockopen facts www.randomfunfacts.com 80 sockmark facts msg # [You're Random Fact] } } on $*:text:/^@fact$/iS:#:fact on *:sockopen:facts: { sockwrite -n facts GET / HTTP/1.1 sockwrite -n facts Host: $+($sock(facts).addr,$str($crlf,2)) } on *:sockread:facts: { var %facts | sockread %facts if ($regex(%facts,/(.+)<\/i>/)) { $sock(facts).mark $regml(1) sockclose facts } } ```
 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.