Rant

By Dodge on Oct 02, 2012

Rant Random Thoughts. load to remotes /load -rs randomthought.txt(or whatever you saved It as)
Turn on In main menu. Enter the number of times you would like the random thoughts to be displayed.
And Enter the time in seconds between each random thought to be messaged. .:Arranged by Dodge:.
There Is a remote to remotly control this script. Anyone can use the trigger -rant

*\Rant Random Thoughts. load to remotes /load -rs randomthought.txt(or whatever you saved It as) 
*\Turn on In main menu. Enter the number of times you would like the random thoughts to be displayed.
*\And Enter the time in seconds between each random thought to be messaged. .:Arranged by Dodge:.
*\There Is a remote to remotly control this script. Anyone can use the trigger -rant 
on *:TEXT:-rant*:#: { rath }

alias rath {
  inc -u2 %rt.flood
  if (%rt.flood > 2) { halt }
  if ($sock(rt)) { sockclose rt }
  sockopen rt randomthoughts.ws 80
  sockmark rt #
}

on *:sockopen:rt: {
  if (!%rt.idx) set %rt.idx 44000
  set %rt.last $r(1,%rt.idx)
  sockwrite -n rt GET /page.php?lim= $+ %rt.last HTTP/1.1 $+($crlf, HOST: randomthoughts.ws, $str($crlf,3))
}

on *:sockread:rt: {
  sockread %rt | if (!%rt || $sockerr) { halt }
  if ($regex(%rt, /<a href="recent_comments.php">(.*)</i)) { set %rt.idx $remove($striphtml($regml(1)),$chr(44)) }
  elseif ($regex(%rt,/<h1>Random Thoughts(.*)<\/span/i)) { 
    msg $sock(rt).mark 12 $striphtml($regml(1)) 
    sockclose rt 
  }
}

alias -l striphtml { return $regsubex($1-, /(<(?:.+?)>)/g, $null) }

alias thoughts {
  /timerratho $?="Enter Number of Messages" $?="Enter Time Between Messages In Seconds" /rath
}

menu channel {
  «»RandThoughts«»
  .On :/thoughts
  .Off :/timerratho off
}

Comments

Sign in to comment.
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.