Dictionary definition search

By Master-Of-Death on Jan 14, 2010

Paste and Save in your remotes.

Syntax: !dr

Returbs 3 definitions if available.

(Again not the best I could do but still ok)

on *:TEXT:!dr*:#:{
  set %url /?w= $+ $2 $+ &ls=a
  set %chan $chan
  set %wordreg /(<span id="easel_def_off_(.)">)(.*)(</span>)/
  sockopen dr www.onelook.com 80
}
on *:SOCKOPEN:dr:{
  sockwrite -n $sockname GET %url HTTP/1.1
  sockwrite -n $sockname HOST: www.onelook.com $+ $crlf $+ $crlf 
}
on *:SOCKREAD:dr:{
  sockread %dr
  if (%dr1 == 3) { 
    unset %dr1
    sockclose $sockname
    halt
  }
  elseif ($regex(%dr,%wordreg)) {
    inc %dr1 1
    msg %chan 12 $remove($remove($remove($remove($remove($remove($regml(3),</span>),<font color=green><i><span id="easel_exs_off_),2">),0">),1">),3">) $+ )
  }
}

Comments

Sign in to comment.
ericfx   -  Mar 07, 2010

Thanks master-of-death! I tried this and it works well.

 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.