#!/path/to/eggdrop
#
# This is a sample configuration file for your bot.  You will definitely
# want to edit this, to set up your bot.  Right now it creates a bot called
# "LamestBot" which sits on channel #lamest.
#
# The most vital things are listed at the top of this file, with the more
# complicated or obscure options further down.  So you don't necessarily
# need to edit this whole thing, although it might be a good idea if you
# want your bot to be hard to spot, and to work exactly the way you want
# it to.
#
# THIS CONFIGFILE WILL ONLY WORK IF YOU LINKED WITH TCL
#   If you didn't link with Tcl, you need to use "egg.config.dist" instead.
#


#####  GENERAL STUFF  #####


# the stuff people will see in /whois
set nick "Lamestbot"
set username "lamest"       ;# does not work if you have ident running!
set realname "/msg LamestBot hello"

# who's running this bot?
set admin "Lamer <email: lamer@lame.connected.com>"

# response for CTCP VERSION  (change this to make your bot hard to find)
set ctcp-version "ircII 2.6 SunOS 4.1.3 :ircii 2.6: almost there..."

# response for CTCP FINGER  (change this to make your bot hard to find)
set ctcp-finger "Lamestbot (root@home), idle 0 seconds"

# response for CTCP USERINFO  (change this to make your bot hard to find)
set ctcp-userinfo "<None Supplied>"

# [0/1] let users introduce themselves to the bot via 'hello'?
set learn-users 1

# many irc ops check for bots that respond to 'hello'.  you can change this
# to another word by uncommenting the following two lines, and changing
# "myword" to the word you want to use instead of 'hello' (it must be a
# single word)
# novice users are not expected to understand what these two lines do; they
# are just here to help you.  for more information on 'bind', check the file
# 'tcl-commands.doc'
#unbind msg - hello *hello
#bind msg - myword *hello

# the server list -- the bot will start at the first server listed, and cycle
# through them whenever it's disconnected
set servers {
  Tampa.FL.US.undernet.org:6667
  Washington.DC.US.undernet.org:6667
  Montreal.QU.CA.undernet.org:6667
  Rochester.MI.US.undernet.org:6667
  Albany.NY.US.undernet.org:6667
  Boston.MA.US.undernet.org:6667
  Norman.OK.US.undernet.org:6667
  Manhattan.KS.US.undernet.org:6667
  Milwaukee.WI.US.undernet.org:6667
  StGeorge.UT.US.undernet.org:6667
  Davis.CA.US.undernet.org:6667
  Austin.TX.US.undernet.org:6667
  SanJose.CA.US.undernet.org:6667
}

# [0/1] even if all the servers are down, cycle forever and keep trying to
# connect?
set never-give-up 0

# if the number of servers on the net gets below this number, it will
# jump to a new server (ie, it will assume it's on the losing end of a
# netsplit)
set servlimit 10

# [0/1] if the bot's nickname is changed (for example, if the intended
# nickname is already in use) keep trying to get the nick back?
set keep-nick 1

# use a separate helpbot? define this
# (not really recommended unless your bot sends a lot of info out to irc)
#set helpbot "LameHelp"


#####  CHANNEL PROTECTION  #####


# which channel will it sit on?
set home-channel "#lamest"

# what modes will be enforced?  '+' modes will always be kept on, '-' modes
# will always be kept off
set chanmode "+nt-likm"

# [0/1] clear all channel bans when the bot joins?  (ie, force the channel's
# ban list to match the bot's internal list)
set clear-bans 0

# [0/1] kick people who match channel bans?
set enforce-bans 1

# [0/1] make sure the bot's internal ban list is always active on the
# channel?  (this can get tedious if you have a large internal ban list --
# see '.help set perm-bans' for more info)
set perm-bans 1

# [0/1] require all bans to be made through the bot?
set forbid-bans 0

# [0/1] op users with the +o (op) flag as soon as they join the channel?
# (hint: this is a BAD IDEA)
set op-on-join 0

# [0/1] remember people who harm the bot, and punish them later?
# users with +f (friend) flag are exempt from revenge
set revenge 1

# [0/1] only let users with +o (op) flag be channel ops?
set bitch 0

# [0/1] allow users to store an info line?
set use-info 1

# [0/1] say a user's info line when she joins the channel?
set greet 1

# [0/1] if this is set, a leading '~' on user@hosts WON'T be stripped off
set strict-host 0

# [0/1] re-op a user with the +o (op) flag if they get deopped?
set protect-ops 1


#####  LOG FILES  #####


# you can have up to 5 log files.  at midnight every day, the old log files
# are renamed and a new log file begins.  by default, the old one is called
# "(logfilename).yesterday", and any logfiles before yesterday are erased.

# events are logged by certain categories -- this way you can specify
# exactly what kind of events you want sent to various logfiles.  the
# events are:
#   m  private msgs/ctcps to the bot
#   k  kicks, bans, mode changes on the channel
#   j  joins, parts, netsplits on the channel
#   p  public chatter on the channel
#   b  information about bot linking and userfile sharing
#   c  commands people use (via msg or dcc)
#   x  file transfers and file-area commands
#   r  (if defined in eggdrop.h) EVERYTHING sent to the bot by the server
#   o  other: misc info, errors -- IMPORTANT STUFF

# in 'eggdrop.log' put msgs, kicks/bans/modes, commands, and errors
logfile "mkco" "eggdrop.log"

# in 'eggdrop.cmds' put commands only
logfile "c" "eggdrop.cmds"

# [0/1] timestamp entries in the log file? (generally a good idea)
set log-time 1

# [0/1] keep logfiles for more than 48 hours -- instead of being called
# "(logfilename).yesterday", the log files are named by the current date,
# and kept around forever (eventually your directory might get full, so
# be careful with this!)
set keep-all-logs 0

# [0/1] log the channel status line every 5 minutes? (some people think
# it's annoying; i think it's handy)
set chan-updates 1

# this is the default console mode -- what masters will see automatically
# when they dcc chat with the bot (masters can alter their own console
# flags once they connect, though) -- it uses the same event flags as
# the log files
set console "mkcobx"


#####  FILES AND DIRECTORIES  #####


# the userfile: where user records are stored
set userfile "LamestBot.user"

# the notefile: where private notes between users are stored
set notefile "LamestBot.notes"

# helpdir: where the help files can be found (and there are plenty)
set helpdir "help/"

# textdir: where miscellaneous info files are
set textdir "text/"

# tempdir: a good place to temporarily store files (ie: /tmp)
set tempdir "/tmp"

# the MOTD is displayed when people dcc chat to the bot
set motd "motd"


#####  FILE SYSTEM  #####


# the file transfer area works via dcc chat.  you can turn the file system
# off by not defining the 'dcc-path' below.

# this is the 'root' directory for the file system (set it to "" if you
# don't want a file system)
set dcc-path "/home/mydir/dcc"

# if you want to allow uploads, set this to the directory uploads should be
# put into
set dcc-incoming "/home/mydir/dcc/incoming"

# [0/1] alternately, you can set this, and uploads will go to the current
# directory that a user is in
set upload-to-cd 0

# set maximum number of people that can be in the file area at once
# (0 to make it effectively infinite)
set dcc-users 20

# set maximum number of simultaneous downloads to allow for each user
set dcc-limit 3

# set the block size for dcc transfers (ircII uses 512 bytes, but admits
# that may be too small)
set dcc-block 1024

# maximum allowable file size that will be received, in K
# (default is 1024K = 1M)
set dcc-maxsize 1024

# [0/1] if this is set, eggdrop's "virtual file system" won't be used --
# instead, files and directories will be listed exactly as they exist on
# your account -- for more information on this, try '.help set raw-files'
# side effects of turning this on: no file descriptions, no hidden files,
# no access restrictions on directories
set raw-files 0

# [0/1] users with +o (op) flag will still need to have the +x (file system)
# flag to have access to the file system?
set require-x 0


#####  BOTNET  #####


# you probably shouldn't deal with this until reading 'botnet.doc' or
# something.  you need to know what you're doing.

# what telnet port should this bot answer?
set telnet 3333

# [0/1] share user data with other bots on the channel?
set share-users 0

# [0/1] allow other bots userfiles to overwrite yours?
set passive 0

# [0/1] refuse to merge party lines with other bots on the botnet?  (this
# is kind of outdated now)
set isolate 0

# [0/1] users with the +o (op) flag will still need the +p (party line) flag
# to join the dcc chat party line?
set require-p 0

# [0/1] allow people to telnet in, type 'NEW', and become a new user?
set open-telnets 0


#####  MORE ADVANCED STUFF  #####


# Tcl scripts to run when various events occur...
# these variables are limited to 120 bytes, so if you want to do something
# more complicated, just write a proc, and make 'need-op', etc, be a call
# to your proc.

# script to run (if any) when the bot needs to be op'd
set need-op { putserv "PRIVMSG #lamest :op me please... cos i'm LAME!" }

# script to run (if any) when the bot gets locked out of the channel
# (like if the channel is +i, or the bot is banned, etc)
set need-invite { putserv "PRIVMSG #lamest :hey... let me in!" }

# script to run (if any) when first connecting to a server
set init-server { putserv "MODE $botnick +i-ws" }

# NOTE: 'gain-ops' is now outdated and unused!

# how many msgs in one minute from the same host constitutes a flood?
set flood-msg 5
# how many public msgs?
set flood-chan 10
# how many joins?
set flood-join 5

# temporary bans will last how many minutes?
set ban-time 60
# temporary ignores will last how many minutes?
set ignore-time 10

# kick channel members after how many minutes of being idle?
# (set to 0 to disable)
set idle-kick 0

# send a note to anybody when I learn new users?
set notify-newusers "HQ"

# if compiled with owner, the following user(s) will ALWAYS have the
# owner (+n) flag
set owner "MrLame, MrsLame"

# what flags should new users get as a default?
set default-flags "px"

# create a dcc-chat command '.edit' which will edit a file
bind dcc n edit dcc_edit
proc dcc_edit {handle idx filename} {
  dccsimul $idx "exec red $filename"
}

# load that toolkit of useful scripts (some script packages may depend
#   on this being loaded)
source toolkit
source botkick
