<?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/17011" />

	<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>2009-09-19T20:47:12-04:00</updated>

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

		<entry>
		<author><name><![CDATA[pogue]]></name></author>
		<updated>2009-09-19T20:47:12-04:00</updated>

		<published>2009-09-19T20:47:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90291#p90291</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90291#p90291"/>
		<title type="html"><![CDATA[urban dictionary not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90291#p90291"><![CDATA[
<blockquote class="uncited"><div>Hi guys,<br><br>I'm getting:<br><br>[00:37] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br>[00:37] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br>[00:41] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br>[00:41] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br><br>as an error for this every time someone talks in the channel. Any ideas?</div></blockquote>Is that related to the urban dictionary script?  I'm not seeing that...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10663">pogue</a> — Sat Sep 19, 2009 8:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[szantovitch]]></name></author>
		<updated>2009-09-19T00:44:27-04:00</updated>

		<published>2009-09-19T00:44:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90285#p90285</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90285#p90285"/>
		<title type="html"><![CDATA[urban dictionary not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90285#p90285"><![CDATA[
Hi guys,<br><br>I'm getting:<br><br>[00:37] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br>[00:37] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br>[00:41] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br>[00:41] Tcl error [askquestion]: couldn't open "brain.txt": no such file or directory<br><br>as an error for this every time someone talks in the channel. Any ideas?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10869">szantovitch</a> — Sat Sep 19, 2009 12:44 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[kold]]></name></author>
		<updated>2009-08-11T06:07:09-04:00</updated>

		<published>2009-08-11T06:07:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89837#p89837</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89837#p89837"/>
		<title type="html"><![CDATA[urban dictionary not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89837#p89837"><![CDATA[
Speechless is the man!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10805">kold</a> — Tue Aug 11, 2009 6:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sk-4]]></name></author>
		<updated>2009-07-09T19:40:31-04:00</updated>

		<published>2009-07-09T19:40:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89488#p89488</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89488#p89488"/>
		<title type="html"><![CDATA[urban dictionary not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89488#p89488"><![CDATA[
speechles .thanks bro..the script is working again. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9352">sk-4</a> — Thu Jul 09, 2009 7:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-07-09T18:08:35-04:00</updated>

		<published>2009-07-09T18:08:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89487#p89487</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89487#p89487"/>
		<title type="html"><![CDATA[urban dictionary not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89487#p89487"><![CDATA[
<blockquote class="uncited"><div>&lt;speechles&gt; !webby <a href="http://www.urbandictionary.com/define.php?term=eggdrop" class="postlink">http://www.urbandictionary.com/define.php?term=eggdrop</a> --regexp &lt;div class="def_p"&gt;.*?&lt;p&gt;(.*?)&lt;\/p&gt;--<br>&lt;sp33chy&gt; <strong class="text-strong">regexp</strong> does not match any html.<br><br>&lt;speechles&gt; !webby <a href="http://www.urbandictionary.com/define.php?term=eggdrop" class="postlink">http://www.urbandictionary.com/define.php?term=eggdrop</a> --regexp &lt;div class="def_p"&gt;.*?&lt;p&gt;(.*?)&lt;/p&gt;--<br>&lt;sp33chy&gt; <strong class="text-strong">regexp</strong> does not match any html.<br><br>&lt;speechles&gt; !webby <a href="http://www.urbandictionary.com/define.php?term=eggdrop" class="postlink">http://www.urbandictionary.com/define.php?term=eggdrop</a> --regexp &lt;div class='definition'&gt;(.*?)&lt;/div&gt;--<br>&lt;sp33chy&gt; <strong class="text-strong">regexp</strong> capture1 ( a type of irc bot. <a href="http://www.eggheads.org" class="postlink">www.eggheads.org</a> and <a href="http://www.egghelp.org" class="postlink">www.egghelp.org</a> are 2 major eggdrop resource websites. )</div></blockquote>So appears, to fix it you simply change this:<div class="codebox"><p>Code: </p><pre><code>set matches [regexp -all -inline {&lt;div class="def_p"&gt;.*?&lt;p&gt;(.*?)&lt;\/p&gt;} $data];</code></pre></div>To this, and wallah, it should suddenly work. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><div class="codebox"><p>Code: </p><pre><code>set matches [regexp -all -inline {&lt;div class='definition'&gt;(.*?)&lt;/div&gt;} $data];</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Thu Jul 09, 2009 6:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[sk-4]]></name></author>
		<updated>2009-07-09T07:57:36-04:00</updated>

		<published>2009-07-09T07:57:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=89480#p89480</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=89480#p89480"/>
		<title type="html"><![CDATA[urban dictionary not working]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=89480#p89480"><![CDATA[
the script is not responding to any words,im getting error<br><br>!define eggdrop<br>Nothing found for "eggdrop".<br> can anyone look at it..thanks<br><br>this is the script code<br><br># Urban Dictionary<br># Copyright (C) 2006 perpleXa<br># <a href="http://perplexa.ugug.co.uk" class="postlink">http://perplexa.ugug.co.uk</a> / #perpleXa on QuakeNet<br>#<br># Redistribution, with or without modification, are permitted provided<br># that redistributions retain the above copyright notice, this condition<br># and the following disclaimer.<br>#<br># This program is distributed in the hope that it will be useful,<br># but WITHOUT ANY WARRANTY, to the extent permitted by law; without<br># even the implied warranty of MERCHANTABILITY or FITNESS FOR A<br># PARTICULAR PURPOSE.<br>#<br># Usage:<br>#  !define [id] &lt;term&gt;<br><br># fsck is available at <a href="http://perplexa.ugug.co.uk" class="postlink">http://perplexa.ugug.co.uk</a><br>package require fsck 1.10;<br>package require http;<br><br>namespace eval urbandict {<br>  variable version 1.7;<br>  variable encoding "utf-8";<br>  variable client "Mozilla/5.0 (compatible; Y!J; for robot study; keyoshid)";<br>  bind pub -|- "!define" [namespace current]::pub;<br>  namespace export pub;<br>}<br><br>proc urbandict::getdefinition {definition} {<br>  variable client;<br>  http::config -useragent $client;<br>  set url "<a href="http://www.urbandictionary.com/define.php?term=" class="postlink">http://www.urbandictionary.com/define.php?term=</a>[urlencode $definition]";<br>  if {[catch {http::geturl $url -timeout 20000} token]} {<br>    return [list 0 "Warning: Couldn't connect to \[$url\]"];<br>  }<br>  upvar 0 $token state;<br>  if {![string equal -nocase $state(status) "ok"]} {<br>    return [list 0 "Warning: Couldn't connect to \[$url\] (connection $state(status))."];<br>  }<br>  set data [http::data $token];<br>  http::cleanup $token;<br>  set matches [regexp -all -inline {&lt;div class=\"def_p\"&gt;.*?&lt;p&gt;(.*?)&lt;\/p&gt;} $data];<br>  set list <ul><li>;<br>  foreach {null definition} $matches {<br>    regsub -all {&lt;[^&gt;]*?&gt;} [decode $definition] "" definition;<br>    regsub -all {[\r\n\s\t]+} $definition " " definition;<br>    lappend list $definition;<br>  }<br>  return [concat [llength $list] $list];<br>}<br><br>proc urbandict::urlencode {i} {<br>  variable encoding<br>  set index 0;<br>  set i [encoding convertto $encoding $i]<br>  set length [string length $i]<br>  set n ""<br>  while {$index &lt; $length} {<br>    set activechar [string index $i $index]<br>    incr index 1<br>    if {![regexp {^[a-zA-Z0-9]$} $activechar]} {<br>      append n %[format "%02X" [scan $activechar %c]]<br>    } else {<br>      append n $activechar<br>    }<br>  }<br>  return $n<br>}<br><br>proc urbandict::pub {nick host hand chan argv} {<br>  if {![string compare $argv ""]} {<br>    puthelp "NOTICE $nick :Usage: !define &lt;id&gt; &lt;definition&gt; ex.!define 1 irc";<br>    return 1;<br>  }<br>  if {[string is digit -strict [getword $argv 0]]} {<br>    if {[splitline $argv cargv 2]!=2} {<br>      puthelp "NOTICE $nick :Usage: !define &lt;id&gt; &lt;definition&gt; ex.!define 1 irc";<br>      return 1;<br>    }<br>    set id [lindex $cargv 0];<br>    set argv [lindex $cargv 1];<br>    if {!$id} {<br>      set id 1;<br>    }<br>  } else {<br>    set id 1;<br>  }<br>  set definitions [getdefinition $argv];<br>  set count [lindex $definitions 0];<br>  if {!$count} {<br>    puthelp "PRIVMSG $chan :Nothing found for4 \"$argv\".";<br>    return 1;<br>  } elseif {$id &gt; $count} {<br>    puthelp "PRIVMSG $chan :Only $count results found for \"$argv\".";<br>    return 1;<br>  }<br>  set definition [lindex $definitions $id];<br>  if {[string length $definition] &lt;= 300} {<br>    puthelp "PRIVMSG $chan :4------Meaning Of Words4------( $argv )";<br>    puthelp "PRIVMSG $chan :14 $definition";<br>    return 0;<br>  }<br>  foreach line [splitmsg $definition] {<br>    puthelp "PRIVMSG $chan :4------Meaning Of Words4------( $argv )";<br>    puthelp "PRIVMSG $chan :14 $line";<br>    puthelp "PRIVMSG $chan :4------End Of the Meaning4------ ";<br><br>  }<br>  return 0;<br>}<br><br>proc urbandict::decode {content} {<br>  if {![string match *&amp;* $content]} {<br>    return $content;<br>  }<br>  set escapes {<br>      \x20 " \x22 &amp; \x26 &amp;apos; \x27 – \x2D<br>    &lt; \x3C &gt; \x3E ˜ \x7E € \x80 ¡ \xA1<br>    ¢ \xA2 £ \xA3 ¤ \xA4 ¥ \xA5 ¦ \xA6<br>    § \xA7 ¨ \xA8 © \xA9 ª \xAA « \xAB<br>    ¬ \xAC ­ \xAD ® \xAE &amp;hibar; \xAF ° \xB0<br>    ± \xB1 ² \xB2 ³ \xB3 ´ \xB4 µ \xB5<br>    ¶ \xB6 · \xB7 ¸ \xB8 ¹ \xB9 º \xBA<br>    » \xBB ¼ \xBC ½ \xBD ¾ \xBE ¿ \xBF<br>    À \xC0 Á \xC1 Â \xC2 Ã \xC3 Ä \xC4<br>    Å \xC5 Æ \xC6 Ç \xC7 È \xC8 É \xC9<br>    Ê \xCA Ë \xCB Ì \xCC Í \xCD Î \xCE<br>    Ï \xCF Ð \xD0 Ñ \xD1 Ò \xD2 Ó \xD3<br>    Ô \xD4 Õ \xD5 Ö \xD6 × \xD7 Ø \xD8<br>    Ù \xD9 Ú \xDA Û \xDB Ü \xDC Ý \xDD<br>    Þ \xDE ß \xDF à \xE0 á \xE1 â \xE2<br>    ã \xE3 ä \xE4 å \xE5 æ \xE6 ç \xE7<br>    è \xE8 é \xE9 ê \xEA ë \xEB ì \xEC<br>    í \xED î \xEE ï \xEF ð \xF0 ñ \xF1<br>    ò \xF2 ó \xF3 ô \xF4 õ \xF5 ö \xF6<br>    ÷ \xF7 ø \xF8 ù \xF9 ú \xFA û \xFB<br>    ü \xFC ý \xFD þ \xFE ÿ \xFF<br>  };<br>  set content [string map $escapes $content];<br>  set content [string map [list "\]" "\\\]" "\[" "\\\[" "\$" "\\\$" "\\" "\\\\"] $content];<br>  regsub -all -- {&amp;#([[:digit:]]{1,5});} $content {[format %c [string trimleft "\1" "0"]]} content;<br>  regsub -all -- {&amp;#x([[:xdigit:]]{1,4});} $content {[format %c [scan "\1" %x]]} content;<br>  regsub -all -- {&amp;#?[[:alnum:]]{2,7};} $content "?" content;<br>  return [subst $content];<br>}<br><br>putlog "Script loaded: Urban Dictionary v$urbandict::version by perpleXa";</li></ul><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9352">sk-4</a> — Thu Jul 09, 2009 7:57 am</p><hr />
]]></content>
	</entry>
	</feed>
