#! ./eggdrop.cmd
# -----------------------------------------------------------------------------
# windrop-1.10.1.conf
#
# Example Windrop / Eggdrop 1.10.1 configuration for a portable bundle built
# with Tcl 9, TclTLS 2.0 and tcllib 2.0 under Cygwin.
#
# This file is intentionally conservative:
# - passive defaults
# - no automatic channel takeover logic
# - TLS enabled on the binary side, but no certificate auth forced
# - python.mod left disabled by default
# - HTTPS compatibility wrapper loaded before Tcl scripts that may use
#   package http with https:// URLs
# -----------------------------------------------------------------------------

##### BASIC SETTINGS #####

set username "windrop"
set admin "Admin <email: admin@example.net>"
set network "ExampleNet"
set timezone "CET"
set offset "-1"
#set env(TZ) "$timezone$offset"

set prefer-ipv6 0

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

set max-logs 20
set max-logsize 0
set raw-log 0
logfile mco * "logs/windrop.log"
set log-time 1
set timestamp-format {[%H:%M:%S]}
set keep-all-logs 0
set logfile-suffix ".%d%b%Y"
set switch-logfiles-at 300
set quiet-save 0

##### CONSOLE #####

set console "mkcoblxs"

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

set userfile "windrop.user"
#set pidfile "pid.windrop"
set help-path "help/"
set text-path "text/"
set motd "text/motd"
set telnet-banner "text/banner"
set userfile-perm 0600

##### BOTNET / DCC / TELNET #####

# Change this port before production use.
listen 3333 all

set remote-boots 2
set share-unlinks 1
set protect-telnet 0
set dcc-sanitycheck 0
set ident-timeout 5
set require-p 1
set open-telnets 0
set stealth-telnets 0
set stealth-prompt "\n\nNickname.\n"
set use-telnet-banner 0
set connect-timeout 15
set dcc-flood-thr 3
set telnet-flood 5:60
set paranoid-telnet-flood 1

##### SSL SETTINGS #####

# Uncomment and set these only if you need Eggdrop to act as a TLS server
# (SSL telnet, schat, hub/leaf TLS, certificate auth, etc).
#set ssl-privatekey "eggdrop.key"
#set ssl-certificate "eggdrop.crt"

# CA verification path used by Eggdrop itself.
set ssl-capath "/etc/ssl/"

# Optional hardening examples:
# set ssl-protocols "TLSv1.2 TLSv1.3"
# set ssl-ciphers "DEFAULT"

##### ADVANCED SETTINGS #####

set ignore-time 15
set hourly-updates 00

# You must set an owner handle before production use.
#set owner "admin"

set notify-newusers "$owner"
set default-flags "hp"
set whois-fields "url birthday"
set must-be-owner 1
unbind dcc n simul *dcc:simul
set max-socks 100
set allow-dk-cmds 1
set dupwait-timeout 5
set cidr-support 0
set show-uname 1

##### MODULES #####

set mod-path "modules/"

#### PBKDF2 / BLOWFISH ####

loadmodule pbkdf2
loadmodule blowfish
set blowfish-use-mode cbc

#### PYTHON ####

# Enable only if you actually need Python scripts.
#loadmodule python

#### CHANNELS ####

# Complete passive mode, modify this section that suits your target behavior (https://docs.eggheads.org/modules/mod/channels.html)

loadmodule channels
set chanfile "windrop.chan"
set force-expire 0
set share-greet 0
set use-info 1
set allow-ps 0

set default-flood-chan 0
set default-flood-deop 0
set default-flood-kick 0
set default-flood-join 0
set default-flood-ctcp 0
set default-flood-nick 0

set default-aop-delay 0
set default-idle-kick 0
set default-chanmode ""
set default-stopnethack-mode 0
set default-revenge-mode 0
set default-ban-type 0
set default-ban-time 0
set default-exempt-time 0
set default-invite-time 0

set default-chanset {
        -autoop
        -autovoice
        -autohalfop
        -bitch
        -cycle
        -dontkickops
        -dynamicbans
        -dynamicexempts
        -dynamicinvites
        -enforcebans
        -greet
        -inactive
        -nodesynch
        -protectfriends
        -protectops
        -protecthalfops
        -revenge
        -revengebot
        -seen
        -secret
        -shared
        -statuslog
        -userbans
        -userexempts
        -userinvites
        -static
}

# Add channels from the partyline with:
#   .+chan #channel
#
# Or uncomment a static example:
# channel add #example

#### SERVER ####

loadmodule server
set net-type "Other"
set nick "WindropBot"
set altnick "WindropBot_"
set realname "Windrop 1.10.1"

bind evnt - init-server evnt:init_server
proc evnt:init_server {type} {
  global botnick
  putquick "MODE $botnick +i-ws"
  # putserv "PRIVMSG NickServ :identify <password>"
}

set default-port 6667

# Replace these with real servers for your network.
# Prefix the port with + to use TLS.
# Examples:
# server add irc.example.net 6667
# server add irc.example.net +6697
# server add irc6.example.net +6697
#server add irc.example.net 6667

set msg-rate 2
set keep-nick 1
set quiet-reject 1
set lowercase-ctcp 0
set answer-ctcp 3
set flood-msg 5:60
set flood-ctcp 3:60
set server-cycle-wait 60
set server-timeout 60
set check-stoned 1
set serverror-quit 1
set max-queue-msg 300
set trigger-on-ignore 0
set exclusive-binds 0
set double-mode 1
set double-server 1
set double-help 1
set optimize-kicks 1
set stack-limit 4

#set sasl 0
#set sasl-mechanism 0
#set sasl-username "nickname"
#set sasl-password "password"

set account-notify 1
set extended-join 1

#### CTCP ####

loadmodule ctcp
set ctcp-mode 0

#### IRC ####

loadmodule irc
set bounce-bans 0
set bounce-exempts 0
set bounce-invites 0
set bounce-modes 0
set learn-users 0
set wait-split 600
set wait-info 180
set mode-buf-length 200
unbind msg - ident *msg:ident
unbind msg - addhost *msg:addhost
set opchars "@"
set no-chanrec-info 0

#### OPTIONAL MODULES ####

#loadmodule twitch
#loadmodule transfer
#loadmodule share
#loadmodule compress
#loadmodule filesys
#loadmodule seen
#loadmodule assoc
loadmodule notes
loadmodule uptime
#loadmodule ident

set notefile "windrop.notes"
set max-notes 50
set note-life 60
set allow-fwd 0
set notify-users 0
set notify-onjoin 1

loadmodule console
set console-autosave 1
set force-channel 0
set info-party 0

##### AUTOSCRIPTS #####

source scripts/autoscripts.tcl

##### TCL SCRIPTS #####

# HTTPS compatibility wrapper for Tcl 9 + TclTLS 2.0.
# Load this BEFORE any script using package http for HTTPS URLs.
#
# Expected portable CA bundle layout:
#   ssl/certs/cacert.pem
#
# Optional overrides before loading:
#   set ::httpscompat::debug 1
#   set ::httpscompat::cafile "ssl/certs/cacert.pem"
#   set ::httpscompat::selftest_host "google.com"
#
#source scripts/https_compat_tcl9.tcl

# Generic helper scripts shipped with Eggdrop / Windrop-style bundles.
source scripts/alltools.tcl
source scripts/action.fix.tcl
source scripts/dccwhois.tcl

# Example additional scripts:
# source scripts/script.tcl

##### SAFETY CHECKS #####

if {[file exists aclocal.m4]} {
    die {You are attempting to run Eggdrop from the source directory. Please run it from the installed tree.}
}

# Remove the upstream "bot won't start" placeholder line from sample configs
# before first production use, and review all remaining placeholders.
