<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/21093" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2022-02-24T14:24:59-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/21093</id>

		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2022-02-24T14:24:59-04:00</updated>

		<published>2022-02-24T14:24:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110944#p110944</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110944#p110944"/>
		<title type="html"><![CDATA[Dictionary Lookup v1.4 update...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110944#p110944"><![CDATA[
Dictionary Lookup (jaxson)<br><br>Version 1.4 (update by SpiKe^^) <br>New Experimental Fix for tcl-tls version checking and related errors.<br>New Code to follow redirect for "301 Moved Permanently" for things like "draws" and "Another". <br>New Code tries to query defitions for common phrases  (Example:  .dict trial by fire ). <br><div class="codebox"><p>Code: </p><pre><code># Description: This script will query dictionary.com and give a simple response## v1.0  Initial release giving a simple dictionary result (jaxson)# v1.1  Added the .dictChan command to allow a channel access to the .dict command (jaxson)# v1.2  Fix for wrong color procs - my bad for copying colors from one of my other scripts doh!## v1.4  New Experimental Fix for tcl-tls version checking and related errors.  (SpiKe^^)#       New Code to follow redirect for "301 Moved Permanently" for things like "draws" and "Another".#       New Code tries to query defitions for common phrases  (Example:  .dict trial by fire ).# Needed packagespackage require http 2.3package require tls 1.6.4package present Tcl 8.6# Colors availableproc crev     {} {return \026}    ;#reverseproc culine   {} {return \037}    ;#underline proc cbold    {} {return \002}    ;#boldproc coff     {} {return \003}    ;#color-offproc cwhite   {} {return \00300}proc cblack   {} {return \00301}proc cdkblue  {} {return \00302}proc cgreen   {} {return \00303}proc cred     {} {return \00304}proc cbrown   {} {return \00305}proc cpurple  {} {return \00306}proc corange  {} {return \00307}proc cyellow  {} {return \00308}proc cltgreen {} {return \00309}proc ccyan    {} {return \00310}proc cltblue  {} {return \00311}proc cblue    {} {return \00312}proc cpink    {} {return \00313}proc cgrey    {} {return \00314}proc cltgrey  {} {return \00315}# Some variablesset dt(link) "https://www.dictionary.com/browse/"set dt(version) "v1.4"# channel flag# .dictChan on &lt;- to enable on your #channel / .dictChan off &lt;- for turn this off!setudef flag dictionarybind pub - ".dict" dictionaryLookupbind pub o ".dictChan" dictionaryControl######## made a new httpsregister ########proc httpsregister {} {  set tlsver [package present tls]  set test 0  if {$test} {putlog "proc httpsregister::: tlsver = ($tlsver)"}  if {[package vcompare $tlsver 1.7.11] &gt;= 0 } {    if {[catch {::http::register https 443 [list ::tls::socket -autoservername 1]} err]} {      if {$test} {putlog "check 1b :err = ($err)"}      ::http::register https 443 [list ::tls::socket -servername www.dictionary.com]    } elseif {$test} {putlog "check 1"}  } elseif {[package vcompare $tlsver 1.7] &gt;= 0 } {    if {$test} {putlog "check 2"}    ::http::register https 443 [list ::tls::socket -servername www.dictionary.com]  } else {    if {$test} {putlog "check 3"}    ::http::register https 443 [list ::tls::socket -request 0 -require 1 -ssl2 0 -ssl3 0 -tls1 1]  }}######## end of new httpsregister ########proc httpsunregister {} {  ::http::unregister https  return 0}proc putmsg {dest text} {  puthelp "PRIVMSG $dest :$text"}proc dictionaryLookup {nick uhost hand chan arg} {  global dt  if {![channel get $chan dictionary]} { return 0 }  set arg [regsub -all -- {\s{2,}} [string trim [stripcodes * $arg]] { }]  if {$arg eq "" || [string length $arg] &gt; 70 || [llength [split $arg]] &gt; 10} {    putmsg $chan "[cblue]Usage:[coff] [cbold].dict &lt;word or short phrase&gt;[cbold]"    return 0  }  set txt [string map [list " " "-" "'" "-" "`" "-"] $arg]  regsub -all {[^-a-zA-Z]} $txt "" txt  set fullurl "$dt(link)$txt"  #putlog "$fullurl"  set ddoc [getpage $fullurl]######## made a new follow redirect ########  if {[llength [split $ddoc "\n"]] &lt; 5} {    set line1 [lindex [split $ddoc "\n"] 0]    if {[matchstr "moved permanently. redirecting to /browse/*" $line1]} {      set fullurl "$dt(link)[lindex [split $line1 /] end]"      #putlog "$fullurl"      set ddoc [getpage $fullurl]    }  }######## end of new follow redirect ########  set ddoc [split $ddoc "\n"]  if {[llength $ddoc] &lt; 5} {    putmsg $chan "[cblue]Nothing found for[coff] [cbold]$arg[cbold][cblue].[coff] (1)"    return 0  }  foreach line $ddoc {    if {[regexp {&lt;meta\s+name=\"description\"\s+content=\"(.*?),(.*)\s+See\s+more\.\"&gt;} $line -&gt; subj def]} {      set ssubj [join [lrange [split $subj] 0 end-1]]      set sdef [string trim $def]      putmsg $chan "[cblue]The Defition for[coff] [cbold]$ssubj[cbold][cblue] is:[coff] $sdef"      break    }    if {[regexp {&lt;meta\s+name=\"description\"\s+content=\"(.*?)definition\s+at\s+Dictionary} $line -&gt; subj]} {      set ssubj [string trim $subj]      set line [lindex $ddoc 55]      if {![matchstr {  );border-radius:50%;display:-webkit-*} $line]} {  set line [lindex $ddoc 56]  }      if {[regexp {\s+css-0\s+e1w1pzze4\"&gt;(.*?)&lt;span\s+class=\"italic\"&gt;(.*?)&lt;/span&gt;\.} $line -&gt; def1 def2]} {        set sdef "[string trim $def1] [cgrey] ${def2}.[coff]"        putmsg $chan "[cblue]The Defition for[coff] [cbold]$ssubj[cbold][cblue] is:[coff] $sdef"        break      }    }  }  if {![info exists ssubj] || ![info exists sdef]} {    putmsg $chan "[cblue]Nothing found for[coff] [cbold]$arg[cbold][cblue].[coff] (2)"  }  return 0}proc getpage url {  ::httpsregister  if {[catch {set token [::http::geturl $url -binary 1 -timeout 15000]} error]} {    putlog "Error retrieving URL... try again later.  [string map [list \n " "] $error]"    ::httpsunregister    return 0  }  set data [::http::data $token]  ::http::cleanup $token  ::httpsunregister  return [encoding convertfrom utf-8 $data]}proc dictionaryControl {nick uhost hand chan text} {  switch -nocase -- [lindex [split $text] 0] {    "on" {      if {[channel get $chan dictionary]} {        putmsg $chan "Dictionary already running on $chan."      } else {        channel set $chan +dictionary        putmsg $chan "Dictionary now running on $chan."      }    }    "off" {      if {![channel get $chan dictionary]} {        putmsg $chan "Dictionary already disabled on $chan."      } {        channel set $chan -dictionary        putmsg $chan "Dictionary now disabled on $chan."      }    }    default {      putmsg $chan "Usage: $::lastbind &lt;on/off&gt;."    }  }  return 0}putlog "Dictionary Lookup (jax) $dt(version) loaded..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Thu Feb 24, 2022 2:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2022-01-29T03:17:57-04:00</updated>

		<published>2022-01-29T03:17:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110830#p110830</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110830#p110830"/>
		<title type="html"><![CDATA[Dictionary Lookup v1.2 (+redirectable)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110830#p110830"><![CDATA[
Dictionary Lookup v1.2 (+redirectable)<br><br>Addresses the no reply for things like "draws" and "Another" by following the redirect...<br><div class="codebox"><p>Code: </p><pre><code># Description: This script will query dictionary.com and give a simple response## v1.0  Initial release giving a simple dictionary result (jaxson)# v1.1  Added the .dictChan command to allow a channel access to the .dict command (jaxson)# v1.2  Fix for wrong color procs - my bad for copying colors from one of my other scripts doh!## Needed packagespackage require http 2.3package require tls 1.6.4package present Tcl 8.6# Colors availableproc crev     {} {return \026}    ;#reverseproc culine   {} {return \037}    ;#underline proc cbold    {} {return \002}    ;#boldproc coff     {} {return \003}    ;#color-offproc cwhite   {} {return \00300}proc cblack   {} {return \00301}proc cdkblue  {} {return \00302}proc cgreen   {} {return \00303}proc cred     {} {return \00304}proc cbrown   {} {return \00305}proc cpurple  {} {return \00306}proc corange  {} {return \00307}proc cyellow  {} {return \00308}proc cltgreen {} {return \00309}proc ccyan    {} {return \00310}proc cltblue  {} {return \00311}proc cblue    {} {return \00312}proc cpink    {} {return \00313}proc cgrey    {} {return \00314}proc cltgrey  {} {return \00315}# Some variablesset dt(link) "https://www.dictionary.com/browse/"set dt(version) "v1.2 (+redirectable)"# channel flag# .dictChan on &lt;- to enable on your #channel / .dictChan off &lt;- for turn this off!setudef flag dictionarybind pub - ".dict" dictionaryLookupbind pub o ".dictChan" dictionaryControl######## made a new httpsregister ########proc httpsregister {} {  set tlsver [package present tls]  if {[package vcompare $tlsver 1.7.11] &gt;= 0 } {    ::http::register https 443 [list ::tls::socket -autoservername 1]  } elseif {[package vcompare $tlsver 1.7] &gt;= 0 } {    ::http::register https 443 [list ::tls::socket -servername www.dictionary.com]  } else {    ::http::register https 443 [list ::tls::socket -request 0 -require 1 -ssl2 0 -ssl3 0 -tls1 1]  }}######## end of new httpsregister ########proc httpsunregister {} {  ::http::unregister https  return 0}proc dictionaryLookup {nick uhost hand chan arg} {  global dt  if {![channel get $chan dictionary]} { return 0 }  if {$arg == "" || [regexp {\s} $arg]} {    putchan $chan "Usage: .dict &lt;word&gt;"    return 0  }  set fullurl "$dt(link)$arg"  putlog "$fullurl"  set ddoc [getpage "$fullurl"]######## made a new follow redirect ########  if {[llength [split $ddoc "\n"]] &lt; 5} {    set line1 [lindex [split $ddoc "\n"] 0]    if {[matchstr "moved permanently. redirecting to /browse/*" $line1]} {      set fullurl "$dt(link)[lindex [split $line1 /] end]"      putlog "$fullurl"      set ddoc [getpage "$fullurl"]    }  }######## end of new follow redirect ########  if {[llength [split $ddoc "\n"]] &lt; 5} {    putchan $chan "[cblue]Nothing found for[cblack] $arg[cblue].[coff]"    return 0  }  foreach line [split $ddoc "\n"] {    if {[regexp {&lt;meta\s+name=\"description\"\s+content=\"(.*?),(.*)\s+See\s+more\.\"&gt;} $line -&gt; subj def]} {      set ssubj [string trim [lindex [split $subj] 0]]      set sdef [string trim $def]      putchan $chan "[cblue]The Defition for[cblack] $ssubj[cblue] is:[cltblue] $sdef[coff]"    }  }  return 0}proc getpage url {  ::httpsregister  if {[catch {set token [::http::geturl $url -binary 1 -timeout 15000]} error]} {    putlog "Error retrieving URL... try again later.[string map [list \n " "] $error]"    ::httpsunregister    return 0  }  set data [::http::data $token]  ::http::cleanup $token  ::httpsunregister  return [encoding convertfrom utf-8 $data]}proc dictionaryControl {nick uhost hand chan text} {  switch -nocase -- [lindex [split $text] 0] {    "on" {      if {[channel get $chan dictionary]} {        putchan $chan "Dictionary already running on $chan."      } else {        channel set $chan +dictionary        putchan $chan "Dictionary now running on $chan."      }    }    "off" {      if {![channel get $chan dictionary]} {        putchan $chan "Dictionary already disabled on $chan."      } {        channel set $chan -dictionary        putchan $chan "Dictionary now disabled on $chan."      }    }    default {      putchan $chan "Usage: $::lastbind &lt;on/off&gt;."    }  }  return 0}putlog "Dictionary Lookup (jax) $dt(version) loaded..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Jan 29, 2022 3:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jaxson]]></name></author>
		<updated>2022-01-28T02:47:50-04:00</updated>

		<published>2022-01-28T02:47:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110829#p110829</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110829#p110829"/>
		<title type="html"><![CDATA[Quick case fix for argument given]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110829#p110829"><![CDATA[
Replace this line: set fullurl "$dt(link)$arg<br>With this line: set fullurl [string tolower "$dt(link)$arg"]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12954">jaxson</a> — Fri Jan 28, 2022 2:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Goga]]></name></author>
		<updated>2022-01-28T01:16:01-04:00</updated>

		<published>2022-01-28T01:16:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110828#p110828</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110828#p110828"/>
		<title type="html"><![CDATA[Dictionary]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110828#p110828"><![CDATA[
Thanks Jaxon for help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12883">Goga</a> — Fri Jan 28, 2022 1:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jaxson]]></name></author>
		<updated>2022-01-27T07:17:09-04:00</updated>

		<published>2022-01-27T07:17:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110826#p110826</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110826#p110826"/>
		<title type="html"><![CDATA[v1.3 Fix for early versions of tcl-tls v1.7]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110826#p110826"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Description: This script will query dictionary.com and give a simple response## v1.0Initial release giving a simple dictionary result (jaxson)# v1.1Added the .dictChan command to allow a channel access to the .dict command (jaxson)# v1.2Fix for wrong color procs - my bad for copying colors from one of my other scripts doh!# v1.3Fix for earlier versions of 1.7 (Thanks to SpiKe^^) and better checking of tcl-tls# Needed packagespackage require http 2.3package require tlspackage present Tcl 8.6# Colors availableproc cr {} {return \026};#reverseproc cul {} {return "\037"};#underline proc cbold {} {return \002};#boldproc coff {} {return \003};#offproc cwhite {} {return \00300};proc cblack {} {return \00301};proc cdkblue {} {return \00302};proc cgreen {} {return \00303};proc cltred {} {return \00304};proc cbrown {} {return \00305};proc cpurple {} {return \00306};proc corange {} {return \00307};proc cyellow {} {return \00308};proc cltgreen {} {return \00309};proc ccyan {} {return \00310};proc cltblue {} {return \00311};proc cblue {} {return \00312};proc cpink {} {return \00313};proc cgrey {} {return \00314};proc cltgrey {} {return \00315};# Some variablesset dt(link) "https://www.dictionary.com/browse/"set dt(version) "v1.3"# channel flag# .dictChan on &lt;- to enable on your #channel / .dictChan off &lt;- for turn this off!setudef flag dictionarybind pub - ".dict" dictionaryLookupbind pub o ".dictChan" dictionaryControlproc putchan {chan what} { puthelp "PRIVMSG $chan :$what" }proc putmsg {nick msg} { puthelp "PRIVMSG $nick :$msg" }proc putnot {nick msg} { puthelp "NOTICE $nick :$msg" }proc httpsregister {} {::http::register https 443 [list ::tls::socket -servername www.dictionary.com]}proc httpsunregister {} {   ::http::unregister httpsreturn 0}proc dictionaryLookup {nick uhost hand chan arg} {global dtif {![channel get $chan dictionary]} { return 0 }if {$arg == "" || [regexp {\s} $arg]} {putchan $chan "Usage: .dict &lt;word&gt;"return 0}   if {[package vcompare [package present tls] 1.7] == -1 } {putnot $nick "You don't have a valid version of tcl-tls installed. Get the admin to either install tcl-tls package, or upgrade to at least v1.7"putnot $nick "If the admin doesn't want to you can try downloading https://core.tcl-lang.org/tcltls/uv/tcltls-1.7.22.tar.gz to your home directory."putnot $nick "Extract it and change to that directory; run './configure --prefix=$HOME; make; make install'"putnot $nick "Then go to your eggdrop source directory &amp; 'make clean'; './configure'; 'make'; 'make install DEST=~/xxxxx'"putnot $nick "Then restart your bot. You should now have a working tcl-tls v1.7.22."return 0   }set fullurl "$dt(link)$arg"putlog "$fullurl"   set ddoc [getpage "$fullurl"]if {[llength [split $ddoc "\n"]] &lt; 5} {putchan $chan "[cblue]Nothing found for[cblack] $arg[cblue].[coff]"}foreach line [split $ddoc "\n"] {if {[regexp {&lt;meta\s+name=\"description\"\s+content=\"(.*?),(.*)\s+See\s+more\.\"&gt;} $line -&gt; subj def]} {set ssubj [string trim [lindex [split $subj] 0]]set sdef [string trim $def]putchan $chan "[cblue]The Defition for[cblack] $ssubj[cblue] is:[cltblue] $sdef[coff]"}}return 0}proc getpage url {   ::httpsregister   if {[catch {set token [::http::geturl $url -timeout 15000]} error]} {      putlog "Error retrieving URL... try again later.[string map [list \n " "] $error]"::httpsunregister      return 0   }set data [::http::data $token]::http::cleanup $token::httpsunregisterreturn [encoding convertfrom utf-8 $data]}proc dictionaryControl {nick uhost hand chan text} {switch -nocase -- [lindex [split $text] 0] {"on" {if {[channel get $chan dictionary]} {putchan $chan "Dictionary already running on $chan."} else {channel set $chan +dictionaryputchan $chan "Dictionary now running on $chan."}}"off" {if {![channel get $chan dictionary]} {putchan $chan "Dictionary already disabled on $chan."} {channel set $chan -dictionaryputchan $chan "Dictionary now disabled on $chan."}}default {putchan $chan "Usage: $::lastbind &lt;on/off&gt;."}}return 0}putlog "Dictionary Lookup (jax) $dt(version) loaded..."[quote][/quote]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12954">jaxson</a> — Thu Jan 27, 2022 7:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jaxson]]></name></author>
		<updated>2022-01-22T19:10:04-04:00</updated>

		<published>2022-01-22T19:10:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110816#p110816</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110816#p110816"/>
		<title type="html"><![CDATA[v1.2 color proc fix]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110816#p110816"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Description: This script will query dictionary.com and give a simple response## v1.0Initial release giving a simple dictionary result (jaxson)# v1.1Added the .dictChan command to allow a channel access to the .dict command (jaxson)# v1.2Fix for wrong color procs - my bad for copying colors from one of my other scripts doh!## Needed packagespackage require http 2.3package require tls 1.6.4package present Tcl 8.6# Colors availableproc cr {} {return \026};#reverseproc cul {} {return "\037"};#underline proc cbold {} {return \002};#boldproc coff {} {return \003};#offproc cwhite {} {return \00300};proc cblack {} {return \00301};proc cdkblue {} {return \00302};proc cgreen {} {return \00303};proc cltred {} {return \00304};proc cbrown {} {return \00305};proc cpurple {} {return \00306};proc corange {} {return \00307};proc cyellow {} {return \00308};proc cltgreen {} {return \00309};proc ccyan {} {return \00310};proc cltblue {} {return \00311};proc cblue {} {return \00312};proc cpink {} {return \00313};proc cgrey {} {return \00314};proc cltgrey {} {return \00315};# Some variablesset dt(link) "https://www.dictionary.com/browse/"set dt(version) "v1.2"# channel flag# .dictChan on &lt;- to enable on your #channel / .dictChan off &lt;- for turn this off!setudef flag dictionarybind pub - ".dict" dictionaryLookupbind pub o ".dictChan" dictionaryControlproc httpsregister {} {   if {[package vcompare [package present tls] 1.7] &gt; 0 } {      ::http::register https 443 [list ::tls::socket -autoservername 1]   } else {      ::http::register https 443 [list ::tls::socket -request 0 -require 1 -ssl2 0 -ssl3 0 -tls1 1]   }}proc httpsunregister {} {   ::http::unregister httpsreturn 0}proc dictionaryLookup {nick uhost hand chan arg} {global dtif {![channel get $chan dictionary]} { return 0 }if {$arg == "" || [regexp {\s} $arg]} {putchan $chan "Usage: .dict &lt;word&gt;"return 0}set fullurl "$dt(link)$arg"putlog "$fullurl"   set ddoc [getpage "$fullurl"]if {[llength [split $ddoc "\n"]] &lt; 5} {putchan $chan "[cblue]Nothing found for[cblack] $arg[cblue].[coff]"}foreach line [split $ddoc "\n"] {if {[regexp {&lt;meta\s+name=\"description\"\s+content=\"(.*?),(.*)\s+See\s+more\.\"&gt;} $line -&gt; subj def]} {set ssubj [string trim [lindex [split $subj] 0]]set sdef [string trim $def]putchan $chan "[cblue]The Defition for[cblack] $ssubj[cblue] is:[cltblue] $sdef[coff]"}}return 0}proc getpage url {   ::httpsregister   if {[catch {set token [::http::geturl $url -binary 1 -timeout 15000]} error]} {      putlog "Error retrieving URL... try again later.[string map [list \n " "] $error]"::httpsunregister      return 0   }set data [::http::data $token]::http::cleanup $token::httpsunregisterreturn [encoding convertfrom utf-8 $data]}proc dictionaryControl {nick uhost hand chan text} {switch -nocase -- [lindex [split $text] 0] {"on" {if {[channel get $chan dictionary]} {putchan $chan "Dictionary already running on $chan."} else {channel set $chan +dictionaryputchan $chan "Dictionary now running on $chan."}}"off" {if {![channel get $chan dictionary]} {putchan $chan "Dictionary already disabled on $chan."} {channel set $chan -dictionaryputchan $chan "Dictionary now disabled on $chan."}}default {putchan $chan "Usage: $::lastbind &lt;on/off&gt;."}}return 0}putlog "Dictionary Lookup (jax) $dt(version) loaded..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12954">jaxson</a> — Sat Jan 22, 2022 7:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jaxson]]></name></author>
		<updated>2022-01-22T05:45:17-04:00</updated>

		<published>2022-01-22T05:45:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110815#p110815</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110815#p110815"/>
		<title type="html"><![CDATA[Version 1.1 - Added .dictChan trigger for adding channels]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110815#p110815"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># Description: This script will query dictionary.com and give a simple response## v1.0Initial release giving a simple dictionary result (jaxson)# v1.1Added the .dictChan command to allow a channel access to the .dict command (jaxson)## Needed packagespackage require http 2.3package require tls 1.6.4package present Tcl 8.6# Colors availableproc cr {} {return \026};#reverseproc cul {} {return "\037"};#underline proc cbold {} {return \002};#boldproc coff {} {return \003};#offproc cwhite {} {return \00300};proc cblack {} {return \00301};proc cdkblue {} {return \00302};proc cgreen {} {return \00303};proc cltred {} {return \00304};proc cbrown {} {return \00305};proc cpurple {} {return \00306};proc corange {} {return \00307};proc cyellow {} {return \00308};proc cltgreen {} {return \00309};proc ccyan {} {return \00310};proc cltcyan {} {return \00311};proc cltblue {} {return \00312};proc cpink {} {return \00313};proc cgrey {} {return \00314};proc cltgrey {} {return \00315};# Some variablesset dt(link) "https://www.dictionary.com/browse/"set dt(version) "v1.1"# channel flag# .dictChan on &lt;- to enable on your #channel / .dictChan off &lt;- for turn this off!setudef flag dictionarybind pub - ".dict" dictionaryLookupbind pub o ".dictChan" dictionaryControlproc httpsregister {} {   package require tls   if {[package vcompare [package present tls] 1.7] &gt; 0 } {      ::http::register https 443 [list ::tls::socket -autoservername 1]   } else {      ::http::register https 443 [list ::tls::socket -request 0 -require 1 -ssl2 0 -ssl3 0 -tls1 1]   }return 0}proc httpsunregister {} {   ::http::unregister httpsreturn 0}proc dictionaryLookup {nick uhost hand chan arg} {global dtif {![channel get $chan dictionary]} { return 0 }if {$arg == "" || [regexp {\s} $arg]} {putchan $chan "Usage: .dict &lt;word&gt;"return 0}set fullurl "$dt(link)$arg"putlog "$fullurl"   set ddoc [getpage "$fullurl"]if {[llength [split $ddoc "\n"]] &lt; 5} {putchan $chan "[cblue]Nothing found for[cblack] $arg[cblue].[coff]"}foreach line [split $ddoc "\n"] {if {[regexp {&lt;meta\s+name=\"description\"\s+content=\"(.*?),(.*)\s+See\s+more\.\"&gt;} $line -&gt; subj def]} {set ssubj [string trim [lindex [split $subj] 0]]set sdef [string trim $def]putchan $chan "[cblue]The Defition for[cblack] $ssubj[cblue] is:[cltblue] $sdef[coff]"}}return 0}proc getpage url {   ::httpsregister   if {[catch {set token [::http::geturl $url -binary 1 -timeout 15000]} error]} {      putlog "Error retrieving URL... try again later.[string map [list \n " "] $error]"::httpsunregister      return 0   }set data [::http::data $token]::http::cleanup $token::httpsunregisterreturn [encoding convertfrom utf-8 $data]}proc dictionaryControl {nick uhost hand chan text} {switch -nocase -- [lindex [split $text] 0] {"on" {if {[channel get $chan dictionary]} {putchan $chan "Dictionary already running on $chan."} else {channel set $chan +dictionaryputchan $chan "Dictionary now running on $chan."}}"off" {if {![channel get $chan dictionary]} {putchan $chan "Dictionary already disabled on $chan."} {channel set $chan -dictionaryputchan $chan "Dictionary now disabled on $chan."}}default {putchan $chan "Usage: $::lastbind &lt;on/off&gt;."}}return 0}putlog "Dictionary Lookup (jax) $dt(version) loaded..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12954">jaxson</a> — Sat Jan 22, 2022 5:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[jaxson]]></name></author>
		<updated>2022-01-22T00:46:42-04:00</updated>

		<published>2022-01-22T00:46:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110814#p110814</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110814#p110814"/>
		<title type="html"><![CDATA[Try this one]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110814#p110814"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>package require http 2.3package require tls 1.6.4package present Tcl 8.6proc cblack {} {return \00301};proc cltblue {} {return \00311};proc cblue {} {return \00312};proc coff {} {return \017}set dt(link) "https://www.dictionary.com/browse/"# set the following array to which chans to listen to (need to be lowercase) array set dictChans {#eggdrop e#phoenix p}bind pub - ".dict" dictionaryLookupproc httpsregister {} {   package require tls   if {[package vcompare [package present tls] 1.7] &gt; 0 } {      ::http::register https 443 [list ::tls::socket -autoservername 1]   } else {      ::http::register https 443 [list ::tls::socket -request 0 -require 1 -ssl2 0 -ssl3 0 -tls1 1]   }return 0}proc httpsunregister {} {   ::http::unregister httpsreturn 0}proc dictionaryLookup {nick uhost hand chan arg} {global dt dictChansif {([array get dictChans [string tolower $chan]] == "")} { return 0 }if {$arg == "" || [regexp {\s} $arg]} {putchan $chan "Usage: .dict &lt;word&gt;"return 0}set fullurl "$dt(link)$arg"putlog "$fullurl"   set ddoc [getpage "$fullurl"]if {[llength [split $ddoc "\n"]] &lt; 5} {putchan $chan "[cblue]Nothing found for[cblack] $arg[cblue].[coff]"}foreach line [split $ddoc "\n"] {if {[regexp {&lt;meta\s+name=\"description\"\s+content=\"(.*?),(.*)\s+See\s+more\.\"&gt;} $line -&gt; subj def]} {set ssubj [string trim [lindex [split $subj] 0]]set sdef [string trim $def]putlog ".$ssubj.$sdef."putchan $chan "[cblue]The Defition for[cblack] $ssubj[cblue] is:[cltblue] $sdef[coff]"}}return 0}proc getpage url {   ::httpsregister   if {[catch {set token [::http::geturl $url -binary 1 -timeout 15000]} error]} {      putlog "Error retrieving URL... try again later.[string map [list \n " "] $error]"::httpsunregister      return 0   }set data [::http::data $token]::http::cleanup $token::httpsunregisterreturn [encoding convertfrom utf-8 $data]}putlog "Dictionary Lookup by jax loaded..."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12954">jaxson</a> — Sat Jan 22, 2022 12:46 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Goga]]></name></author>
		<updated>2022-01-21T01:45:22-04:00</updated>

		<published>2022-01-21T01:45:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110813#p110813</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110813#p110813"/>
		<title type="html"><![CDATA[Dictionary]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110813#p110813"><![CDATA[
Anyone Please make it Happen this TCL Please.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12883">Goga</a> — Fri Jan 21, 2022 1:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Goga]]></name></author>
		<updated>2022-01-13T03:35:48-04:00</updated>

		<published>2022-01-13T03:35:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110778#p110778</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110778#p110778"/>
		<title type="html"><![CDATA[Dictionary]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110778#p110778"><![CDATA[
Same Result with .dict word<br>and error comes up in private window :<blockquote class="uncited"><div>No results found for 'Book' in any of the active databases..</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12883">Goga</a> — Thu Jan 13, 2022 3:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2022-01-12T22:05:29-04:00</updated>

		<published>2022-01-12T22:05:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110775#p110775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110775#p110775"/>
		<title type="html"><![CDATA[Dictionary]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110775#p110775"><![CDATA[
use in channel <strong class="text-strong">.dict word</strong><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Wed Jan 12, 2022 10:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Goga]]></name></author>
		<updated>2022-01-11T06:50:33-04:00</updated>

		<published>2022-01-11T06:50:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=110769#p110769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=110769#p110769"/>
		<title type="html"><![CDATA[Dictionary]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=110769#p110769"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code># dictionary.com script - rosc2112 at yahoo com - Copyright C.Leonhardt 2006# http://members.dandy.net/~fbn/dictcom.tcl.txtset dcdictver "0.02l"## This script pulls definitions from dictionary.reference.com. It can show suggested spellings if you# misspell a word, shows results including the pronunciation key, parts of speech, definitions, word origin, # synonyms and antonyms. You can also search for phrases/idioms, cities, states, countries, zipcodes, etc.# Check the list of available databases in the helpfile, that gives a good indication of the retrievable data.## Usage:   .dict dicthelp  |#       or .dict           | Show the helpfile (typed in privmsg or in channel)## History  -  Oct. 08 2006 - Initial conception#          -  Oct. 11 2006 - Added more db's, added ability for user to specify line-limit (still respecting#                            admin's choice of max line-limit, and added option for admin to allow user to#                            override that limit or not), etc.#                          - Removed dcorigin/dcsynant options, added combined commandline options.#                          - Added a 'dbmatch' option to show which databases a word might be found in.#                          - Added the rest of the db's (if dictionary.com provided the VERA, GCIDE and#                            Ambrose Bierce's Devil's dictionaries, this script would be complete compared to#                            db's available from dict.org.)#                          - Consolidated redundant regexp's into a seperate proc.#             Oct. 12 2006 - Minor changes to dbnames.#             Oct. 13 2006 - Fixed a mistake in the variable used for selecting a database. #                            Added a string map for 'dbmatch' to show the dbname's as used in the script (rather #                            than the names as known to dictionary.com) #                          - Added additional error msg when user selects a database and the word is not found.#                          - Changed proc dictmsg test to see if user is either on the channel or validuser, #                            if neither, script quietly returns (unknown users outside of channels cannot use.)#                          - Made a configuration option for limiting input length.#                          - Forgot to initialize dcactivelimit if no dclinelimit is specified in the configs.#                          - Added error msgs when user tries dcorigin or dcsyn options and specifies a db other#                            than dbluna (origin, and synonyms/antonyms not available from other db's.)#             Oct. 14 2006 - Fixed a typo in otherdb regexp (dbwsw was misspelled.)#             Oct. 17 2006 - Gah...another typo (missing bracket in the dictmsg proc :P)#                          - Added a 'string is integer' check for dclimit, some other tweaks to dclimit..#                          - Changed dclimit section again, to handle 'dclimit' cmd in any order.#             Oct. 18 2006 - Tweaked 'additional suggestions' so it doesn't show | on end of string.#             Nov. 14 2006 - Various html/unicode chars added to the string map.#             Dec. 03 2006 - Website changes/code fixed.#             Dec. 07 2006 - More string map additions.## Databases: Dictionary.com Unabridged Dictionary; Webster's 1913 Unabridged Dictionary; #            Webster's New Millenium Dictionary; WordNet Dictionary; American Heritage Dictionary;#            American Heritage Stedman's Medical Dictionary; American Heritage Dictionary of Idioms;#            Merriam-Webster Medical Dictionary; Merriam-Webster Law Dictionary; Investopedia; Wall Street Words; #            Easton's 1897 Bible Dictionary; Hitchcock's Bible Names Dictionary;Free On-line Dictionary of Computing;#            Jargon File; US Gazetteer 1990 Census; CIA 1995 World Factbook; Atomic Elements Database.## There will no doubt be unicode chars/html that are not in the string map "set smaps" for substituting the# html code with the real characters. If you come across these, please send me a note about them so I can add# them into the string map for future versions.## TODO: New databases: American Heritage Science Dictionary; American Heritage Abbreviations Dictionary;#                      American Heritage New Dictionary of Cultural Literacy.. Hmm well, I went to add these#                      today and they're no longer showing up on the website. I'll keep notes and if they become#                      permanent additions to dictionary.com, I'll add them.################################################################################################################## Configs:#~~~~~~~~~# Channels where we allow public useset dcomchans "#elegance"# Channels that respond only via privmsgset dcquietchans "#elegance"# Timeout for geturl (1/1000th's of a second)set dcomtimeout "30000"# If you want to limit output, set the max number of lines to output here (this will truncate results.)# Set to 0 for no-limit (show the complete definition results, which could be *extremely* long.)set dclinelimit 40# Allow users to specify a higher limit (override dclinelimit)? This option has no effect unless dclinelimit is# set to a number above zero. Output is sent to privmsg instead of channel when dclinelimit and this option # are enabled together, when the user chooses a 'dclimit' higher than dclinelimit.# Set to 1 == yes, 0 == noset dclineoride 1# Set the max input length (number of chars.) IRC has an input limit of about 400 chars but that may be excessive. # Set this var to 0 if you do not want any input limit.set dcmaxlength 150################################################################################################################# Code begins ################package require http 2.3bind pub - .dict dictpubbind msg - .dict dictmsgproc dictmsg {nick uhost hand text} {if {(![onchan $nick]) &amp;&amp; (![validuser $nick])} {return}dictpub $nick $uhost $hand privmsg $textreturn}proc dictpub {nick uhost hand chan text} {if {([lsearch -exact $::dcomchans $chan] == -1) &amp;&amp; ($chan != "privmsg")} {return}if {([lsearch -exact $::dcquietchans $chan] != -1) || ($chan == "privmsg")} {set chan $nick}set text [string trim $text];set text [split $text]if {$::dclinelimit &gt; 0} {set dcactivelim $::dclinelimit} else {set dcactivelim 0}set dcomdef "";set ahddef "";set websterdef "";set amsmddef "";set mwmeddef "";set pronun "";set defins ""set dcori "";set dcsynon "";set word1 "";set dcsuggests "";set i 0;set dcanton "";set dictname ""set showdcorigin 0;set showsynant 0;set otherdb 0;set templim "";set templim2 "";set investdef ""set wswdef "";set remvar "";set showdef 0;set dbmatches "";set dbmatch1 "";set showmatch 0set newdbl "";set dcomurl "";set ahdidef "";set foldef "";set eastdef "";set gazdef "";set jardef ""set mlawdef "";set wmdef "";set wndef "";set w95def "";set hitdef "";set elmdef "";set dbvar ""set dblist [list dbluna dbahd dbweb dbamd dbmmd dbinv dbwsw dbahi dbeast dbfold dbgaz dbjar dbmlaw dbwnm dbword dbcia dbhit dbelem]set dbmatchlist [list luna ahd4 web1913 ahsmd mwmed ivst wsw ahdi easton foldoc gazetteer jargon mwlaw wmde wn world95 hitchcock elements]# user asking for matching db names onlyif {[set remvar [lsearch -exact $text dbmatch]] != -1} {set showmatch 1set text [lreplace $text $remvar $remvar]set text [string trim [join $text]]}# user asking for 'origin' output onlyif {[set remvar [lsearch -exact $text dcorigin]] != -1} {set showdcorigin 1;set showdef 1set text [lreplace $text $remvar $remvar]set text [string trim [join $text]]}# user asking for synonyms/antonyms onlyif {[set remvar [lsearch -exact $text dcsyn]] != -1} {set showsynant 1;set showdef 1set text [lreplace $text $remvar $remvar]set text [string trim [join $text]]}# user setting a line limit to restrict number of definition lines shown.if {[set remvar [lsearch $text dclimit:*]] != -1} {set templim [lindex $text $remvar];set templim2 [lindex [split $templim :] 1]set templim2 [string trimleft $templim2 0]if {$templim2 == ""} {set dcactivelim 1puthelp "PRIVMSG $nick :dclimit cannot be below 1, so we'll use a limit of 1 line.."} elseif {![string is integer -strict $templim2]} {puthelp "PRIVMSG $nick :dclimit requires a number, not '$templim2'"return} elseif {$templim2 &lt; 1} {set dcactivelim 1puthelp "PRIVMSG $nick :dclimit cannot be below 1, so we'll use a limit of 1 line.."} else {if {$::dclinelimit &gt; 0} {if {($::dclineoride == 0) &amp;&amp; ($templim2 &gt; $::dclinelimit)} {puthelp "PRIVMSG $chan :Admin has set a strict line limit of $::dclinelimit max lines. Cannot override."} elseif {($::dclineoride == 1) &amp;&amp; ($templim2 &gt; $::dclinelimit)} {puthelp "PRIVMSG $nick :Overriding line limit with dclimit $templim2 (results will be sent to privmsg.)"set chan $nickset dcactivelim $templim2} else {set dcactivelim $templim2}} else {set dcactivelim $templim2}}set text [lreplace $text $remvar $remvar]set text [string trim [join $text]]}# user asking to search a specific database# otherdb's: 0=dbluna 1=dbahd 2=dbweb 3=dbamd 4=dbmmd 5=dbinv 6=dbwsw 7=dbahi 8=dbeast 9=dbfold 10=dbgaz#            11=dbjar 12=dbmlaw 13=dbwnm 14=dbword 15=dbcia 16=dbhit 17=dbelemif {[regexp {(\mdbluna\M|\mdbahd\M|\mdbweb\M|\mdbamd\M|\mdbmmd\M|\mdbinv\M|\mdbwsw\M|\mdbahi\M|\mdbeast\M|\mdbfold\M|\mdbgaz\M|\mdbjar\M|\mdbmlaw\M|\mdbwnm\M|\mdbword\M|\mdbcia\M|\mdbhit\M|\mdbelem\M)} $text match dbvar]} {set remvar [lsearch -exact $text $dbvar]switch -- $dbvar {"dbluna" {set otherdb 0;set dcomurl "http://dictionary.reference.com/search?db=luna&amp;q="}"dbahd" {set otherdb 1;set dcomurl "http://dictionary.reference.com/search?db=ahd4&amp;q="}"dbweb" {set otherdb 2;set dcomurl "http://dictionary.reference.com/search?db=web1913&amp;q="}"dbamd" {set otherdb 3;set dcomurl "http://dictionary.reference.com/search?db=ahsmd&amp;q="}"dbmmd" {set otherdb 4;set dcomurl "http://dictionary.reference.com/search?db=mwmed&amp;q="}"dbinv" {set otherdb 5;set dcomurl "http://dictionary.reference.com/search?db=ivst&amp;q="}"dbwsw" {set otherdb 6;set dcomurl "http://dictionary.reference.com/search?db=wsw&amp;q="}"dbahi" {set otherdb 7;set dcomurl "http://dictionary.reference.com/search?db=ahdi&amp;q="}"dbeast" {set otherdb 8;set dcomurl "http://dictionary.reference.com/search?db=easton&amp;q="}"dbfold" {set otherdb 9;set dcomurl "http://dictionary.reference.com/search?db=foldoc&amp;q="}"dbgaz" {set otherdb 10;set dcomurl "http://dictionary.reference.com/search?db=gazetteer&amp;q="}"dbjar" {set otherdb 11;set dcomurl "http://dictionary.reference.com/search?db=jargon&amp;q="}"dbmlaw" {set otherdb 12;set dcomurl "http://dictionary.reference.com/search?db=mwlaw&amp;q="}"dbwnm" {set otherdb 13;set dcomurl "http://dictionary.reference.com/search?db=wmde&amp;q="}"dbword" {set otherdb 14;set dcomurl "http://dictionary.reference.com/search?db=wn&amp;q="}"dbcia" {set otherdb 15;set dcomurl "http://dictionary.reference.com/search?db=world95&amp;q="}"dbhit" {set otherdb 16;set dcomurl "http://dictionary.reference.com/search?db=hitchcock&amp;q="}"dbelem" {set otherdb 17;set dcomurl "http://dictionary.reference.com/search?db=elements&amp;q="}}set text [lreplace $text $remvar $remvar]set text [string trim [join $text]]if {$showmatch == 1} {#user asked to show matching databases (dbmatch) so we can't use the other databases.set otherdb 0;set dcomurl "http://dictionary.reference.com/search?q="}}if {($text == "dicthelp") || ($text == "")} {puthelp "PRIVMSG $nick :\002Dictionary.com TCL\002 - Commands are typed in PRIVMSG to $::botnick or in channel:"puthelp "PRIVMSG $nick :Parameters shown in \002&lt;&gt;\002 are required, while \002\[\]\002 are optional."puthelp "PRIVMSG $nick :To look up a word, simply use : \002.dict &lt;word&gt;\002"puthelp "PRIVMSG $nick :To show only the word origins : \002.dict dcorigin &lt;word&gt;\002"puthelp "PRIVMSG $nick :To show only synonyms/antonyms: \002.dict dcsyn &lt;word&gt;\002"puthelp "PRIVMSG $nick :   Origin and Synonyms/Antonyms available only from dbluna (default database)"puthelp "PRIVMSG $nick :To show results from a particular dictionary: \002.dict &lt;dbname&gt; &lt;word&gt;\002"puthelp "PRIVMSG $nick :  The following dbname's are available:"puthelp "PRIVMSG $nick :   \002dbluna\002 - Dictionary.com Unabridged Dictionary (v1.0.1 2006)"puthelp "PRIVMSG $nick :   \002dbweb\002  - Webster's Revised Unabridged Dictionary (pub.date 1913)"puthelp "PRIVMSG $nick :   \002dbwnm\002  - Webster's New Millenium Dictionary (v0.9.6 2005)"puthelp "PRIVMSG $nick :   \002dbahd\002  - American Heritage Dictionary (4th Ed. 2000)"puthelp "PRIVMSG $nick :   \002dbahi\002  - American Heritage Dictionary of Idioms (pub.date 1997)"puthelp "PRIVMSG $nick :   \002dbamd\002  - American Heritage Stedman's Medical Dictionary (pub.date 2002)"puthelp "PRIVMSG $nick :   \002dbmmd\002  - Merriam-Webster's Medical Dictionary (pub.date 2002)"puthelp "PRIVMSG $nick :   \002dbmlaw\002 - Merriam-Webster's Law Dictionary (pub.date 1996)"puthelp "PRIVMSG $nick :   \002dbword\002 - WordNet Dictionary (v2.0 2003)"puthelp "PRIVMSG $nick :   \002dbfold\002 - Free Online Dictionary of Computing (pub.date 2005)"puthelp "PRIVMSG $nick :   \002dbjar\002  - Jargon File (v4.2.0, 2000)"puthelp "PRIVMSG $nick :   \002dbelem\002 - Atomic Elements Database (pub.date 1998)"puthelp "PRIVMSG $nick :   \002dbinv\002  - Investopedia (pub.date 2005)"puthelp "PRIVMSG $nick :   \002dbwsw\002  - Wall Street Words (pub.date 2003)"puthelp "PRIVMSG $nick :   \002dbgaz\002  - U.S. Gazetteer (1990 U.S. Census)"puthelp "PRIVMSG $nick :   \002dbcia\002  - CIA World Factbook (pub.date 1995)"puthelp "PRIVMSG $nick :   \002dbeast\002 - Easton's Bible Dictionary (pub.date 1897)"puthelp "PRIVMSG $nick :   \002dbhit\002  - Hitchcock's Bible Names Dictionary (pub.date late 1800's)"puthelp "PRIVMSG $nick :  When no database is specified, 1st matching result from all db's is shown."puthelp "PRIVMSG $nick :To limit the number of lines shown for a word: \002.dict dclimit:&lt;lines&gt; \[dbname\] &lt;word&gt;\002"puthelp "PRIVMSG $nick :   Example: \002.dict dclimit:3 fubar\002 will show only the first 3 definition lines of 'fubar'"puthelp "PRIVMSG $nick :To show which databases a word \002matches\002 in: \002.dict dbmatch &lt;word&gt;\002"puthelp "PRIVMSG $nick :To show the list of databases: \002.dict showdb\002"puthelp "PRIVMSG $nick :\[end of dictionary.tcl help\]"return}if {$text == "showdb"} {puthelp "PRIVMSG $nick :The following dbname's are available for the dictionary script:"puthelp "PRIVMSG $nick :   \002dbluna\002 - Dictionary.com Unabridged Dictionary (v1.0.1 2006)"puthelp "PRIVMSG $nick :   \002dbweb\002  - Webster's Revised Unabridged Dictionary (pub.date 1913)"puthelp "PRIVMSG $nick :   \002dbwnm\002  - Webster's New Millenium Dictionary (v0.9.6 2005)"puthelp "PRIVMSG $nick :   \002dbahd\002  - American Heritage Dictionary (4th Ed. 2000)"puthelp "PRIVMSG $nick :   \002dbahi\002  - American Heritage Dictionary of Idioms (pub.date 1997)"puthelp "PRIVMSG $nick :   \002dbamd\002  - American Heritage Stedman's Medical Dictionary (pub.date 2002)"puthelp "PRIVMSG $nick :   \002dbmmd\002  - Merriam-Webster's Medical Dictionary (pub.date 2002)"puthelp "PRIVMSG $nick :   \002dbmlaw\002 - Merriam-Webster's Law Dictionary (pub.date 1996)"puthelp "PRIVMSG $nick :   \002dbword\002 - WordNet Dictionary (v2.0 2003)"puthelp "PRIVMSG $nick :   \002dbfold\002 - Free Online Dictionary of Computing (pub.date 2005)"puthelp "PRIVMSG $nick :   \002dbjar\002  - Jargon File (v4.2.0, 2000)"puthelp "PRIVMSG $nick :   \002dbelem\002 - Atomic Elements Database (pub.date 1998)"puthelp "PRIVMSG $nick :   \002dbinv\002  - Investopedia (pub.date 2005)"puthelp "PRIVMSG $nick :   \002dbwsw\002  - Wall Street Words (pub.date 2003)"puthelp "PRIVMSG $nick :   \002dbgaz\002  - U.S. Gazetteer (1990 U.S. Census)"puthelp "PRIVMSG $nick :   \002dbcia\002  - CIA World Factbook (pub.date 1995)"puthelp "PRIVMSG $nick :   \002dbeast\002 - Easton's Bible Dictionary (pub.date 1897)"puthelp "PRIVMSG $nick :   \002dbhit\002  - Hitchcock's Bible Names Dictionary (pub.date late 1800's)"puthelp "PRIVMSG $nick :\[End of database list\]"return}# Need to test for illegal chars, as dictionary.com only accepts specific characters in words.# The list of legal chars is: a-z A-Z 0-9 space + ( ) ' , - . % :# If you find other chars that should be added to this list, let me know.set testchars [split $text {}]foreach letter [lrange $testchars 0 end] {if {[regexp {[a-zA-Z0-9[:space:]{1,}\+\(\)\'\,\-\.\%\:Ã¼ü]} $letter] != 1} {puthelp "PRIVMSG $nick :'[join $text]' contains illegal characters. Cannot look up."return}}# test input length. The longest english word is 45 chars (according to wikipedia) but dictionary.com        # can also look up phrases, so we'll set the length limit to $dcmaxlength (configured above)if {($::dcmaxlength &gt; 0) &amp;&amp; ([string length $text] &gt; $::dcmaxlength)} {puthelp "PRIVMSG $nick :Your input is too long. Please limit input length to less than $::dcmaxlength chars\."return}set originaltext $textregsub -all { } $text {%20} textregsub -all {\+} $text {%2B} textregsub -all {\(} $text {%28} textregsub -all {\)} $text {%29} textregsub -all {\'} $text {%27} textregsub -all {,} $text {%2C} textif {$dcomurl == ""} {set dcomurl "http://dictionary.reference.com/search?q=$text"} else {set dcomurl "$dcomurl$text"}putquick "PRIVMSG $chan :\001ACTION peers over its glasses at a really huge book and flips through the pages..\001"catch {set page [::http::geturl $dcomurl -timeout $::dcomtimeout]} errorif {[string match -nocase "*couldn't open socket*" $error]} {puthelp "PRIVMSG $nick :dictionary.com error: couldn't connect..Try again later"::http::cleanup $pagereturn}if {[::http::status $page] == "timeout" } {puthelp "PRIVMSG $nick :dictionary.com error: Connection timed out. Try again."::http::cleanup $pagereturn}set html [::http::data $page]::http::cleanup $pageif {[regexp -nocase {&lt;title&gt;Dictionary.com: Bad Request&lt;/title&gt;} $html]} {puthelp "PRIVMSG $nick :Dictionary.com error: Bad request '[join $originaltext]' - request could not be understood."return}if {[regexp -nocase {&lt;h1&gt;No results found for.*?&lt;p&gt;No spelling suggestions were found.&lt;/p&gt;} $html]} {puthelp "PRIVMSG $nick :Dictionary.com: No results and no spelling suggestions found for '[join $originaltext]'"return}if {[regexp -nocase {&lt;p&gt;Sorry, an error occured while displaying this definition.&lt;/p&gt;} $html]} {puthelp "PRIVMSG $nick :Dictionary.com: An error occurred while trying to display '[join $originaltext]'"return}if {[regexp -nocase {&lt;TITLE&gt;302 Found&lt;/TITLE&gt;} $html]} {puthelp "PRIVMSG $nick :Dictionary.com :Document 302 error (page moved) - Please retry your request '[join $originaltext]'"return}if {[regexp -nocase {&lt;h1&gt;No results found for.*?&lt;/h1&gt;.*?Did you mean &lt;a href=".*?"&gt;(.*?)&lt;/a&gt;.*?&lt;td&gt;Dictionary suggestions:&lt;br /&gt;(.*?)&lt;/td&gt;} $html match word1 dcsuggests]} {regsub -all {\n} $dcsuggests {} dcsuggestsregsub -all -nocase {&lt;a href="/search\?r=2&amp;q=.*?"&gt;} $dcsuggests { } dcsuggestsregsub -all -nocase {&lt;/a&gt;&lt;br /&gt;} $dcsuggests { 11|} dcsuggestsregsub { 11\|$} $dcsuggests {} dcsuggestsif {$otherdb != 0} {puthelp "PRIVMSG $chan :No results were found for '[join $originaltext]' in the requested database \002[lindex $dblist $otherdb]\002. Try \002.dict dbmatch &lt;word&gt;\002 to see which databases the word might be found in, or try a search with no database specified (\002.dict &lt;word&gt;\002) Otherwise, this could just be a spelling error."}puthelp "PRIVMSG $chan :Couldn't find '[join $originaltext]' Maybe you spelled it wrong?  Dictionary.com suggested:\002 $word1 \002"set dcsuggests [dcwordwrap $nick $chan $originaltext $dcsuggests]foreach line $dcsuggests {regsub {^\s{0,}11\|} $line {} lineset line [string trim $line]if {$line != ""} {puthelp "PRIVMSG $chan :\002Addtional Suggestions:\002 $line"}}puthelp "PRIVMSG $chan :\[end of '[join $originaltext]' suggestions\]"return}# show matching db's on requestif {$showmatch == 1} {foreach line [split $html \n] {if {[regexp -all -nocase -- {&lt;!-- begin (.*?) --&gt;} $line match dbmatch1]} {lappend dbmatches $dbmatch1}}set dbmatches [lsort -unique $dbmatches]foreach dbnam $dbmatches {if {[lsearch -exact $dbmatchlist $dbnam] != -1} {lappend newdbl $dbnam}}set newdbl [string map {luna dbluna ahd4 dbahd web1913 dbweb ahsmd dbamd mwmed dbmmd ivst dbinv wsw dbwsw ahdi dbahi easton dbeast foldoc dbfold gazetteer dbgaz jargon dbjar mwlaw dbmlaw wmde dbwnm wn dbword world95 dbcia hitchcock dbhit elements dbelem} $newdbl]puthelp "PRIVMSG $chan :Matches for '[join $originaltext]' found in these databases:\002 $newdbl\002"return}if {($otherdb == 0) &amp;&amp; ([regexp -nocase {&lt;!-- begin luna --&gt;(.*?)&lt;!-- end luna --&gt;} $html match dcomdef])} {set dictname "Dictionary.com Unabridged"if {[regexp -nocase {class="prondelim"&gt;\[&lt;/span&gt;(.*?)&lt;span.class="prondelim"&gt;\]} $dcomdef match pronun]} {regsub -all -nocase {&lt;b&gt;.*?&lt;/b&gt;} $pronun {&amp;} pronunset pronun [defproc $pronun]set pronun [string trim $pronun]regsub {,$} $pronun {} pronunset pronun "\[pronunciation key: $pronun \]"}if {[regexp -nocase {&lt;div.*?class="body"&gt;(.*?)&lt;/div&gt;} $dcomdef match defins]} {regsub -all -nocase {\n} $defins { } definsregsub -all -nocase {&lt;table class="luna-Ent"&gt;} $defins "\n" definsregsub -all -nocase {&lt;/table&gt;} $defins "\n" definsregsub -all {Pronunciation Key} $defins {} definsregsub -all {Show Spelled Pronunciation} $defins {} definsregsub -all {Show IPA Pronunciation} $defins {} definsset defins [defproc $defins]}if {[regexp -nocase {&lt;div.*?class="ety"&gt;\[(.*?)\].*?&lt;/div&gt;} $dcomdef match dcori]} {regsub {Origin:} $dcori {Origin:} dcoriset dcori [defproc $dcori]}if {[regexp {class="sectionLabel"&gt;.+?Synonyms.*?&lt;/span&gt;(.*?)&lt;/div&gt;} $dcomdef match dcsynon]} {regsub -all -nocase {&lt;b&gt;.*?&lt;/b&gt;} $dcsynon {&amp;} dcsynonset dcsynon [defproc $dcsynon]set dcsynon "\002Synonyms:\002 $dcsynon"}if {[regexp {class="sectionLabel"&gt;.+?Antonyms.*?&lt;/span&gt;(.*?)&lt;/div&gt;} $dcomdef match dcanton]} {regsub -all -nocase {&lt;b&gt;.*?&lt;/b&gt;} $dcanton {&amp;} dcantonset dcanton [defproc $dcanton]set dcanton "\002Antonyms:\002 $dcanton"}} elseif {(($otherdb == 1) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin ahd4 --&gt;(.*?)&lt;!-- end ahd4 --&gt;} $html match ahddef])} {set dictname "American-Heritage Dictionary"regexp -nocase {&lt;br /&gt;(.*?)&lt;/TABLE&gt;} $ahddef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 2) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin web1913 --&gt;(.*?)&lt;!-- end web1913 --&gt;} $html match websterdef])} {# webster 1913 dictionaryset dictname "Webster's 1913 Unabridged"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Webster.*?} $websterdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 3) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin ahsmd --&gt;(.*?)&lt;!-- end ahsmd --&gt;} $html match amsmddef])} {# american heritage steadman medical dictionaryset dictname "American-Heritage-Stedman's Medical Dictionary"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;The.*?American.*?Heritage} $amsmddef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 4) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin mwmed --&gt;(.*?)&lt;!-- end mwmed --&gt;} $html match mwmeddef])} {# meriam webster medical dictionaryset dictname "Merriam-Webster Medical Dictionary"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Merriam-Webster's} $mwmeddef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 5) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin ivst --&gt;(.*?)&lt;!-- end ivst --&gt;} $html match investdef])} {# Investopediaset dictname "Investopedia"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Investopedia} $investdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 6) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin wsw --&gt;(.*?)&lt;!-- end wsw --&gt;} $html match wswdef])} {# Wall Street Wordsset dictname "Wall Street Words"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Wall} $wswdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 7) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin ahdi --&gt;(.*?)&lt;!-- end ahdi --&gt;} $html match ahdidef])} {# American Heritage Dictionary of Idiomsset dictname "American-Heritage Dictionary of Idioms"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;The.*?American.*?Heritage} $ahdidef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 8) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin easton --&gt;(.*?)&lt;!-- end easton --&gt;} $html match eastdef])} {# Easton's Bible Dictionaryset dictname "Easton's 1897 Bible Dictionary"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Easton.*?&lt;/cite&gt;} $eastdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 9) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin foldoc --&gt;(.*?)&lt;!-- end foldoc --&gt;} $html match foldef])} {# FOLDOCset dictname "FOLDOC Computer Dictionary"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;The.*? Free.*?&lt;/cite&gt;} $foldef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 10) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin gazetteer --&gt;(.*?)&lt;!-- end gazetteer --&gt;} $html match gazdef])} {# US Gazetteer Censusset dictname "US Gazetteer 1990 Census"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;U\.S\..*?&lt;/cite&gt;} $gazdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 11) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin jargon --&gt;(.*?)&lt;!-- end jargon --&gt;} $html match jardef])} {# Jargon Fileset dictname "Jargon File"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Jargon.*?&lt;/cite&gt;} $jardef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 12) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin mwlaw --&gt;(.*?)&lt;!-- end mwlaw --&gt;} $html match mlawdef])} {# Merriam-Webster Law Dictionaryset dictname "Merriam-Webster Law Dictionary"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Merriam-Webster.*?&lt;/cite&gt;} $mlawdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 13) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin wmde --&gt;(.*?)&lt;!-- end wmde --&gt;} $html match wmdef])} {# Webster New Millenium Dictionaryset dictname "Webster's New Millenium Dictionary"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Webster.*?&lt;/cite&gt;} $wmdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 14) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin wn --&gt;(.*?)&lt;!-- end wn --&gt;} $html match wndef])} {# WordNet Dictionaryset dictname "WordNet Dictionary"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;WordNet.*?&lt;/cite&gt;} $wndef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 15) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin world95 --&gt;(.*?)&lt;!-- end world95 --&gt;} $html match w95def])} {# WordNet Dictionaryset dictname "CIA World Factbook"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;The.*?CIA.*?&lt;/cite&gt;} $w95def match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 16) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin hitchcock --&gt;(.*?)&lt;!-- end hitchcock --&gt;} $html match hitdef])} {# Hitchcock's Bible Names Dictionaryset dictname "Hitchcock's Bible Names"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;Hitchcock.*?&lt;/cite&gt;} $hitdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} elseif {(($otherdb == 17) || (($defins == "") &amp;&amp; ($otherdb == 0))) &amp;&amp; ([regexp -nocase {&lt;!-- begin elements --&gt;(.*?)&lt;!-- end elements --&gt;} $html match elmdef])} {# Elements Databaseset dictname "Atomic Elements DB"regexp -nocase {&gt;Cite.*?&lt;/a&gt;(.*?)&lt;cite&gt;The.*?Elements&lt;/cite&gt;} $elmdef match definsregsub -all {\n} $defins { } definsset defins [defproc $defins]} else {puthelp "PRIVMSG $chan :No results found for '[join $originaltext]' in any of the active databases.."return}if {($defins != "") || ($dcori != "") || ($dcsynon != "") || ($dcanton != "")} {puthelp "PRIVMSG $chan :\002$dictname\002: Results for '\002[join $originaltext]\002' - $pronun"if {$showdef == 0} {set defins [dcwordwrap $nick $chan $originaltext $defins]foreach line $defins {set line [string trim $line]if {$line != ""} {if {$dcactivelim != 0} {if {$i &lt; [expr $dcactivelim + 1]} {puthelp "PRIVMSG $chan :[join $line]"incr i} else {puthelp "PRIVMSG $chan :\002Output limit reached\002 \[$dcactivelim lines max\]"break}} else {puthelp "PRIVMSG $chan :[join $line]"}}}}if {(($showdef == 0) || ($showdcorigin == 1))  &amp;&amp; ($dcori != "")} {set dcori [dcwordwrap $nick $chan $originaltext $dcori]foreach line $dcori {if {$line != ""} {set line [string trim $line]puthelp "PRIVMSG $chan :[join $line]"}}} elseif {($showdcorigin == 1) &amp;&amp; ($dcori == "") &amp;&amp; ($otherdb == 0)} {puthelp "PRIVMSG $chan :No word origin found for '\002[join $originaltext]\002'"} elseif {($otherdb != 0) &amp;&amp; ($showdcorigin == 1)} {puthelp "PRIVMSG $chan :Word origins only available from dbluna. You do not need to specify any db to use the dcorigin option."}if {(($showdef == 0) || ($showsynant == 1)) &amp;&amp; (($dcsynon != "") || ($dcanton != ""))} {if {$dcsynon != ""} {set dcsynon [dcwordwrap $nick $chan $originaltext $dcsynon]foreach line $dcsynon {if {$line != ""} {set line [string trim $line]puthelp "PRIVMSG $chan :[join $line]"}}} elseif {($dcsynon == "") &amp;&amp; ($showsynant == 1) &amp;&amp; ($otherdb == 0)} {puthelp "PRIVMSG $chan :No synonyms found for '\002[$orignaltext]\002'"} elseif {($otherdb != 0) &amp;&amp; ($showsynant == 1)} {puthelp "PRIVMSG $chan :Synonyms only availble from dbluna. You do not need to specify any db to use the dcsyn option."}if {$dcanton != ""} {set dcanton [dcwordwrap $nick $chan $originaltext $dcanton]foreach line $dcanton {if {$line != ""} {set line [string trim $line]puthelp "PRIVMSG $chan :[join $line]"}}} elseif {($dcanton == "") &amp;&amp; ($showsynant == 1) &amp;&amp; ($otherdb == 0)} {puthelp "PRIVMSG $chan :No antonyms found for '\002[join $originaltext]\002'"} elseif {($otherdb != 0) &amp;&amp; ($showsynant == 1)} {puthelp "PRIVMSG $chan :Antonyms only available from dbluna. You do not need to specify any db to use the dcsyn option."}} elseif {($showsynant == 1) &amp;&amp; ($dcsynon == "") &amp;&amp; ($dcanton == "") &amp;&amp; ($otherdb == 0)} {puthelp "PRIVMSG $chan :No synonyms or antonyms found for '\002[join $originaltext]\002'"} elseif {($showsynant == 1) &amp;&amp; ($dcsynon == "") &amp;&amp; ($dcanton == "") &amp;&amp; ($otherdb != 0)} {puthelp "PRIVMSG $chan :Synonyms/Antonyms only available from dbluna. You do not need to specify any db to use the dcsyn option."}puthelp "PRIVMSG $chan :\[End $dictname - '[join $originaltext]'\]"return} else {puthelp "PRIVMSG $chan :Hmm, definition for '[join $originaltext]' from dictionary.com was empty?"return}return}proc dcwordwrap {nick channel origword input} {# word wrapper - somewhat modified from other word wrappers I've done, this one does not append titles.set j 0set dcwct 0set tempdef ""foreach line [split $input \n] {if {$line != ""} {set len 375set splitChr " "set out [set cur {}]; set i 0foreach word [split $line $splitChr] {if {[incr i [string len $word]]&gt;$len} {lappend out [join $cur $splitChr]set cur [list $word]set i [string len $word]incr j} else {lappend cur $word}incr i}lappend out [join $cur $splitChr]foreach line2 $out {incr dcwctif {$j &gt;= 1} {set line2 [linsert $line2 end \002(con't)\002]set j [expr $j -1]}lappend tempdef $line2}}}return $tempdef}proc defproc {defins} {regsub -all -nocase {&lt;p&gt;} $defins "\n" definsregsub -all -nocase {&lt;LI.*?&gt;} $defins "\n" definsregsub -all -nocase {&lt;br /&gt;} $defins "\n" definsregsub -all -nocase {&lt;tr&gt;} $defins "\n" definsregsub -all -nocase {&lt;blockquote&gt;} $defins "\n" definsregsub -all -nocase {&lt;ol.*?&gt;} $defins {} definsregsub -all -nocase {&lt;table.*?&gt;} $defins {} definsregsub -all -nocase {&lt;a.*?&gt;} $defins {} definsregsub -all -nocase {&lt;td.*?&gt;} $defins {} definsregsub -all -nocase {&lt;span.*?&gt;} $defins {} definsregsub -all -nocase {&lt;img.*?&gt;} $defins {} definsregsub -all -nocase {&lt;font.*?&gt;} $defins {} definsregsub -all -nocase {&lt;hr.*?&gt;} $defins {} definsregsub -all -nocase {&lt;!--.*?&gt;} $defins {} definsset defins [string map -nocase $::smaps $defins]return $defins}set smaps {"     '     &amp;apos;     \x27  &amp;      \x26  &lt;       \x3C   &gt;       \x3E        \x20¡    \xA1  ¤   \xA4  ¢     \xA2  £    \xA3   ¥      \xA5  ¦   \xA6§     \xA7  ¨      \xA8  ©     \xA9  ª     \xAA   «    \xAB  ¬      \xAC­      \xAD  ®      \xAE  ¯     \xAF  °      \xB0   ±   \xB1  ²     \xB2³     \xB3  ´    \xB4  µ    \xB5  ¶     \xB6   ·   \xB7  ¸    \xB8¹     \xB9  º     \xBA  »    \xBB  ¼   \xBC   ½   \xBD  ¾   \xBE¿   \xBF  ×    \xD7  ÷   \xF7  À   \xC0   Á   \xC1  Â    \xC2Ã   \xC3  Ä     \xC4  Å    \xC5  Æ    \xC6   Ç   \xC7  È   \xC8É   \xC9  Ê    \xCA  Ë     \xCB  Ì   \xCC   Í   \xCD  Î    \xCEÏ     \xCF  Ð      \xD0  Ñ   \xD1  Ò   \xD2   Ó   \xD3  Ô    \xD4Õ   \xD5  Ö     \xD6  Ø   \xD8  Ù   \xD9   Ú   \xDA  Û    \xDBÜ     \xDC  Ý   \xDD  Þ    \xDE  ß    \xDF   à   \xE0  á   \xE1â    \xE2  ã   \xE3  ä     \xE4  å    \xE5   æ    \xE6  ç   \xE7è   \xE8  é   \xE9  ê    \xEA  ë     \xEB   ì   \xEC  í   \xEDî    \xEE  ï     \xEF  ð      \xF0  ñ   \xF1   ò   \xF2  ó   \xF3ô    \xF4  õ   \xF5  ö     \xF6  ø   \xF8   ù   \xF9  ú   \xFAû    \xFB  ü     \xFC  ý   \xFD  þ    \xFE   ÿ     \xFF  ‖    ||\"         '     “    `     ”    '     &lt;b&gt;        ""     &lt;/b&gt;       ""    &lt;i&gt;        ""&lt;/i&gt;       ""    &lt;tr&gt;       ""    &lt;/tr&gt;      ""    &lt;/a&gt;       ""     –    "-"   —    "-"&lt;/table&gt;   ""    &lt;/td&gt;      ""    &lt;/span&gt;    ""    ē     e      ā     a     ̄     "-"́     '     &lt;sup&gt;      ""    &lt;/sup&gt;     ""    &lt;/font&gt;    ""     ō     o     "      '&amp;      &amp;     [      (     \      /     ]      )      {     (     }     )£     £     ¨     ¨     ©     ©     «     «      ­     ­     ®     ®¡     ¡     ¿     ¿     ´     ´     ·     ·      ¹     ¹     »     »¼     ¼     ½     ½     ¾     ¾     À     À      Á     Á     Â     ÂÃ     Ã     Ä     Ä     Å     Å     Æ     Æ      Ç     Ç     È     ÈÉ     É     Ê     Ê     Ë     Ë     Ì     Ì      Í     Í     Î     ÎÏ     Ï     Ð     Ð     Ñ     Ñ     Ò     Ò      Ó     Ó     Ô     ÔÕ     Õ     Ö     Ö     ×     ×     Ø     Ø      Ù     Ù     Ú     ÚÛ     Û     Ü     Ü     Ý     Ý     Þ     Þ      ß     ß     à     àá     á     â     â     ã     ã     ä     ä      å     å     æ     æç     ç     è     è     é     é     ê     ê      ë     ë     ì     ìí     í     î     î     ï     ï     ð     ð      ñ     ñ     ò     òó     ó     ô     ô     õ     õ     ö     ö      ÷     ÷     ø     øù     ù     ú     ú     û     û     ü     ü      ý     ý     þ     þ°     °     ‧    ·     ˌ     .     ū     u      ī     i     ˈ     'ɔ     o     ɪ     i     &lt;/li&gt;      ""    &lt;cite&gt;     ""     &lt;/cite&gt;    ""    &lt;/ol&gt;      """&lt;br /&gt;"   ""    &lt;tt&gt;       ""    &lt;/tt&gt;      ""    &amp;#147;     '      &amp;#148;     '     &lt;em&gt;       ""&lt;/em&gt;      ""  &lt;BLOCKQUOTE&gt; ""  &lt;/BLOCKQUOTE&gt; ""   &amp;#146;     '      &lt;dd&gt;       ""    &lt;/dd&gt;      ""&lt;dl&gt;       ""    &lt;/dl&gt;      ""    &lt;dt&gt;       ""    &lt;/dt&gt;      ""     &lt;ol&gt;       ""    &lt;/p&gt;       ""ŋ     n     —    "-"   ǫ     Q     ̃     ~      ŭ     u     &lt;br/&gt;      ""&lt;br&gt;       ""    ǣ     "ae"  ɛ     e     &lt;div&gt;      ""     &lt;/div&gt;     ""    &lt;sub&gt;      ""&lt;/sub&gt;     ""    ≪    "&lt;&lt;"  ə     e     ŷ     ý      ɑ     a     ʊ     uʿ     c     &lt;tbody&gt;    ""    &lt;/tbody&gt;   ""    \{         (     \}          )}putlog "Dictionary.com tcl script $dcdictver by rosc loaded."</code></pre></div>Everytime when it trigger with !dict WORD it replies always <div class="codebox"><p>Code: </p><pre><code>No results found for 'help' in any of the active databases..</code></pre></div>Help Please.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12883">Goga</a> — Tue Jan 11, 2022 6:50 am</p><hr />
]]></content>
	</entry>
	</feed>
