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.

[not solved, but a workaround] Wildcards (*) no longer work!

Help for those learning Tcl or writing their own scripts.
Post Reply
d
dj-zath
Op
Posts: 134
Joined: Sat Nov 15, 2008 6:49 am
Contact:

[not solved, but a workaround] Wildcards (*) no longer work!

Post by dj-zath »

hi all, I admit.. I'm very tired and very flustered right now..

but I have discovered that a part of my script- which USED to work FLAWLESSLY.. however, now doesn't seem to work anymore.

I have tracked the problem down to a wildcard character * which has now become part of the string and not a wildcard at all.

further checking/testing revealed that ALL the other *'s throughout the code , as well, are no-longer seen as wildcards either!

so, whats SCREWY thing has gone wrong THIS time?

I have tried the installing the latest ver of TCL and its modules plus, I even recompiled the bot from scratch with no luck...

still doesn't work!

so, what have I done wrong/what has gone a-muck?

note:

I have since upgraded from FBSD 7.4 x 32 bit to FBSD 9.0 x 64 bit when I noticed this #%#@$ has broken!

for example, the following:

Code: Select all

putlog "[catch {foreach T [glob warp_show-*.mp3] {;}}]"
will only return a result IF the filename actually is "warp_show-*.mp3"

its supposed to return a result of any file(s) which contain the string with a wildcard; example: warp_show-6-9-2013.mp3

also the script snippet:

Code: Select all

if {(![catch {foreach VarA [glob "warp_show*.mp3"] {catch {exec rm -rf $VarA};};}])} {
    putquick "NOTICE $nick :Archives deleted!";
} else {
    putquick "NOTICE $nick :No archives to delete were found.";
};
will only delete the file named: warp_show*.mp3

these are just 2 examples.. theres even some code that the awesome NML375 did for me that now doesn't work either.

-DjZ-
:( :(


UPDATE:
I removed this post from its original place and moved it to this forum, sorry about putting it in the wrong place by mistake... OOPS!
Last edited by dj-zath on Thu Jan 31, 2013 7:47 am, edited 1 time in total.
d
dj-zath
Op
Posts: 134
Joined: Sat Nov 15, 2008 6:49 am
Contact:

Post by dj-zath »

this function was depreciated; it couldn't have worked (but, I tell you, before, it DID!).

I did have a 'solution'.. but, then the server was quickly taken out by hackers.. and I lost all the work before I could back it up..

I have to start over from scratch..

if I can remember EXACTLY what I had to do, and then, apply to the new work, to "get around the issue" I'll let you know.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

what was the issue again? the * is not treated as wildcard in glob?
Once the game is over, the king and the pawn go back in the same box.
d
dj-zath
Op
Posts: 134
Joined: Sat Nov 15, 2008 6:49 am
Contact:

Post by dj-zath »

yep, that's pretty much it...
Post Reply