egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Durby - 0.3.0. New project page on code.google.com
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
radix
Voice


Joined: 10 Jan 2012
Posts: 3

PostPosted: Fri Jan 13, 2012 7:12 pm    Post subject: Reply with quote

on line 1131 change

Code:
proc CharsetToEncoding {charset} {


to

Code:
proc http::CharsetToEncoding {charset} {


if you have specified http.tcl in eggdrop.conf remove it unless it is required by something else.
Back to top
View user's profile Send private message
lee8oi
Halfop


Joined: 04 Jun 2011
Posts: 63
Location: Michigan,United States.

PostPosted: Fri Jan 27, 2012 2:47 pm    Post subject: Thanks for the reports and input. Reply with quote

A few things:

Thanks radix! good tip. we do have testing bots that used various versions of http and some are definitly specified in the eggdrop.conf.

Speechles has mentioned having a new version of webby available that fixes the encoding issues and improves on a couple features.

I tried some experimenting when I was working on my version of the encoding fixes. During the process speechles fixed it himself. So now its just a matter of merging with the new version of webby.

Volunteers are welcome for this project if anyone wants to help rebase, or give me some time to get my current project ready for release and I'll revisit this and update things.

Thanks again guys for your reports and input!
_________________
https://github.com/lee8oi
https://code.google.com/u/lee8oi/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
lee8oi
Halfop


Joined: 04 Jun 2011
Posts: 63
Location: Michigan,United States.

PostPosted: Thu Apr 19, 2012 1:41 pm    Post subject: New Durby 0.2.8 released. Reply with quote

This update rebases Durby on the latest webby found in speechles script archive. This version should have all the encoding issues sorted out. Durby now adds a new feature: Nick ignore. You can now set the script to ignore certain nicks in channel. Latest release is available on github.
_________________
https://github.com/lee8oi
https://code.google.com/u/lee8oi/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
FightingNavyman
Voice


Joined: 18 Jan 2011
Posts: 35

PostPosted: Fri Apr 20, 2012 2:12 pm    Post subject: Reply with quote

got some errors when I try to do to rehash my bot so durby 0.2.8 to load.

[1:09:34pm] * Quits: @R2D2 (R2D2@P2PNET-3CA29397.zomgbbq.com) (Client exited)

[1:09:34pm] <R2D2> [13:09:36] durby: Cannot find zlib or trf package! Gzipped url queries will not be used. Enjoy the slow lane! Razz
覧覧覧覧覧覧覧覧覧覧
DCC session closed
Back to top
View user's profile Send private message
lee8oi
Halfop


Joined: 04 Jun 2011
Posts: 63
Location: Michigan,United States.

PostPosted: Fri Apr 20, 2012 7:32 pm    Post subject: Reply with quote

You'll get the same message (not an error) in webby as well. this means you don't have zlib or trf support correctly installed. Tcl 8.6b has the necessary packages to satisfy the zlib requirements. Install that and recompile your bot and you should see this message change to 'enjoy the fast lane' instead. but that message only applies to using the --gz option so you can safely ignore it if you don't use --gz.
_________________
https://github.com/lee8oi
https://code.google.com/u/lee8oi/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
lee8oi
Halfop


Joined: 04 Jun 2011
Posts: 63
Location: Michigan,United States.

PostPosted: Wed May 02, 2012 2:00 pm    Post subject: Durby moves to new project page on code.google.com Reply with quote

Durby has moved to a new project page on google code at https://code.google.com/p/durby/
_________________
https://github.com/lee8oi
https://code.google.com/u/lee8oi/
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
x0x
Op


Joined: 10 Feb 2009
Posts: 140
Location: The Netherlands

PostPosted: Fri May 10, 2013 1:10 pm    Post subject: Reply with quote

Would it be possible to also detect URL's without http? And I don't think the URL shortners work when detecting urls. I only see the title displayed.
Back to top
View user's profile Send private message
x0x
Op


Joined: 10 Feb 2009
Posts: 140
Location: The Netherlands

PostPosted: Fri May 10, 2013 1:52 pm    Post subject: Reply with quote

Found a bug as well

http://screenrant.com/24-season-9-fox

<title> Fox to Bring Back ’24′ for Season 9</title>

IRC: ~ Fox to Bring Back 242 for Season 9
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri May 10, 2013 6:43 pm    Post subject: Reply with quote

x0x wrote:
Found a bug as well

http://screenrant.com/24-season-9-fox

<title> Fox to Bring Back 24′ for Season 9</title>

IRC: ~ Fox to Bring Back 242 for Season 9


Patching your eggdrop for utf-8 support solves this without requiring any changes. But for those with unpatched eggdrops/windrops this is indeed annoying. It isn't durby's fault. This is actually, inherited from "webby" unfortunately.. but you've discovered a legacy problem that has always annoyed me. It's an issue with transcoding entities (&#8217;24&#8242; turns into 24′) correctly into their proper encodings within a string already encoded. I've taken some time to rewrite the problem procedure, and hopefully this works for both unpatched and patched bots, regardless..
**crosses fingers**

Find the procedure named:
webbydescdecode

Replace it entirely with the procedure found below:
Code:
proc webbydescdecode {text char} {
   # code below is neccessary to prevent numerous html markups
   # from appearing in the output (ie, &quot;, ᘧ, etc)
   # stolen (borrowed is a better term) from perplexa's urban
   # dictionary script..
   if {![string match *&* $text]} {return $text}
   if {[string match "*;*" $char]} {set char [string trim $char {;}] }
   set escapes {
      &nbsp; \xa0 &iexcl; \xa1 &cent; \xa2 &pound; \xa3 &curren; \xa4
      &yen; \xa5 &brvbar; \xa6 &sect; \xa7 &uml; \xa8 &copy; \xa9
      &ordf; \xaa &laquo; \xab &not; \xac &shy; \xad &reg; \xae
      &macr; \xaf &deg; \xb0 &plusmn; \xb1 &sup2; \xb2 &sup3; \xb3
      &acute; \xb4 &micro; \xb5 &para; \xb6 &middot; \xb7 &cedil; \xb8
      &sup1; \xb9 &ordm; \xba &raquo; \xbb &frac14; \xbc &frac12; \xbd
      &frac34; \xbe &iquest; \xbf &Agrave; \xc0 &Aacute; \xc1 &Acirc; \xc2
      &Atilde; \xc3 &Auml; \xc4 &Aring; \xc5 &AElig; \xc6 &Ccedil; \xc7
      &Egrave; \xc8 &Eacute; \xc9 &Ecirc; \xca &Euml; \xcb &Igrave; \xcc
      &Iacute; \xcd &Icirc; \xce &Iuml; \xcf &ETH; \xd0 &Ntilde; \xd1
      &Ograve; \xd2 &Oacute; \xd3 &Ocirc; \xd4 &Otilde; \xd5 &Ouml; \xd6
      &times; \xd7 &Oslash; \xd8 &Ugrave; \xd9 &Uacute; \xda &Ucirc; \xdb
      &Uuml; \xdc &Yacute; \xdd &THORN; \xde &szlig; \xdf &agrave; \xe0
      &aacute; \xe1 &acirc; \xe2 &atilde; \xe3 &auml; \xe4 &aring; \xe5
      &aelig; \xe6 &ccedil; \xe7 &egrave; \xe8 &eacute; \xe9 &ecirc; \xea
      &euml; \xeb &igrave; \xec &iacute; \xed &icirc; \xee &iuml; \xef
      &eth; \xf0 &ntilde; \xf1 &ograve; \xf2 &oacute; \xf3 &ocirc; \xf4
      &otilde; \xf5 &ouml; \xf6 &divide; \xf7 &oslash; \xf8 &ugrave; \xf9
      &uacute; \xfa &ucirc; \xfb &uuml; \xfc &yacute; \xfd &thorn; \xfe
      &yuml; \xff &fnof; \u192 &Alpha; \u391 &Beta; \u392 &Gamma; \u393 &Delta; \u394
      &Epsilon; \u395 &Zeta; \u396 &Eta; \u397 &Theta; \u398 &Iota; \u399
      &Kappa; \u39A &Lambda; \u39B &Mu; \u39C &Nu; \u39D &Xi; \u39E
      &Omicron; \u39F &Pi; \u3A0 &Rho; \u3A1 &Sigma; \u3A3 &Tau; \u3A4
      &Upsilon; \u3A5 &Phi; \u3A6 &Chi; \u3A7 &Psi; \u3A8 &Omega; \u3A9
      &alpha; \u3B1 &beta; \u3B2 &gamma; \u3B3 &delta; \u3B4 &epsilon; \u3B5
      &zeta; \u3B6 &eta; \u3B7 &theta; \u3B8 &iota; \u3B9 &kappa; \u3BA
      &lambda; \u3BB &mu; \u3BC &nu; \u3BD &xi; \u3BE &omicron; \u3BF
      &pi; \u3C0 &rho; \u3C1 &sigmaf; \u3C2 &sigma; \u3C3 &tau; \u3C4
      &upsilon; \u3C5 &phi; \u3C6 &chi; \u3C7 &psi; \u3C8 &omega; \u3C9
      &thetasym; \u3D1 &upsih; \u3D2 &piv; \u3D6 &bull; \u2022
      &hellip; \u2026 &prime; \u2032 &Prime; \u2033 &oline; \u203E
      &frasl; \u2044 &weierp; \u2118 &image; \u2111 &real; \u211C
      &trade; \u2122 &alefsym; \u2135 &larr; \u2190 &uarr; \u2191
      &rarr; \u2192 &darr; \u2193 &harr; \u2194 &crarr; \u21B5
      &lArr; \u21D0 &uArr; \u21D1 &rArr; \u21D2 &dArr; \u21D3 &hArr; \u21D4
      &forall; \u2200 &part; \u2202 &exist; \u2203 &empty; \u2205
      &nabla; \u2207 &isin; \u2208 &notin; \u2209 &ni; \u220B &prod; \u220F
      &sum; \u2211 &minus; \u2212 &lowast; \u2217 &radic; \u221A
      &prop; \u221D &infin; \u221E &ang; \u2220 &and; \u2227 &or; \u2228
      &cap; \u2229 &cup; \u222A &int; \u222B &there4; \u2234 &sim; \u223C
      &cong; \u2245 &asymp; \u2248 &ne; \u2260 &equiv; \u2261 &le; \u2264
      &ge; \u2265 &sub; \u2282 &sup; \u2283 &nsub; \u2284 &sube; \u2286
      &supe; \u2287 &oplus; \u2295 &otimes; \u2297 &perp; \u22A5
      &sdot; \u22C5 &lceil; \u2308 &rceil; \u2309 &lfloor; \u230A
      &rfloor; \u230B &lang; \u2329 &rang; \u232A &loz; \u25CA
      &spades; \u2660 &clubs; \u2663 &hearts; \u2665 &diams; \u2666
      &quot; \x22 &amp; \x26 &lt; \x3C &gt; \x3E O&Elig; \u152 &oelig; \u153
      &Scaron; \u160 &scaron; \u161 &Yuml; \u178 &circ; \u2C6
      &tilde; \u2DC &ensp; \u2002 &emsp; \u2003 &thinsp; \u2009
      &zwnj; \u200C &zwj; \u200D &lrm; \u200E &rlm; \u200F &ndash; \u2013
      &mdash; \u2014 &lsquo; \u2018 &rsquo; \u2019 &sbquo; \u201A
      &ldquo; \u201C &rdquo; \u201D &bdquo; \u201E &dagger; \u2020
      &Dagger; \u2021 &permil; \u2030 &lsaquo; \u2039 &rsaquo; \u203A
      &euro; \u20AC &apos; \u0027 &lrm; "" &rlm; "" ‬ "" ‭ ""
      ‮ ""
   };
  set text [string map [list "\]" "\\\]" "\[" "\\\[" "\$" "\\\$" "\\" "\\\\"] [string map $escapes $text]]
  regsub -all -- {&#([[:digit:]]{1,5});} $text {[encoding convertto $char [format %c [string trimleft "\1" "0"]]]} text
  regsub -all -- {&#x([[:xdigit:]]{1,4});} $text {[encoding converto $char [format %c [scan "\1" %x]]]} text
  return [subst "$text"]
}


It works now for me in my minimal testing. This fix is also included in the newest download of webby, incith-google, and birdy/twitter (silent updates ftw!). Let me know if you still experience rendering issues or if this breaks things entirely now...
**crosses fingers again**
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
x0x
Op


Joined: 10 Feb 2009
Posts: 140
Location: The Netherlands

PostPosted: Sat May 11, 2013 9:49 am    Post subject: Reply with quote

Nice! Seems to work! No issues so far haha.
Back to top
View user's profile Send private message
x0x
Op


Joined: 10 Feb 2009
Posts: 140
Location: The Netherlands

PostPosted: Sat May 11, 2013 11:03 am    Post subject: Reply with quote

Another bug, it was there already before your fix. Only happens to certain URLs.

<ME> http://gizmodo.com/watch-nasas-emergency-iss-spacewalk-live-right-now-501627379
<BOT> durby: Invalid command name "zlib" ( http://gizmodo.com/watch-nasas-emergency-iss-spacewalk-live-right-now-501627379 )
<BOT> ~ 0

When I rehash my bot, I do see this error:

durby: Cannot find zlib or trf package! Gzipped url queries will not be used. Enjoy the slow lane! Razz
durby 0.3.0 has been loaded.

Might have something to do with it.

-edit-

Same problem after installing tcl-trf. Script recognizes it too:

durby: Found trf package. Fast lane activated!
durby 0.3.0 has been loaded.

<ME> http://gizmodo.com
<BOT> durby: Invalid command name "zlib" ( http://gizmodo.com )
<BOT> ~ 0
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sat May 11, 2013 9:39 pm    Post subject: Reply with quote

The problem is, the http package version you are using unfortunately. It is a mistake in tcl8.5, where it is assumed zlib is present. Even if you have installed trf correctly, the problem is your version of http package is zlib dependent. It cannot work without it. The only alternative is, to compile against tcl8.6b2 or higher. This tcl version natively includes zlib. The other alternative is to compile tcl locally, removing http 2.7 from the lib folder and replacing it with http 2.5.

Quote:
<speechles> !webby http://gizmodo.com
<sp33chy> Gizmodo - The Gadget Guide ( http://is.gd/zMhtyP )( 200; text/html; utf-8; 68504 bytes (gzip); 222576 bytes )
<sp33chy> The Gadget Guide

As you can see, to view gizmodo, you MUST use gzip. Some sites, you must use TLS/https.

Quote:
Webby: Found zlib package. Fast lane activated!
Webby: https supported: tls package found.

For your bot to fully support the future, you want to get both zlib and tls supported.

Update: Appears this occurs infrequently, they will serve you a gzip request, sometimes. Sometimes requesting gzip, will return plain-text response. Sometimes plain-text will return gzip. Not every single time, but... at peak times? Possibly? Let's just assume it is. Let's also assume the future is now, but... sometimes it isn't. Wink
Quote:
## The request should be sent back gzip, it isn't..
<speechles> !webby http://gizmodo.com --gz
<sp33chy> Gizmodo - The Gadget Guide ( http://tinyurl.com/suee2 )( 200; text/html; utf-8; 221863 bytes )
<sp33chy> The Gadget Guide

## The request should be sent back plain-text, it isn't...
<speechles> !webby http://gizmodo.com
<sp33chy> Gizmodo - The Gadget Guide ( http://is.gd/zMhtyP )( 200; text/html; utf-8; 68820 bytes (gzip); 222580 bytes )
<sp33chy> The Gadget Guide


And here's what it looks like within the request... full headers..

Quote:
<speechles> !webby http://gizmodo.com --header --xheader --html
<sp33chy> Gizmodo - The Gadget Guide ( http://is.gd/zMhtyP )( 200; text/html; utf-8; 68558 bytes (gzip); 222584 bytes )
<sp33chy> ntCoent-Length=221869; Via=1.1 varnish; P3P=CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"; Date=Sun, 12 May 2013 01:53:56 GMT; Content-Type=text/html; charset=utf-8; Content-Length=45713; Content-Encoding=gzip; Connection=close; Cache-Control=public, max-age=100; Age=59; Accept-Ranges=bytes
<sp33chy> x-cdn-view=mantle-root; X-Timer=S1368323636.443116426,VS0,VE0; X-Served-By=cache-s29-SJC2; X-Cache-Hits=38; X-Cache=HIT
<sp33chy> Metas: viewport=width=device-width,initial-scale=1.0;
<sp33chy> Metas: kinja:meta=%7B%22hackerspaceCssMd5%22%3A%227a40dde694f259a7a27031f5a3e7a718%22%2C%22spaceCssMd5%22%3A%225705ea850434beb072d9aef9746d0a5d%22%2C%22frontCssMd5%22%3A%22e4388a3f525f1b3674e732196d7681a6%22%2C%22templatesEnUsJsMd5%22%3A%2243c22c0836fbb5caf2b5157bacefdae5%22%2C%22io9CssMd5%22%3A%222018a4600ca16abc1ab2eb739d42a1c4%22%2C%22tinymceCssMd5%22%3A%22d646c23ed4acc4aa1cf446a2d8aef8fa%22%2C%22natgeo80sCssMd5%2
<sp33chy> Metas: kinja:mode=live; kinja:page-type=frontpage; ROBOTS=INDEX, FOLLOW; og:title=Gizmodo - The Gadget Guide; og:type=blog; og:image=http://gawker.com/assets/images/logos/touchicons/gizmodo-touch-icon-200x200.png; twitter:card=summary; twitter:site=@gizmodo; og:description=The Gadget Guide; description=The Gadget Guide; og:locale=en_US; og:site_name=Gizmodo; fb:app_id=44615671688;
<sp33chy> Metas: google-site-verification=FUkM9gDOR_WvsjOMuGnUUhhYv5zvRaQHCMmNeRHvvhQ

Here is the problem: X-Served-By=cache-s29-SJC2

The cache is at fault depending on which you are served from. The same issue happens with some wikipedia/mediawiki articles. The caches are to blame when they cache they wrong type.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
x0x
Op


Joined: 10 Feb 2009
Posts: 140
Location: The Netherlands

PostPosted: Sun May 12, 2013 5:15 pm    Post subject: Reply with quote

The problem is that I need to stick with TCL 8.5 for now (long story).

Is there another way to fix this?
Back to top
View user's profile Send private message
hille
Voice


Joined: 03 Aug 2013
Posts: 1

PostPosted: Sat Aug 03, 2013 3:55 pm    Post subject: Reply with quote

Great script!
Got one question. I have a urlshortener on my bot. I use .uf to trigger it.
I don't want durby to write the title of the url when I use the urlshortener.
Is it possible to add the .uf trigger in the ignorelist?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Aug 06, 2013 4:19 pm    Post subject: Reply with quote

hille wrote:
Is it possible to add the .uf trigger in the ignorelist?

Yes. Let's make it an ignore list though first.

Find these lines:
Code:
      if {[string match -nocase "!webby*" $word] || [string match -nocase "!durby*" $word]} {
         return 0
      } elseif {[string match -nocase "*://*" $word] || [string match -nocase "www.*" $word]} {


Replace them with these lines, found below:
Code:
      set ignores [list "!webby" "!durby" ".uf"] ; foreach ignore $ignores { if {[string match -nocase $ignore* $word]} { return 0 } }
      if {[string match -nocase "*://*" $word] || [string match -nocase "www.*" $word]} {


Now to add them, add them to "ignores" list.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber