English Vocabulary Definition Checker

By Jethro on Sep 21, 2011

This is yet another request by California who wishes to have a formal English definition checker.

The command is once again self-explanatory:

!check OR .check OR @check <word here to check its defintion>
!check jaytea No Search Result Found for "jaytea" !check napa **Definition:** Plant with an elongated head of broad stalked leaves resembling celery. !check approbation **Definition:** Official approval. !check abstruse **Definition:** Difficult to penetrate. !check food for thought **Definition:** Anything that provides mental stimulus for thinking.You can also use a self-trigger !check from your own input using the same command and its prefixes.
on *:sockclose:dict*:{
  tokenize 96 $sock($sockname).mark
  $5 No Search Result Found for $qt($replace($1,+,$chr(32)))
}
on *:sockopen:dict*:{
  tokenize 96 $sock($sockname).mark
  if ($sockerr) { $5 There's an issue for connection! | halt }
  $2 GET $+(/?Query=,$1,&button=Search) $3
  $2 Host: $+($sock($sockname).addr,$str($crlf,2)) | $2 $4
}
on *:input:*: if ($regex($1-,/^[!@.]check( |$)/iS)) dict $2-
on $*:text:/^[!@.]check( |$)/iS:*:{
  if (!$2) { .notice $nick Syntax: !check <Word> }
  elseif (%fc) { .notice $nick You can only check a definition every 3 seconds! }
  else { inc -u3 %fc $+($network,$cid,$wildsite) | dict $2- }
}
alias -l dict {
  var %dict $+(dict,..,$str($ticks,5),..,$cid,..,$network,..,$site)
  $+(sock,$iif($sock(%dict),close,open) %dict freedictionary.org 80)
  sockmark %dict $+($replace($strip($1-),$chr(32),+),`,sockwrite -nt %dict,`,$&
    HTTP/1.0,`,Connection: close,`,$iif($event = input,msg,.msg) $iif(#,#,$nick))
}
on *:sockread:dict*:{
  tokenize 96 $sock($sockname).mark
  if ($sockerr) { $5 There's an issue reading the website! | halt }
  var %dict | sockread %dict
  if ($regex(%dict,/<span class="d(efinition)">(.*)<\/span>/U)) { 
    $5 $+($chr(2),$+(D,$regml(1)),:,$chr(2)) $+($regsubex($right($regml(2),$&
      -1),/^(.)/,$upper(\1)),.) | sockclose $sockname
  }
}

Comments

Sign in to comment.
alabama   -  Oct 16, 2011

Apparently someone lowered it out of spite.

So if you gave me a 9, someone would have to score me a 1 or 2 to lower my overall rating. Whoever scored people's snippets badly without a reason why is simply a lame duck. I can easily guess who did it, but I won't mention "him" to divulge his childish act. I know I deserve much better than that son of a gun.

i gave it a 10

More
 Respond  
Pangaea   -  Oct 07, 2011

heh, yea i do worry myself sometimes

More
 Respond  
jaytea   -  Oct 07, 2011

well it's a good thing we're 5 years and 25 versions past 6.2 ;) otherwise, yes, that would be a real worry.

More
 Respond  
Pangaea   -  Oct 07, 2011

dont think this will work with 6.2

More
 Respond  
irchainscriptz   -  Sep 23, 2011

Nice snippet jethro!!

More
 Respond  
blackvenomm666   -  Sep 23, 2011

its no problem jethro we all know you don't deserve a score like that

More
 Respond  
x1L22   -  Sep 23, 2011

Thank youuu Excellent

More
 Respond  
Jethro   -  Sep 23, 2011

Thank you all again for bumping up my score rating after someone's lame attempt to make it look bad.

More
 Respond  
napa182   -  Sep 23, 2011

You are welcome Jethro.

More
 Respond  
Jethro   -  Sep 22, 2011

Yes, it's for a good laugh is all. Of course, napa can mean a number of things. This script has been made to merely fetch the first, single result relevant to the definition you're checking.

And thank you, napa182.

More
 Respond  
napa182   -  Sep 22, 2011

lol @ SunnyD an nice lil socket Jethro 9/10 +Like

More
 Respond  
Sorasyn   -  Sep 22, 2011

Note to self: Napa is a plant with an elongated head of broad stalked leaves resembling celery.

Haha that was a good laugh. :P

More
 Respond  
Jethro   -  Sep 22, 2011

Thank you all for your kind and generous support toward my work.

More
 Respond  
GrimReaper   -  Sep 22, 2011

Nice snippet Jethro_, Nice output and everything.. Gave a Like and 10 rating because the score as it was, Was not good enough imo, Someone being jealous and lowering the score like that is well out of order..

More
 Respond  
blackvenomm666   -  Sep 22, 2011

yes yes dean can be a bit juevenile can't he? haha nicely done jeth +like and i'll boost your score for ya specially since it was lowered out of jealousy

More
 Respond  
Jethro   -  Sep 22, 2011

Apparently someone lowered it out of spite.

So if you gave me a 9, someone would have to score me a 1 or 2 to lower my overall rating. Whoever scored people's snippets badly without a reason why is simply a lame duck. I can easily guess who did it, but I won't mention "him" to divulge his childish act. I know I deserve much better than that son of a gun.

More
 Respond  
chachin   -  Sep 22, 2011

thanks.. another great snippet from the great Jethro 9/10 :D

More
 Respond  
alabama   -  Sep 22, 2011

cool

More
 Respond  
Jethro   -  Sep 21, 2011

I've edited a minor oversight.

More
 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.