| View previous topic :: View next topic |
| Author |
Message |
testebr Halfop
Joined: 01 Dec 2005 Posts: 86
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Jun 23, 2007 3:55 pm Post subject: |
|
|
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: | } 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. |
|
| Back to top |
|
 |
testebr Halfop
Joined: 01 Dec 2005 Posts: 86
|
Posted: Sat Jun 23, 2007 7:20 pm Post subject: |
|
|
| Quote: | [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? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Jun 23, 2007 8:15 pm Post subject: |
|
|
Try:
| Code: | | 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 |
|
| Back to top |
|
 |
testebr Halfop
Joined: 01 Dec 2005 Posts: 86
|
Posted: Sat Jun 23, 2007 8:39 pm Post subject: |
|
|
[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
[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? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sat Jun 23, 2007 8:46 pm Post subject: |
|
|
$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 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Sat Jun 23, 2007 10:48 pm Post subject: |
|
|
the problem is the perl in generate_logs..my bad for not catching this sooner wasn't aware what was actually inside that file.
something windrop cannot do like an actual eggdrop. It's already been discussed in this topic and this one.
maybe this helps? |
|
| Back to top |
|
 |
starpossen Op
Joined: 10 Jan 2006 Posts: 139
|
Posted: Thu Jan 17, 2008 2:20 am Post subject: |
|
|
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: |
#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: |
[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. |
|
| Back to top |
|
 |
|