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 

Control logging via DCC chat

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
kherlis
Voice


Joined: 09 Jul 2010
Posts: 5

PostPosted: Thu Mar 10, 2011 8:40 am    Post subject: Control logging via DCC chat Reply with quote

Hi,

I couldn't find the help I need anywhere on the forum, so apologies if this is obvious...

I've configured my eggdrop to log what happens on the channel to file, it all works well but I'd like to be able to turn the logging off/on using DCC commands.

I can't find anything to do that, I guess what I'm after is some sort of

.logfile <flags>

Any idea if it's at all possible?

I'm using eggdrop 1.6.19.

Thanks in advance
K
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Thu Mar 10, 2011 11:07 am    Post subject: Re: Control logging via DCC chat Reply with quote

kherlis wrote:
Hi,

I couldn't find the help I need anywhere on the forum, so apologies if this is obvious...

I've configured my eggdrop to log what happens on the channel to file, it all works well but I'd like to be able to turn the logging off/on using DCC commands.
...


An idea to consider -

First, examine your eggdrop.conf, looking for the section about
enabling .tcl and .set commands for bot owner.
Enable .tcl

Next, visit:
http://www.eggheads.org/support/egghtml/1.6.20/tcl-commands.html
and find:
logfile [<modes> <channel> <filename>]
and read that.

With .tcl enabled, and if you are bot owner, you should then be able to enter
.tcl logfile
in partyline, and get a list of logfiles.
According to tcl-commands.doc, you should also be able to modify the flags too.

Note that if you restart the bot, then the settings in eggdrop.conf will be restored, and if you wanted to turn off logging, you'd have to re-do the above steps in DCC chat with bot.
Back to top
View user's profile Send private message
kherlis
Voice


Joined: 09 Jul 2010
Posts: 5

PostPosted: Thu Mar 10, 2011 1:07 pm    Post subject: Reply with quote

Hi,

Thanks for your reply, I hadn't realised I had to enable the tcl commands.

I was already bot owner, so that bit was fine.

However, when I try

.tcl logfile (or any other .tcl command listed in the command list)

The bot doesn't seem to understand it.

Should I have a logfile.tcl file under the /scripts folder? I have the list of commands in the /doc, so I'm guessing it should be part of my version, but there's obviously something missing...
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Thu Mar 10, 2011 2:03 pm    Post subject: Reply with quote

.status all in DCC/telnet will list the current logs. just doing .tcl logfile blindly probably isnt the best thing imo.
Code:
logfile [<modes> <channel> <filename>]
   Description: creates a new logfile, which will log the modes given for the
                      channel listed. If no logfile is specified, a list of existing
                      logfiles will be returned.
                      "*" indicates all channels. You can also change the
                      modes and channel of an existing logfile with this command.
                      Entering a blank mode and channel ("") makes the bot stop
                      logging there.
   Returns: filename of logfile created, or, if no logfile is specified, a list of
                logfiles such as: {mco * eggdrop.log} {jp #lame lame.log}
maybe do a scripting request, for a dcc command script to stop and start logging on a channel. OR if you really want to use the .tcl in dcc/telnet. I would at least read the above manul entry for logfile and note
Quote:
Entering a blank mode and channel ("") makes the bot stop logging there.
but i wouldn't recommend doing it this way.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Thu Mar 10, 2011 2:53 pm    Post subject: Reply with quote

kherlis wrote:

...
However, when I try

.tcl logfile (or any other .tcl command listed in the command list)

The bot doesn't seem to understand it.

...



What happens?
Back to top
View user's profile Send private message
kherlis
Voice


Joined: 09 Jul 2010
Posts: 5

PostPosted: Fri Mar 11, 2011 4:15 am    Post subject: Reply with quote

It tells me to go see a psychiatrist Smile

<Bob> .tcl logfile
<Legion> What? You need '.help'
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Mar 11, 2011 7:12 am    Post subject: Reply with quote

That means either the dcc bind for .tcl isn't active or your handle isn't set at 'set owner'.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
kherlis
Voice


Joined: 09 Jul 2010
Posts: 5

PostPosted: Fri Mar 11, 2011 12:07 pm    Post subject: Reply with quote

Hmm, well the .conf file does say

Code:
set owner "Bob"


and I've commented out the line

Code:
#unbind dcc n tcl *dcc:tcl


Anything else I've missed?
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Fri Mar 11, 2011 12:15 pm    Post subject: Reply with quote

kherlis wrote:


...
and I've commented out the line

Code:
#unbind dcc n tcl *dcc:tcl





You said you are not running the current version of Eggdrop, correct?
You are using ver .19?

I'm trying to remember....
I hope you have a fully commented eggdrop.conf - - if so, go to that part, and read it carefully, about how to enable the .tcl command
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Mar 11, 2011 12:23 pm    Post subject: Reply with quote

If you have 'must-be-owner' set to 1 then you should put your handle in the owner variable: set owner "<your handle>" and then .restart the bot.

Make sure that the user you put at 'set owner' is the same user you use to login to your bot via dcc chat/telnet.
_________________
Once the game is over, the king and the pawn go back in the same box.
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 -> Eggdrop Help 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