Jethro commented on a Page, quote socket  -  Nov 29, 2010

Jenny, use this edit:

alias quotes {
  sockopen quotes www.randomquotes.net 80
  sockmark quotes $iif($active = $1,.msg $1,echo -at) $&
    12,1[4,1Random Quotes12,1]
}
on *:sockopen:quotes:{
  var %quotes sockwrite -n quotes
  %quotes GET / HTTP/1.1
  %quotes Host: $+($sock(quotes).addr,$str($crlf,2))
}
on *:sockread:quotes:{
  var %quotes | sockread %quotes
  if (<p class="quote"> isin %quotes) {
    $sock(quotes).mark $remove($gettok($v2,2,62),<br,</p)
    sockclose quotes
  }
}
on $*:text:/^!(auto)?(quote)\b|(off)$/iS:#:{
  if !%t { inc -u6 %t
    if $regml(1) = quote { quotes # | halt }
    elseif $regml(1) = off {
      if $timer(auto) { .timerauto off | .msg # Auto quote has been turned off! }
      halt
    }
    else { goto $iif(!$2 || $2 !isnum,error,timer) }
    :error | .msg # $nick $+ , please enter a number. e.g. !autoquote 20 $&
      (This sets quote to message in the channel every 20 seconds.) | halt
    :timer
    $+(.timer,$regml(1)) 0 $2 quotes $!decode( $encode(#,m) ,m)
    .msg # Auto quote has been set to message the channel every $2 seconds!
    halt
  }
}

The commands are the same:

/quotes
!autoquote <second>
!off

I suspect you copied the unedited version before I updated it.

 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.