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.

Using for example "egg" instead of "./egg

Help for those learning Tcl or writing their own scripts.
Post Reply
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Using for example "egg" instead of "./egg

Post by Thunderdome »

My SP changed the way we run processes after an attac.
Now instead of ./ircstats we must do ircstats
or eggdrop instead of ./eggdrop

The problem is, how do I change my script line that does this:

Code: Select all

eval exec $ircstatsexe $ircstatslog $ircstatscfg
in order to run in this new manner?
Merry Xmas
Last edited by Thunderdome on Sat Dec 24, 2005 10:12 am, edited 1 time in total.
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

That piece of code is not enough for anyone to help you.
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Post by Thunderdome »

Code: Select all

#set the full path to your ircstats executable
set ircstatsexe "/home/lol/IRCStats-1.0/ircstats"

#set the full path to your logfile
set ircstatslog "/home/lol/eggdrop/logs/thunderdome.log"

#set the full path to your ircstats cfg file
set ircstatscfg "/home/lol/IRCStats-1.0/ircstats.cfg"

#set the url for your statistics page
set ircstatsurl "http://lol.net/~lol/ircstats.html"

#change this at will: minutes hours days year
bind time - "07 * * * *" execution
bind time - "27 * * * *" execution
bind time - "47 * * * *" execution

#change n to whatever flag you wish (- for all users) and change !ircstats to whatever bind you wish to use
bind pub n !ircstats execution


proc execution {nick uhost hand chan arg} { 
#### change the directory to your Ircstats main directory ####
        cd /home/lol/IRCStats-1.0/
        global ircstatsexe ircstatslog ircstatscfg ircstatsurl
        eval exec $ircstatsexe $ircstatslog $ircstatscfg
        append out "NOTICE $nick :" ; if {[catch {exec $ircstatsexe} error]} { append out "$ircstatsexe an error occured: [string totitle $error]" } else { append out "4,5Stats Updated:0,5 $ircstatsurl" }
	  puthelp $out
#### change the directory to your eggdrop main directory ####
        cd /home/lol/eggdrop/
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

get rid of absolute paths and leave the name of executable only
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
User avatar
Thunderdome
Op
Posts: 187
Joined: Tue Mar 15, 2005 4:42 pm

Post by Thunderdome »

worked fine! Thanks for the help! :)
Merry Xmas
Post Reply