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.

storing lines/ log

Old posts that have not been replied to for several years.
Locked
b
brood
Voice
Posts: 30
Joined: Thu Sep 01, 2005 4:12 am

storing lines/ log

Post by brood »

Is it possible to make a script that stores everything in the channel I want, to a DB? Like sort of log.

For example: I want to store all lines that follow up after the nick: brood

If I say:
<brood> blablablablabla

It stores blablablablabla to a DB.


Then if i want to check if it's said I can do a command like !brood *bla* and it shows all lines that are said with word bla in it.

Thanks.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

logging flag +p will cause saving of all public chat in the logfile, check eggdrop.conf
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
b
brood
Voice
Posts: 30
Joined: Thu Sep 01, 2005 4:12 am

Post by brood »

demond wrote:logging flag +p will cause saving of all public chat in the logfile, check eggdrop.conf
I found the text in eggdrop.conf, but cant find where to change or ad flag +p to it:
#Eggdrop is capable of logging various things, from channel chatter to
# commands people use on the bot and file transfers. Logfiles are normally
# kept for 24 hours. Afterwards, they will be renamed to "(logfile).yesterday".
# After 48 hours, they will be overwritten by the logfile of the next day.
#
# Events are logged by certain categories. This way, you can specify
# exactly what kind of events you want sent to various logfiles.
#
# Logfile flags:
# b - information about bot linking and userfile sharing
# c - commands
# d - misc debug information
# h - raw share traffic
# j - joins, parts, quits, and netsplits on the channel
# k - kicks, bans, and mode changes on the channel
# m - private msgs, notices and ctcps to the bot
# o - misc info, errors, etc (IMPORTANT STUFF)
# p - public text on the channel
# r - raw incoming server traffic
# s - server connects, disconnects, and notices
# t - raw botnet traffic
# v - raw outgoing server traffic
# w - wallops (make sure the bot sets +w in init-server)
# x - file transfers and file-area commands
#
# Note that modes d, h, r, t, and v can fill disk quotas quickly. There are
# also eight user-defined levels ( 1-8 ) which can be used by Tcl scripts.
#
# Each logfile belongs to a certain channel. Events of type 'k', 'j', and 'p'
# are logged to whatever channel they happened on. Most other events are
# currently logged to every channel. You can make a logfile belong to all
# channels by assigning it to channel "*".

# This is the maximum number of logfiles allowed. This setting can be
# increased; however, don't decrease it.
set max-logs 5

# This is the maximum size of your logfiles. Set it to 0 to disable.
# This value is in kilobytes, so '550' would mean cycle logs when it
# reaches the size of 550 kilobytes. Note that this only works if you
# have keep-all-logs 0 (OFF).
set max-logsize 0

# This could be good if you have had problem with the logfile filling
# your quota/hard disk or if you log +p and publish it to the web and
# need more up-to-date info. Note that this setting might increase the
# CPU usage of your bot (on the other hand it will decrease your mem usage).
set quick-logs 0

# This setting allows you the logging of raw incoming server traffic via
# console/log flag 'r', raw outgoing server traffic via console/log mode 'v',
# raw botnet traffic via console/log mode 't', and raw share traffic via
# console/log mode 'h'. These flags can create a large security hole,
# allowing people to see user passwords. This is now restricted to +n users
# only. Please choose your owners with care.
set raw-log 0

# This creates a logfile named eggdrop.log containing private msgs/ctcps,
# commands, errors, and misc. info from any channel.
logfile mco * "logs/eggdrop.log"

# This creates a logfile named lamest.log containing joins, parts,
# netsplits, kicks, bans, mode changes, and public chat on the
# channel #lamest.
logfile jpk #lamest "logs/lamest.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
# logfiles will get suffix ".[day, 2 digits][month, 3 letters][year, 4 digits]".
# Note that your quota/hard-disk might be filled by this, so check your
# logfiles often and download them.
set keep-all-logs 0

# If keep-all-logs is 1, this setting will define the suffix of the logfiles.
# The default will result in a suffix like "04May2000". "%Y%m%d" will produce
# the often used yyyymmdd format. Read the strftime manpages for more options.
# NOTE: On systems which don't support strftime, the default format will
# be used _always_.
set logfile-suffix ".%d%b%Y"

# You can specify when Eggdrop should switch logfiles and start fresh. You
# must use military time for this setting. 300 is the default, and describes
# 03:00 (AM).
set switch-logfiles-at 300

# "Writing user file..." and "Writing channel file..." messages won't be
# logged anymore if this option is enabled.
set quiet-save 0
User avatar
dusk
Halfop
Posts: 91
Joined: Sun Mar 06, 2005 7:25 pm
Location: Belgium

Post by dusk »

# This creates a logfile named lamest.log containing joins, parts,
# netsplits, kicks, bans, mode changes, and public chat on the
# channel #lamest.
logfile jpk #lamest "logs/lamest.log"
That's it.

Grtz
Locked