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 

Update Pisg via channel kommand.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Fri Jan 27, 2006 3:43 am    Post subject: Update Pisg via channel kommand. Reply with quote

Hi.
Is it possible to make a botscript that execute the ./pisg kommand on the shell? I was thinking to execute it in the channel by using !pisg

toby
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


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

PostPosted: Fri Jan 27, 2006 8:13 am    Post subject: Reply with quote

Why? It's a simple matter of having a crontab do the work.
_________________
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
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Fri Jan 27, 2006 9:43 am    Post subject: Reply with quote

You are of course right.
If i want to run pisg once a day at 23:59 , how will the crontab look like?
My crontab as it is now on the shell:
0 1 * * * * /home/tessa/pisg-0.67/pisg --silent
And it dont work. Confused
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


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

PostPosted: Fri Jan 27, 2006 11:32 am    Post subject: Reply with quote

I use the following crontab entry:
Code:
0 0 * * * ~/public_html/pisgchek >/dev/null 2>&1

The script I wrote:
Code:
#!/bin/sh

statsbin="./pisg"
statpath="/home/Barry/public_html"

cd $statpath

$statsbin

The crontab checks once per day at midnight. You'd need to alter the path in the script and crontab entry for your setup.
_________________
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
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Fri Jan 27, 2006 3:27 pm    Post subject: Reply with quote

Thx.
I will try that.
Back to top
View user's profile Send private message Visit poster's website
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Sat Jan 28, 2006 9:45 am    Post subject: Reply with quote

Hi again.
What shall I put where I have the questionmarks?
0 0 * * * /home/tessa/pisg-0.67/?? >/dev/null 2>&1

Shall I put "./pisg" , there?

The pat to the pisg execute is:

statpath="/home/tessa/pisg-0.67/"
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


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

PostPosted: Sat Jan 28, 2006 11:01 am    Post subject: Reply with quote

Code:
0 0 * * * ~/pisg-0.67/pisgchek >/dev/null 2>&1


pisgchek:
Code:
#!/bin/sh

statsbin="./pisg"
statpath="/home/tessa/pisg-0.67/"

cd $statpath

$statsbin

pisgchek & pisg reside in the same directory and chmod 755 both files to make them executable.
_________________
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
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Sat Jan 28, 2006 11:39 am    Post subject: Reply with quote

While rehashing the bot after installing the script: (miki)

[16:36] Tcl error in file 'miki.conf':
[16:36] invalid command name "statsbin="./pisg""
while executing
"statsbin="./pisg" "
(file "scripts/statcron.tcl" line 3)
invoked from within
"source scripts/statcron.tcl"
(file "miki.conf" line 1368)
[16:36] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)

"My" script and crontabentry:

#!/bin/sh

statsbin="./pisg"
statpath="/home/tessa/pisg-0.67/"

cd $statpath

$statsbin

# 0 0 * * * /home/tessa/pisg-0.67/pisgchek >/dev/null 2>&1
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


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

PostPosted: Sat Jan 28, 2006 11:52 am    Post subject: Reply with quote

What is statcron.tcl? What I posted has nothing to do with any TCL scripts. My post simply shows how to execute pisg once per day (and it works *if* pisg & pisgchek are located in the same dir).

NB: My "script" cannot be loaded/run by eggdrop.
_________________
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
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Sat Jan 28, 2006 12:13 pm    Post subject: Reply with quote

hmm...
Can you fix it for me?

EDITED: You do not post your account login information publicly in any forums.

Mybe IŽll learn something. Wink
Back to top
View user's profile Send private message Visit poster's website
Alchera
Revered One


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

PostPosted: Sat Jan 28, 2006 10:23 pm    Post subject: Reply with quote

I think you misunderstand what pisg actually is. pisg is a Perl IRC Statistics Generator that uses eggdrops' logs to create an index.html making it available via the WWW. eggdrop has nothing to do with pisg other than the fact that the generated log files are read by pisg.

For the whole thing to work you also need Apache running on your account and it's preferable you pop the pisg files into a public_html folder.

The following settings are also needed in your bots' conf:
Code:
set max-logs 365
set max-logsize 0
set quick-logs 0
set raw-log 0
logfile mco * "logs/miki.log"
logfile jpk #Channel "stats/channel.log"

# Use this feature to timestamp entries in the log file.
set log-time 1

# If you want to keep your logfiles forever, turn this setting on. All
set keep-all-logs 1

Notice that I created a directory called 'stats' and have all the logs to be used by pisg stored in it; keeps it separate from the normal bot logs.

I suggest you read carefully *all* documentation here: http://pisg.sourceforge.net/
_________________
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
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Sat Jan 28, 2006 11:14 pm    Post subject: Reply with quote

Alchera, I appreciate your. help.

(I was drunk last night, sorry) Laughing

Unfortunately my shellaccount have been closed because someone
on the forum has tryed to "hack" my account. Heh.
I didnt think any user on this forum even did care about logging
in to my account.

(And yes, I DID learn something. Never post login information on a forum)
Back to top
View user's profile Send private message Visit poster's website
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Mon Jan 30, 2006 10:57 am    Post subject: Reply with quote

mm

Last edited by tobydude on Tue Jan 31, 2006 3:10 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
tobydude
Voice


Joined: 06 Jun 2005
Posts: 15
Location: Norway

PostPosted: Mon Jan 30, 2006 11:01 am    Post subject: Reply with quote

Is the meaning that the code should be added in the bots config-file?
I use mirclog.tcl and the logfile is in /home/tessa/miki/mircstatlog/

(My account is open again)
Back to top
View user's profile Send private message Visit poster's website
ElZeRo
Voice


Joined: 11 Apr 2005
Posts: 24

PostPosted: Mon Jan 30, 2006 12:06 pm    Post subject: Reply with quote

Try this Script ->
http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&id=923 pisg-0.5.tcl

Quote:
Pisg stats automaker. Multi-channel, ftp support, easy to configure.

Im using it ... Works fine Razz
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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