egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pisg-new.tcl for windrop

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Sat Jun 23, 2007 1:19 pm    Post subject: pisg-new.tcl for windrop Reply with quote

Hi,

How to make this script to work with Windrop:

http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=1291

the error message is:

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

Thanks
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sat Jun 23, 2007 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Sat Jun 23, 2007 7:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat Jun 23, 2007 8:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
testebr
Halfop


Joined: 01 Dec 2005
Posts: 86

PostPosted: Sat Jun 23, 2007 8:39 pm    Post subject: Reply with quote

[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 Cool
[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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sat Jun 23, 2007 8:46 pm    Post subject: Reply with quote

$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
View user's profile Send private message Visit poster's website
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sat Jun 23, 2007 10:48 pm    Post subject: Reply with quote

the problem is the perl in generate_logs..my bad for not catching this sooner wasn't aware what was actually inside that file.
Quote:
#!/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?
Back to top
View user's profile Send private message
starpossen
Op


Joined: 10 Jan 2006
Posts: 139

PostPosted: Thu Jan 17, 2008 2:20 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber