MLIA v1.0

By Gecko321 on Jun 15, 2012

Pulls a random MLIA quote

#Looks up random MLIA quotes
bind pub - !mila mila
proc mila {nick host hand chan arg} {

  set num [expr {int(rand()*10) + 1}]
  package require http
  set url "http://mylifeisaverage.com/"
  set page [http::data [http::geturl $url]]
  set b 1
  while {$b != $num} {
    incr b
    regexp {<div class="sc">(.*?)<\/div><} $page a mila
    regsub {<div class="sc">(.*?)<\/div><} $page "" page
  }
  putserv "PRIVMSG $chan :[string trim $mila]"
}

putlog "Random Mila v1.0"

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.