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.

problem with exec in windrop

Old posts that have not been replied to for several years.
Locked
P
Pitchat
Op
Posts: 122
Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:

problem with exec in windrop

Post by Pitchat »

HI
How can i replace the exec command in a tcl to be able to use it in a windows eggdrop ?

heres an example

Code: Select all

exec mv $vname $vname.old
thanks

Pitchat
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

you could do it like this

Code: Select all

exec cmd /c ren $vname $vname.old
but i think this would be better

Code: Select all

file rename -force -- $vname $vname.old

photon?
P
Pitchat
Op
Posts: 122
Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:

Post by Pitchat »

yes it did just good but i found that i have 2 other exec that arent the same and replacing them with your solution doesnt fit it is sure that i do something wrong heres are the 2 remaining

Code: Select all

    catch {exec rm -f $vname.old}
and

Code: Select all

    if [catch {exec rm -f $fname} resf] {
thanks
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

file delete ?-force? ?- -? pathname ?pathname ... ?
Consult the file command in the TCL Manual.
Once the game is over, the king and the pawn go back in the same box.
P
Pitchat
Op
Posts: 122
Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:

Post by Pitchat »

thanks guys like always with your help and a bit of myself i manage to get trough my problems and it works juste fine .

please dont stop helpin poor souls like mine ;)

Pitchat
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

next time u use exec or set file [open "|test.exe" "r+"] use mode -nt

when u start the bot eggdrop.exe -nt eggdrop.conf
XplaiN but think of me as stupid
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

And reserve the exec command for non-native commands.
It's a security hole when you use exec, because you allow to execute scripts and shell commands.
And particularly when it's to do some rm :)
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

indeed hehe
XplaiN but think of me as stupid
Locked