This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Support & discussion of released scripts, and announcements of new releases.
Trixar_za
Op
Posts: 143 Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:
Post
by Trixar_za » Wed Mar 12, 2014 7:03 am
Replace:
Code: Select all
} elseif {[regexp -all -inline {<a class=['"]add_to_list['"] data-defid=['"].*?['"] href=['"]#['"]>(.*?)<a class} $data] != ""} {
set matches [regexp -all -inline {<a class=['"]add_to_list['"] data-defid=['"].*?['"] href=['"]#['"]>(.*?)<a class} $data];
with
Code: Select all
} elseif {[regexp -all -inline {<a class=['"]add_to_list['"].*?>(.*?)<a class} $data] != ""} {
set matches [regexp -all -inline {<a class=['"]add_to_list['"].*?>(.*?)<a class} $data];
and
Code: Select all
regexp -nocase -- {<div class=['"]meaning['"]>(.*?)</div>} $match -> definition
with
Code: Select all
if {[regexp -nocase -- {<div class=['"]definition['"]>(.*?)</div>} $match -> definition]} {
} elseif {[regexp -nocase -- {<div class=['"]meaning['"]>(.*?)</div>} $match -> definition]} {
}
or you could just download everything from usual link @
http://trixarian.net/downloads/urband.zip
goalie204
Halfop
Posts: 44 Joined: Thu Apr 28, 2011 7:31 pm
Post
by goalie204 » Tue Mar 18, 2014 9:22 am
Awesome man! Thank you so much!!
neocharles
Voice
Posts: 34 Joined: Tue Apr 23, 2013 4:29 pm
Post
by neocharles » Tue Apr 01, 2014 11:27 am
I need to update this on my eggdrop. Do you add all three tcl files to the source portion in the configs? I just noticed that I do not currently have an http.tcl but I do have fsck and urban.tcl (maybe this is a different release completely?)
Trixar_za
Op
Posts: 143 Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:
Post
by Trixar_za » Fri Apr 18, 2014 5:21 pm
Update time again!
Just replace:
Code: Select all
} elseif {[regexp -all -inline {<a class=['"]add_to_list['"].*?>(.*?)<a class} $data] != ""} {
set matches [regexp -all -inline {<a class=['"]add_to_list['"].*?>(.*?)<a class} $data];
} else {
set matches "";
}
with
Code: Select all
} elseif {[regexp -all -inline {<a class=['"]add_to_list['"].*?>(.*?)<a class} $data] != ""} {
set matches [regexp -all -inline {<a class=['"]add_to_list['"].*?>(.*?)<a class} $data];
} elseif {[regexp -all -inline {<div class=['"]word['"]>(.*?)<div class=['"]share['"]} $data] != ""} {
set matches [regexp -all -inline {<div class=['"]word['"]>(.*?)<div class=['"]share['"]} $data];
} else {
set matches "";
}
or just download the copy at the usual address:
http://trixarian.net/downloads/urband.zip
neocharles: The default archive should include http.tcl if you don't already have a working copy. Just add them in this order in the eggdrop.conf file:
Code: Select all
source scripts/http.tcl
source scripts/fsck.tcl
source scripts/urband.tcl
spithash
Master
Posts: 249 Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:
Post
by spithash » Fri Apr 18, 2014 5:29 pm
This update/fix was one of the quickest ever or what?!
Nobody saw this coming
You're awesome!
Libera ##rtlsdr & ##re - Nick:
spithash
Click here for
troll.tcl
Trixar_za
Op
Posts: 143 Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:
Post
by Trixar_za » Sat Apr 19, 2014 10:35 am
Says the guy that told me about it
For those that are interested, I also updated my other urban dictionary script so it works again. This is the one that doesn't depend on fsck.tcl and it works and looks similiar to this one, but only grabs the top most definition. You can get it from
http://www.trixarian.net/downloads/urban.tcl if you're interested.
goalie204
Halfop
Posts: 44 Joined: Thu Apr 28, 2011 7:31 pm
Post
by goalie204 » Sun Apr 20, 2014 10:31 pm
reg one not working again
Trixar_za
Op
Posts: 143 Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:
Post
by Trixar_za » Tue Apr 22, 2014 7:26 pm
And yet another update. This time to the original script by porting my fixes over to it. So for the people that want the older one, just use urband2.tcl in the zip file at the usual address:
http://trixarian.net/downloads/urband.zip
That means you can now have the original look of the script complete with the -ud command, but don't worry, I added the ! and . variations too.
So for the new look, use urband.tcl in your eggdrop.conf and for the old look, use urband2.tcl - simple right?. Also if you want a version that looks like the new one, but doesn't require fsck.tcl, then download
http://www.trixarian.net/downloads/urban.tcl
That should appease everybody's tastes now
Trixar_za
Op
Posts: 143 Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:
Post
by Trixar_za » Fri May 16, 2014 4:39 pm
Yet another bug fix - this time to allow Urban Dictionary's search function to redirect the url to the correct case of the word (so spam becomes SPAM, etc).
You correct it by replacing:
Code: Select all
if {![string equal -nocase $state(status) "ok"]} {
return [list 0 "Warning: Couldn't connect to \[$url\] (connection $state(status))."];
}
with
Code: Select all
if {![string equal -nocase $state(status) "ok"]} {
return [list 0 "Warning: Couldn't connect to \[$url\] (connection $state(status))."];
}
foreach {name val} $state(meta) { set meta([string tolower $name]) $val; }
if {[info exists meta(location)]} {
set meta(redirect) $meta(location);
}
if {[info exists meta(redirect)]} {
if {[catch {http::geturl $meta(redirect) -timeout 20000} token]} {
return [list 0 "Warning: Couldn't connect to \[$meta(redirect)\]"];
}
}
And the problem should be resolved. The updated version of the scripts can now be found at the usual spot:
http://trixarian.net/downloads/urband.zip
Thanks to spithash for pointing out yet another bug in the script
spithash
Master
Posts: 249 Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:
Post
by spithash » Fri May 16, 2014 4:48 pm
JOY!
Libera ##rtlsdr & ##re - Nick:
spithash
Click here for
troll.tcl
spithash
Master
Posts: 249 Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:
Post
by spithash » Wed Nov 05, 2014 2:11 pm
The script needs update again, I will try to contact Trixar_za. They changed the website layout again I guess
Libera ##rtlsdr & ##re - Nick:
spithash
Click here for
troll.tcl
Trixar_za
Op
Posts: 143 Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:
Post
by Trixar_za » Thu Nov 06, 2014 2:53 am
Well, it was only a matter of time before they went and changed it again. Now going for a Bootstrap look it seems.
Anyway, change:
Code: Select all
} elseif {[regexp -all -inline {<div class=['"]word['"]>(.*?)<div class=['"]share['"]} $data] != ""} {
set matches [regexp -all -inline {<div class=['"]word['"]>(.*?)<div class=['"]share['"]} $data];
} else {
set matches "";
to
Code: Select all
} elseif {[regexp -all -inline {<div class=['"]word['"]>(.*?)<div class=['"]share['"]} $data] != ""} {
set matches [regexp -all -inline {<div class=['"]word['"]>(.*?)<div class=['"]share['"]} $data];
} elseif {[regexp -all -inline {<div class=['"]row['"]>(.*?)<div class=['"]def-footer['"]} $data] != ""} {
set matches [regexp -all -inline {<div class=['"]row['"]>(.*?)<div class=['"]def-footer['"]} $data];
} else {
set matches "";
and it should work again.
You can also get the fixed code at the usual link:
http://trixarian.net/downloads/urband.zip
spithash
Master
Posts: 249 Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:
Post
by spithash » Thu Nov 06, 2014 10:11 am
Thanks a lot man
Libera ##rtlsdr & ##re - Nick:
spithash
Click here for
troll.tcl
Trixar_za
Op
Posts: 143 Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:
Post
by Trixar_za » Sun Jun 28, 2015 12:15 pm
Been broken for a while, but...
Change
Code: Select all
} elseif {[regexp -all -inline {<div class=['"]row['"]>(.*?)<div class=['"]def-footer['"]} $data] != ""} {
set matches [regexp -all -inline {<div class=['"]row['"]>(.*?)<div class=['"]def-footer['"]} $data];
} else {
set matches "";
}
to
Code: Select all
} elseif {[regexp -all -inline {<div class=['"]row['"]>(.*?)<div class=['"]def-footer['"]} $data] != ""} {
set matches [regexp -all -inline {<div class=['"]row['"]>(.*?)<div class=['"]def-footer['"]} $data];
} elseif {[regexp -all -inline {<div class=['"]def-header['"]>(.*?)<div class=['"]def-footer['"]} $data] != ""} {
set matches [regexp -all -inline {<div class=['"]def-header['"]>(.*?)<div class=['"]def-footer['"]} $data];
} else {
set matches "";
}
or grab it from the usual spot:
http://trixarian.net/downloads/urband.zip
spithash
Master
Posts: 249 Joined: Thu Jul 12, 2007 9:21 am
Location: Libera
Contact:
Post
by spithash » Sat Jul 11, 2015 6:30 pm
hey man, are you sure that this works? because I get this:
Code: Select all
Tcl error [::urbandict::pub]: can't read "define": no such variable
Tcl error [::urbandict::pub]: can't read "example": no such variable
Libera ##rtlsdr & ##re - Nick:
spithash
Click here for
troll.tcl