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.

pisg-new.tcl for windrop

Support & discussion of released scripts, and announcements of new releases.
Post Reply
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

pisg-new.tcl for windrop

Post by testebr »

Hi,

How to make this script to work with Windrop:

http://www.egghelp.org/cgi-bin/tcl_arch ... ad&id=1291

the error message is:

Tcl error [pub:statsgen]: couldn't create error file for command: no such file or directory

Thanks
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Dunno if this runs under windrop, but it looks like it should:

----contents of pisg-new.zip
README.TXT
pisg-new.tcl
generate_logs

----config of pisg-new.tcl
set statsexe "~/generate_logs"
set statsurl "http://www.bsdaxis.net/stats"
set statschan "#BSDAxis"
set statsflags "nm"
set statstime "120"
set statsnick "Trip-Out"

Code: Select all

        } else {
        putlog "Generating Stats..."
        catch { exec $statsexe } error
          if {$error == ""} {
            append out "PRIVMSG $statschan :\002Stats Updated:\002 $statsurl"
            putlog "Stats Updated."
          } else {
            set out "PRIVMSG $statschan :$error"
          }
        }
The code above is to add error detection, so the script will report it as output rather than creating tcl errors. Your problem is most likely your settings of statsexe, and not pointing it to where generate_logs is located within your windrop.
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

Post by testebr »

[20:19:50] <!Me !stats
[20:19:54] <!Bot> couldn't create error file for command: no such file or directory
Actual config:

set statsexe "c:/windrop/scripts/generate_logs"

How to fix it?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Try:

Code: Select all

set statsexe "./scripts/generate_logs"
Bear in mind Windrop cannot run every Tcl script there is. Also remember that as Windrop runs within a Cygwin environment, Unix naming conventions apply.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
t
testebr
Halfop
Posts: 86
Joined: Thu Dec 01, 2005 12:22 pm

Post by testebr »

[20:35] Tcl error [pub:statsgen]: couldn't create error file for command: no such file or directory

.set errorInfo

[20:35] #channel# set errorInfo
[21:35:40] <bot> Currently: couldn't create error file for command: no such file or directory
[21:35:40] <bot> Currently: while executing
[21:35:40] <bot> Currently: "exec $statsexe"
[21:35:40] <bot> Currently: (procedure "pub:statsgen" line 8)
[21:35:40] <bot> Currently: invoked from within
[21:35:40] <bot> Currently: "pub:statsgen $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"

------------

"exec $statsexe" it is an unix command like, if I install the Cygwin, will fix the problem?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

$statsexe points to a Unix command?

If this is so then you need to find a port of that command and pop it into the main windrop directory.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

the problem is the perl in generate_logs..my bad for not catching this sooner wasn't aware what was actually inside that file.
#!/usr/local/bin/bash
#
#Your PISG executable location
PISG_DIR="/home/trip/pisg-0.67/pisg"
...
#DO NO EDIT BELOW HERE

$PISG_DIR psig.cfg

ftp -Vu ftp://$FTP_USER:$FTP_PASS@$FTP_HOST/$FTP_DIR $INDEX_FILE
something windrop cannot do like an actual eggdrop. It's already been discussed in this topic and this one.

maybe this helps?
s
starpossen
Op
Posts: 139
Joined: Tue Jan 10, 2006 1:08 am

Post by starpossen »

I know this isn't a new topic, but my problem/question is, I got a .bat file, working 100% when I click it, all is generated and uploaded, however, I just found this script pisg-new.tcl, and thought I could then execute my .bat file through it, but no, here is the script:

Code: Select all

#This is a rewrite of pisg.tcl so now when people request !stats
#If it is not the $statsnick requesting it, it will just show the url and not generate the logs
#also the $statsexe setting goes to a bash script i have made to generate and upload the logs via ftp
#to the directory that you set in generate_logs
#
#irc.bsdaxis.net #BSDAxis
#Trip-Out
set statsexe "d:/server/eggdrop/pisg/pisg.bat"
set statsurl "http://******.org/stats/"
set statschan "#******"
set statsflags "nm"
set statstime "120"
set statsnick "StatsBot"

bind pub $statsflags !stats pub:statsgen

proc pub:statsgen {nick host hand chan arg} {
        global statsurl statschan statsexe statsnick
        if {$nick != $statsnick} {
        putlog "$nick Requested Stats"
        append out "PRIVMSG $statschan :\002Stats Available At:\002 $statsurl"
        } else {
        putlog "Generating Stats..."
        exec $statsexe
        append out "PRIVMSG $statschan :\002Stats Updated:\002 $statsurl"
        putlog "Stats Updated."
        }
        puthelp $out
}

proc statstimer {} {
        global statsexe statsurl statschan statstime
        puthelp "PRIVMSG $statschan : \002Stats Updated:\002 $statsurl"
        timer $statstime statstimer
}

if {![info exists {statsset}]} {
  set statsset 1
  timer 2 statstimer
}

putlog "pisg-new.tcl 1.0 By Trip-Out Loaded"
And when I type !stats I get the famous error:

Code: Select all

[07:18:33] <StatsBot [07:18] Tcl error [pub:statsgen]: couldn't create error file for command: no such file or directory
I've search alot, obviously not good enough, as I am totally lost

Any help would be nice.
Post Reply