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.

Search found 20 matches

by streamish
Wed Mar 30, 2011 3:02 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Alright, thanks for all your help
by streamish
Wed Mar 30, 2011 2:09 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

On a side note, I have tried this on multiple eggdrops on different servers. Same result. The script itself runs fantastic. It only crashes when I need to rehash the eggdrop
by streamish
Wed Mar 30, 2011 2:08 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Used your code exactly. Launches fine [11:05:49] Writing channel file... [11:05:49] Userfile loaded, unpacking... [11:05:49] === oldskewl: 3 channels, 349 users. Launched into the background (pid: 94069) Rehash fails [oldskewl(dcc)] [11:06:29] Writing channel file... [oldskewl(dcc)] [11:06:29] Liste...
by streamish
Wed Mar 30, 2011 1:46 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Sorry, I was copying the code from here rather than from my source. My code does have the bracket. package require http if {[catch {set shoefile [::http::geturl "http://shoelace.org/picdump.txt" -timeout 5000]} error]} { putlog "ERROR: Cannot create link list ( $error )" set shoe...
by streamish
Wed Mar 30, 2011 1:39 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

You would think so, and thats why this issue is so odd. When I disable the script and restart the eggdrop there are no errors, and i can rehash fine. Only when the script is loaded will it crash the bot with the errors, unrelating to the script. Also, when I changed package require http if [catch {s...
by streamish
Wed Mar 30, 2011 1:30 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Actually I take it back. All of these conflicts seem to be due to this piece of code package require http if [catch {set shoefile [::http::geturl "http://www.whateverdomain.com/links.txt" -timeout 5000]} error]} { putlog "ERROR: Cannot create link list ( $error )" set shoelace [l...
by streamish
Tue Mar 29, 2011 7:22 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

I'm having a super weird problem with my script, and it's been happening from the beginning of usage, I just figured it was something random. Every time I .rehash the bot crashes with the following errors: <oldskewl> [16:18:17] *** Can't load Userinfo TCL v1.07 -- At least Eggdrop v1.4.3 required <o...
by streamish
Fri Mar 25, 2011 3:01 am
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Hahaha, no problem. I should have caught that myself =P
by streamish
Fri Mar 25, 2011 2:50 am
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Not sure what happened with that snippet of code. Eggdrop crashed, and I'm getting this error: [23:49:49] Tcl error in file 'oldskewl.conf': [23:49:49] invalid character "}" in expression "0}" (parsing expression "0}") invoked from within "if [catch {set shoefile [...
by streamish
Fri Mar 25, 2011 12:47 am
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

I actually haven't even tried yet, just figured I would ask lol
by streamish
Fri Mar 25, 2011 12:45 am
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Heres a question, would I be able to have a global database by changing the links.txt location to http://www.whateverdomain.com/links.txt?
by streamish
Fri Mar 25, 2011 12:05 am
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Thanks man. You're the bestestestest. I'm trying to get adjusted to it, because tcl seems pretty damn fun.
by streamish
Thu Mar 24, 2011 11:44 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Thanks so much speechles, it's absolutely brilliant.
What would the difficulty be to seperate the links into an external file such as links.txt?

Would I just do something like this

Code: Select all

set file "scripts/links.txt"

set shoelace [open $file r]
Thanks
by streamish
Thu Mar 24, 2011 10:58 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

Didn't seem to work for me. My code full code is as follows: bind pub - !test pub_shoelace proc pub_shoelace {nick mask hand channel text} { global shoelace if {$text != ""} { #user supplied a search-term set hits [lsearch -all $shoelace *$text*] #test if we found any.. if {[llength $hits]...
by streamish
Thu Mar 24, 2011 7:39 pm
Forum: Scripting Help
Topic: adding a search
Replies: 28
Views: 17410

I'm guessing the issue lies within the following: #test if we found any.. if {[llength $hits] > 0} { #We've got atleast one match, pick a random one if we've got multiple ones set item [rand [llength $hits]] } else { #No hits, pick a random line from the list set item [rand [llength $shoelace]] } } ...