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.

Control logging via DCC chat

General support and discussion of Eggdrop bots.
Post Reply
k
kherlis
Voice
Posts: 5
Joined: Fri Jul 09, 2010 3:37 am

Control logging via DCC chat

Post by kherlis »

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
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Re: Control logging via DCC chat

Post by willyw »

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 ... mands.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.
k
kherlis
Voice
Posts: 5
Joined: Fri Jul 09, 2010 3:37 am

Post by kherlis »

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...
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

.status all in DCC/telnet will list the current logs. just doing .tcl logfile blindly probably isnt the best thing imo.

Code: Select all

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
Entering a blank mode and channel ("") makes the bot stop logging there.
but i wouldn't recommend doing it this way.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

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?
k
kherlis
Voice
Posts: 5
Joined: Fri Jul 09, 2010 3:37 am

Post by kherlis »

It tells me to go see a psychiatrist :)

<Bob> .tcl logfile
<Legion> What? You need '.help'
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
k
kherlis
Voice
Posts: 5
Joined: Fri Jul 09, 2010 3:37 am

Post by kherlis »

Hmm, well the .conf file does say

Code: Select all

set owner "Bob"
and I've commented out the line

Code: Select all

#unbind dcc n tcl *dcc:tcl
Anything else I've missed?
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

kherlis wrote:
...
and I've commented out the line

Code: Select all

#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
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
Post Reply