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.

i am lost it is supose to work isn't it ??

Old posts that have not been replied to for several years.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

i am lost it is supose to work isn't it ??

Post by Ofloo »

ok what am i doing wrong i don't know feel like i tryed everything...

script

Code: Select all

bind pub - !space send_space

set drvspace "space.txt"
set execdrv "text/drv.bat"

proc send_space {nick uhost hand chan arg} {
global space send_space drvspace execdrv
  if {[isop $nick $chan] == 1} { 
  exec $execdrv
  dumpfile $nick $drvspace
  } else { 
    putserv "NOTICE $nick : Dude you don't got acces to that !!"
  } 
}
bat file :

Code: Select all

drv.exe > space.txt
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

What parts of your code works? Is the file created? Do you get any error messages?

afaik you can exec the exe straight from tcl

Code: Select all

exec "drv.exe > space.txt"
to have it saved to that txt for dumping... or

Code: Select all

foreach line [split [exec drv.exe] \n] {
    puthelp "PRIVMSG $nick :$line"
}
to have it all done without creating files.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

I added what you suggested putted the drv.exe in the root of windrop but still ... it won't work :/

[14:32] Tcl error[send_space]: couldn't duplicate input handle: bad file number

Code: Select all

bind pub - !space send_space

proc send_space {nick uhost hand chan arg} { 
global space send_space
  if {[isop $nick $chan] == 1} { 
  foreach line [split [exec drv.exe] \n] { 
  puthelp "PRIVMSG $nick :$line" 
  }
  } else { 
    putserv "NOTICE $nick : Dude you don't got acces to that !!" 
  } 
}
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

The error you are now seeing means that the file is being executed.

However, this error is very common, and there is little that can be done about it.

It is only ever seen on the windows platform. Seeing as eggdrop isn't activly developed for the windows platform, there is little more the developers can do either.

I sugest asking on the forums over at http://windrop.sf.net/
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

Well i did some reading ..
lots actualy but still don't realy understand but your write tho its something with windrop somthing about a warper.

found the sollution but don't fully understand what there saying http://tmml.sourceforge.net/doc/tcl/exec.html

When attempting to execute an application, exec first searches for the name as it was specified. Then, in order, .com, .exe, and .bat are appended to the end of the specified name and it searches for the longer name. If a directory name was not specified as part of the application name, the following directories are automatically searched in order when attempting to locate the application:
The directory from which the Tcl executable was loaded.
The current directory.
The Windows NT 32-bit system directory.
The Windows NT 16-bit system directory.
The Windows NT home directory.
The directories listed in the path.


In order to execute the shell builtin commands like dir and copy, the caller must prepend ``cmd.exe /c '' to the desired command.


also found some other solution if i under stand well i need to type "file://" infront of it but that doesn't seem to work either .. :/ well if any one has any suggestions about how they executed an exe .. let me know plz .. TnX verry mutch
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

What OS are you rinning this on?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Windows NT .. doh! :)
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

caesar wrote:Windows NT .. doh! :)
You would be ammazed at how many people would paste quotes from files, unrealted to the system they are on!
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

So did you try

Code: Select all

exec "cmd.exe /c drv.exe > space.txt"
as the site suggested? (after including the exe in your path or what ever it's called on windows)
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

yes i did try
did all kinds of strange things ..
most of the time it couldn't find the file cause of path or didn't exist, i putted the file c:\ (root) c:\winnt (system root) c:\winnt\system (system root 16bit) c:\winnt\system32 (system root 32 bits) and windrop directory

tryed c:\ c:\\ c:// c:/ file:// file:\\ file:\\c:\ file://c:/ file://c:// file:\\c:\\ ..... well all the combinations i could think of ..

for this as wel exec "cmd.exe /c drv.exe > space.txt", ive tryed to put it all kinds of different order (syntax that is) ...

OS: NT2000 SP3
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Do not use quotes in the exec command unless specificaly needed (then they should be escaped).
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hmm no result either ... is there an other eggdrop port that might work .. ? Or can it be executed from windrop .. ? cause it seems once i can elemate one problem i got an other one directory or file does not exist then when i got the drirectory setup i get again bad file interpretor bad filenumber or somthing .. ??
<br><br>
also tryed windrop forum like you suggested few days ago like you suggested, but no answer.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

OK, as you pointed out, once you fix the not found error, another one comes up.

The not found error is as it sounds, it doesn't find the files. once this is fixed all is fine.

However, there is a second error being produced, which obviously seems like there is no workaround.

The error (file discriptor) has been around for some time as noted above, but as also noted, eggdrop isn't activly developed for the win32 platform.

As it comes, eggdrop should compile fine using the cygwin wrapper library, out of the box, and as such, there is no porting to do.

Unless any1 else knows a free wrapper library like cygwin, that eggdrop could compile under, there is little more we can help you with on this.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hmm meaning ? so i need to use cygwin ?? or do i understand wrong .. ? or is there an other way arround it ?? has windrop ever solved this problem that you know off .. ?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

First off.

Cygwin is a wrapper library. It provides a way for functions designed to work on the *nix systems, to operate in a win32 environment.

Windrop is allready cygwin compiled.

What I was saying, is it may work, if you could use another wrapper library other than cygwin. However, I have never seen any others.

I have never seen a workaround, and once it starts, it usualy doesn't stop.
Locked