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.

adding text (bot chat) to logfile

Old posts that have not been replied to for several years.
Locked
r
ribot
Voice
Posts: 17
Joined: Mon Sep 08, 2003 4:01 pm
Location: eggbeer
Contact:

adding text (bot chat) to logfile

Post by ribot »

hello friend :)

It seems that di old bot doesn't log its own public chatter, so I wonder how I can do that.
The chatter is when the bot sends strings to channels, so it should be as easy as:
"putlog $string"
but I want this text to be added to a specific file: channel.log.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

read doc/tcl-commands.doc

Post by user »

putloglev <level(s)> <channel> <text>
Description: sends text to the bot's logfile, tagged with all of the valid levels given. Use "*" to indicate all log levels.
Returns: nothing
Module: core
Have you ever read "The Manual"?
User avatar
bruhv
Voice
Posts: 22
Joined: Sat Apr 10, 2004 5:53 pm

Re: adding text (bot chat) to logfile

Post by bruhv »

ribot wrote:hello friend :)

It seems that di old bot doesn't log its own public chatter, so I wonder how I can do that.
The chatter is when the bot sends strings to channels, so it should be as easy as:
"putlog $string"
but I want this text to be added to a specific file: channel.log.
user wrote:putloglev <level(s)> <channel> <text>
Description: sends text to the bot's logfile, tagged with all of the valid levels given. Use "*" to indicate all log levels.
Returns: nothing
Module: core
been looking to sort this for a while, as i'm fed up with having to use another client just to log the bot's chat, but, no matter how hard i study the above it just doesn't fall into place for me :/
anyone fancy writing a quick bit of code that will make the bot add it's own chat to the logs, or to just one particular log file?
would be very much appreciated

8)
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

Maybe something similar to this... :P

Code: Select all

set botchatlog "botchat.log"

bind pubm - * pubm:botchat

proc pubm:botchat  {nick uhost hand chan text} {
 global botnick botchatlog
  if {![$nick == $botnick]} {return 0}
    set bc [open $botchatlog w]
    puts $bc "$text"
    close $bc
}
with a smidgen of luck, this 'lil script should log only public output from the eggdrop itself...be aware that this is untested, but I would appreciate any input :mrgreen:
d
deadite66
Halfop
Posts: 74
Joined: Mon May 30, 2005 2:49 am
Location: Great Yarmouth, UK

Post by deadite66 »

is their a way to get the bots output to the channel log.
it really annoying having an AI script and not have its sayings logged when they are published online.

can't believe with all the scripts there isn't a way or someone hasn't made a patch :/
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

use [putloglev] with a level defined in your [logfile] command:

Code: Select all

logfile jk1 #lamest "logs/lamest.log"
inside the script, AI or otherwise:

Code: Select all

putloglev 1 $chan $text
d
deadite66
Halfop
Posts: 74
Joined: Mon May 30, 2005 2:49 am
Location: Great Yarmouth, UK

Post by deadite66 »

thanx
the script is bmotion so it has tcl scripts everywhere, i'll experiment sticking the putloglev command in various places.
Locked