random facts socket

By blackvenomm666 on Nov 23, 2010

simple random facts socket type /rdmfact

alias rdmfact {
  sockopen randomfact www.randomfunfacts.com 80
  set -u3 %rdmfact msg $active 12,1[4,1Random Facts12,1]
}
on *:sockopen:randomfact: {
  sockwrite -n $sockname GET / HTTP/1.1
  sockwrite -n $sockname Host: $+($sock(randomfact).addr,$str($crlf,2))
}
on *:sockread:randomfact: {
  var %randomfact | sockread %randomfact 
  if ( *<i>* iswm %randomfact) {
    %rdmfact $remove(%randomfact,<i>,</i>,</strong>,</font>,&nbsp;,</td>,<strong>)
    sockclose randomfact
  }
}
Sign in to comment.
Jethro   -  Nov 26, 2010

Or you can still delete comments, but be sure you indicate the nickname of whom you address your concern over his or her suggestion...

 Respond  
napa182   -  Nov 26, 2010

blackvenomm666 if you are going to delete his comments then maybe don't reply to them cause it confuses people. ;x lol

 Respond  
blackvenomm666   -  Nov 26, 2010

i didnt mean you aucun teen posted on here telling me to use regex i deleted his comment and posted that

 Respond  
Aucun50   -  Nov 25, 2010

sockmark isn't regex, it's just like setting a var but one that unsets after the socket has been closed.

 Respond  
blackvenomm666   -  Nov 25, 2010

i didnt want regex tis why i didnt use it

 Respond  
Aucun50   -  Nov 25, 2010

Maybe you could make use of the sockmark command and get rid of that var.

alias rdmfact {
  sockopen randomfact www.randomfunfacts.com 80
  sockmark randomfact msg $active 12,1[4,1Random Facts12,1]
}
on *:sockopen:randomfact: {
  sockwrite -n $sockname GET / HTTP/1.1
  sockwrite -n $sockname Host: $+($sock(randomfact).addr,$str($crlf,2))
}
on *:sockread:randomfact: {
  var %randomfact | sockread %randomfact 
  if ( *<i>* iswm %randomfact) {
    $sock(randomfact).mark $remove(%randomfact,<i>,</i>,</strong>,</font>,&nbsp;,</td>,<strong>)
    sockclose randomfact
  }
}
 Respond  
napa182   -  Nov 25, 2010

nice lil socket blackvenomm666. Im glad to see you getting better at making them. At lest you take the advice an help that is offered to you an make it ur own.

 Respond  
Dark|   -  Nov 23, 2010

the animal names sounds cool ;P

 Respond  
Dark|   -  Nov 23, 2010

haha teen, You're on a roll?

 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.