eggdrop-1.10.0/0000775000175000017500000000000014703073435011336 5ustar geogeoeggdrop-1.10.0/misc/0000775000175000017500000000000014703073435012271 5ustar geogeoeggdrop-1.10.0/misc/releaseprep0000775000175000017500000001341614703073435014533 0ustar geogeo#! /bin/sh # # releaseprep - prepares the tree for release # # Copyright (C) 2004 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. show_usage() { echo "Usage: `basename $0` [-h|-r <#>]" echo "" echo " -h, --help - Print this help and exit." echo " -r, --rc - Prepare to release Release Candidate '#'." echo " -s --stable - Prepare to release stable release." exit 1 } regenerate_changelog() { EGGVERSION=$(grep AC_INIT configure.ac | sed -e 's/AC_INIT([^,]*,\[//' -e 's/\].*$//') EGG_RC=$(grep '^#define EGG_PATCH.*' src/version.h |cut -d " " -f 3|awk '{print tolower($0)}'|sed -e 's/^"//' -e 's/"$//') if ! [ $(echo $EGG_RC|grep ^rc) ]; then EGG_RC="" fi git=`which git` if test "x${git}" = "x"; then echo "Error: Could not locate \`git' program." exit 1 fi if [ ! -f .mailmap ]; then echo ".mailmap file missing- This is needed to properly run git log. Aborting." exit 1 fi TRIMVERSION=${EGGVERSION%rc*} MAX=$(echo ${EGGVERSION}| cut -d "." -f 3) MAJOR=$(echo ${EGGVERSION}| rev| cut -d "." -f2- |rev) MAJOR=${MAJOR%rc*} MINOR=0 while [ $MINOR -lt $MAX ]; do INCLUDE="${INCLUDE} -i v${MAJOR}.${MINOR}" MINOR=$(expr $MINOR + 1) done if git rev-parse -q --verify release/${TRIMVERSION} > /dev/null; then INCLUDE="${INCLUDE} -i ./release/${TRIMVERSION}" else INCLUDE="${INCLUDE} -i develop" fi git fetch origin git fetch -t origin echo "misc/genchanges -l $INCLUDE -r origin full > ChangeLog" misc/genchanges -l $INCLUDE -r origin full > ChangeLog gzip -f ChangeLog echo " done." #Generate doc/ChangesX.Y file echo "Now just the doc/ChangesX.Y file..." MINOR=0 INCLUDE="" while [ $MINOR -lt $MAX ]; do INCLUDE="${INCLUDE} -i v${MAJOR}.${MINOR}" MINOR=$(expr $MINOR + 1) done if git rev-parse -q --verify release/${TRIMVERSION} > /dev/null; then INCLUDE="${INCLUDE} -i ./release/${TRIMVERSION}" fi echo "misc/genchanges -l -e v1.8.4 -e v1.9.5 $INCLUDE -v ${EGGVERSION}${EGG_RC} -r origin short > doc/Changes1.10" misc/genchanges -l -e v1.8.4 -e v1.9.5 $INCLUDE -v ${EGGVERSION}${EGG_RC} -r origin short > doc/Changes1.10 git commit -m "Generate ChangeLog/Changes files for ${EGGVERSION}" > /dev/null if test -f ChangeLog.gz; then if test -s ChangeLog.gz; then if test -f ChangeLog.bak; then rm -f ChangeLog.bak fi else echo "Error: Generated ChangeLog file is empty." exit 1 fi else echo "Error: No ChangeLog file found." exit 1 fi git add ChangeLog.gz git add doc/Changes1.10 git commit -m "Generate ChangeLog/Changes files for ${EGGVERSION}${EGG_RC}" > /dev/null } change_default_make() { cat configure | sed 's/DEFAULT_MAKE="debug"/DEFAULT_MAKE="eggdrop"/g' > configure_ cat aclocal.m4 | sed 's/DEFAULT_MAKE="debug"/DEFAULT_MAKE="eggdrop"/g' > aclocal.m4_ mv configure_ configure mv aclocal.m4_ aclocal.m4 chmod +x configure } fix_version_h() { if test $do_rc -eq 1; then misc/setpatch RC${rc_number} >/dev/null else misc/setpatch none > /dev/null fi } create_default_makefile() { cat << '_EOF' > Makefile all: @echo "" @echo "Before you can compile your bot you have to configure it." @echo "Please start the configure script now:" @echo "" @echo " % ./configure" @echo "" _EOF } do_rc=0 if test "x${1}" = "x-h" || test "x${1}" = "x--help"; then show_usage elif test "x${1}" = "x-r" || test "x${1}" = "x--rc"; then do_rc=1 if test "x${2}" = "x"; then show_usage fi rc_number=$2 elif test "x${1}" = "x-s" || test "x${1}" = "x--stable"; then echo "About damn time" else echo "No args specified, use -h to view help" exit 1 fi if test ! -f src/main.c; then echo "You are not in the Eggdrop root directory." exit 1 fi # Update patch.h... echo -n "Updating version.h..." fix_version_h echo " done." # Generate ChangeLog file echo "Regenerating ChangeLog file..." regenerate_changelog echo "" # Change default make from "debug" to "eggdrop"... echo -n "Changing default make..." change_default_make echo " done." # Remove autom4te.cache dirs... echo -n "Removing autom4te.cache directories..." find ./ -type d -name "autom4te.cache" -print | xargs rm -rf echo " done." # Remove .gitignores. echo -n "Removing git files..." find ./ -name ".git .github .gitignore" -print | xargs rm -f echo " done." # Remove doc/web_docs/ and doc/html/chat/ if test -d ./doc/web_docs; then echo -n "Removing doc/web_docs/..." rm -rf doc/web_docs echo " done." fi if test -d ./doc/html/chat; then echo -n "Removing doc/html/chat/..." rm -rf doc/html/chat echo " done." fi # Generate fresh html/docs misc/generatedocs # make distclean echo "" echo "Running make distclean." sh configure >/dev/null && make distclean >/dev/null echo "" # Create Makefile. echo -n "Creating Makefile..." create_default_makefile echo " done." echo Current patch: `misc/setpatch -s` echo "Complete." echo "" eggdrop-1.10.0/misc/config.guess0000775000175000017500000014262014703073435014616 0ustar geogeo#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2023-07-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still # use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #else #include /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; sun4*:SunOS:*:*) case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case `/bin/arch` in sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ;; *:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __ARM_EABI__ #ifdef __ARM_PCS_VFP ABI=eabihf #else ABI=eabi #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; esac fi GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:cos:*:*) GUESS=$UNAME_MACHINE-unknown-cos ;; kvx:mbr:*:*) GUESS=$UNAME_MACHINE-unknown-mbr ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __i386__ ABI=x86 #else #ifdef __ILP32__ ABI=x32 #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in x86) CPU=i686 ;; x32) LIBCABI=${LIBC}x32 ;; esac fi GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. GUESS=i386-sequent-sysv4 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; ppc:Haiku:*:*) # Haiku running on Apple PowerPC GUESS=powerpc-apple-haiku ;; *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" < #include #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include #if defined(_SIZE_T_) || defined(SIGLOST) #include #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: eggdrop-1.10.0/misc/genchanges0000775000175000017500000004455114703073435014332 0ustar geogeo#! /usr/bin/env tclsh # # genchanges - Generate changelog (doc/Changes and ChangeLog) files. # # Copyright (C) 2017 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. package require Tcl 8.6 package require textutil::adjust package require base64 # TODO: automatic -i/-e arguments. sort order of git tag --list --sort=v:refname is stable. # TODO: performance improvements (by reading .git/ directly?) proc get_usage {} { return [subst [join { {Syntax: $::argv0 \[options\] } {} {Commands:} {short - Generate short changelog (doc/ChangesX.Y)} {full - Generate full changelog (ChangeLog)} {release - OVERWRITE ChangeLog and doc/ChangesX.Y (don't use, not done)} {} {Options (general):} {-d - Verbose debug logging} {-r - Specify remote for tags and public branches} {-l - Skip fetching from remote. ONLY use this on a fresh clone!} {} {Options (short):} {-e - Specify ref to exclude with ancestors} {-i - Specify ref to include with ancestors (use ./XXX to force local ref XXX, e.g. -i ./release/1.8.2} {-v - Specify the upcoming version} {} {Examples:} { Generate doc/Changes1.8 for v1.8.2rc3 (exclude v1.8.0 because of the static 1.8.0 blob):} { $::argv0 -e v1.6.21 -e v1.8.0 -i v1.8.1 -i v1.8.2 -i stable/1.8 -v 1.8.2rc3 short} { Generate ChangeLog for v1.8.3 final:} { $::argv0 -i stable/1.8 full} } \n]] } proc commands {} { lmap cmd [info commands cmd:*] { string range $cmd 4 end } } proc fatal {msg {showusage 0}} { if {$msg ne ""} { puts stderr $msg if {$showusage} { puts stderr "" } } if {$showusage} { puts stderr [get_usage] } exit 1 } proc pop {listVar} { upvar 1 $listVar list set e [lindex $list 0] set list [lrange $list 1 end] return $e } proc dict_lappend {dictVar args} { upvar 1 $dictVar dict set add [lindex $args end] set path [lrange $args 0 end-1] if {[dict exists $dict {*}$path]} { set old [dict get $dict {*}$path] } else { set old "" } dict set dict {*}$path [list {*}$old $add] } proc log {text} { puts stderr $text } proc vlog {text} { if {$::verbose} { log $text } } proc mustexec {cmd msg} { vlog "Attempting execute: [join $cmd]" if {[catch [list exec {*}$cmd] result]} { fatal "Execution failed. $msg: $result" } vlog "Execution successful: $result" set result [regsub -all -- {\n\n\n+} [string trim $result] "\n\n"] return $result } proc parsecmdline {argv} { global verbose local if {![llength $argv]} { fatal "" 1 } foreach var {remote command version includes excludes} { set $var "" } set verbose 0 set local 0 while {[llength $argv]} { set arg [pop argv] if {[string index $arg 0] eq "-"} { for {set i 1} {$i < [string length $arg]} {incr i} { set c [string index $arg $i] switch -exact -- $c { "l" { set local 1 } "r" { set remote [pop argv] } "d" { set verbose 1 } "v" { set version [pop argv] } "i" { lappend includes [pop argv] } "e" { lappend excludes [pop argv] } default { fatal "Unknown option: -$c" 1 } } vlog "OptParse: $c (left: $argv)" } } else { set command $arg break } } if {$command eq ""} { fatal "No command specified." 1 show_usage } if {![llength $includes]} { fatal "No -i includes specified." 1 } foreach var {remote version includes excludes} { cfg$var [set $var] } foreach file [textutil::adjust::listPredefined] { textutil::adjust::readPatterns [textutil::adjust::getPredefined $file] } fetchremote return $command } proc indent {text indent} { textutil::adjust::indent $text [string repeat " " $indent] } proc adjust {text {len 120}} { textutil::adjust::adjust $text -hyphenate true -justify left -length $len -strictlength true } interp alias {} cfgincludes {} cfgtags includes interp alias {} cfgexcludes {} cfgtags excludes proc cfgtags {varName patterns} { global remote tags upvar #0 $varName thesetags set thesetags "" if {![info exists tags]} { set taglist [regexp -all -inline -- {\S+} [mustexec {git tag --list} "Failed getting tag list"]] set tags "" foreach tag $taglist { set commit [string trim [mustexec [list git rev-parse $tag] "Could not rev-parse tag $tag"]] dict lappend tags $commit $tag vlog "$tag <- $commit" } } foreach pattern $patterns { set tmp [dict values $tags $pattern] if {![llength $tmp]} { # no matching tags, must be a branch if {[string range $pattern 0 1] eq "./"} { # force local branch, illegal branch name set path [string range $pattern 2 end] } else { set path $remote/$pattern } mustexec [list git rev-parse --verify -q $path] "Could not find revision '$path'." set tmp [list $path] } lappend thesetags {*}$tmp } } proc cfgversion {version} { global major if {$version ne "" && ![regexp {^(\d+\.\d+)\.\d+} $version -> major]} { fatal "Invalid version number: $version. Try 1.8.1 or 1.8.1rc1 or similar." } set ::version $version } proc cfgremote {remote} { set remotes [regexp -all -inline -- {\S+} [exec git remote]] if {![llength $remotes]} { fatal "No git remotes configured." exit 1 } if {$remote eq ""} { if {[llength $remotes] == 1} { set remote [lindex $remotes 0] } else { fatal "Multiple remotes available, must specify -r. Available: [join $remotes {, }]" } } if {[llength $remotes] == 1 && $remote eq ""} { set remote [lindex $remotes 0] } if {$remote ni $remotes} { fatal "Unknown remote: $remote. Available: [join $remotes {, }]" exit 1 } vlog "Remotes: '[join $remotes ',']'. Using '$remote'" set ::remote $remote } proc fetchremote {} { global remote local if {$local} { log "Operating locally only, skipping branches/tags-fetch." return } log "Updating tags and branches from remote '$remote'. Branches first..." mustexec [list -ignorestderr git fetch $remote] "Could not fetch from remote" log "Branches updated. Fetching tags..." mustexec [list -ignorestderr git fetch -t $remote] "Could not fetch tags from remote" log "Tags updated." } proc start {} { global remote set command [parsecmdline $::argv] if {$command ni [commands]} { fatal "Unknown command: $command. Available: [join [commands] {, }]" 1 } log "Working with remote $remote..." puts [cmd:$command] } proc revlist {excludes includes} { set includestr $includes set excludestr [lmap x $excludes { return -level 0 ^$x }] return [list {*}$includestr {*}$excludestr] } proc commitlist {{full 0}} { global version includes excludes verbose set commits "" for {set i 0} {$i < [llength $includes]} {incr i} { set cmd [list git rev-list --reverse --date-order {*}[revlist [expr {($i == 0 && $full) ? "" : $excludes}] [lrange $includes $i $i]]] set mycommits [mustexec $cmd "Failed to get revlist"] foreach commit $mycommits { dict set commits $commit 1 } } # exclude cherry-picked commits, assumes correct order, WIP, assumes chronic order of -i # --cherry-pick is only relevant when using symmetric difference which is A...B # the above method of gather commits by manually grabbing all EXCLUDE..INCLUDE does not use it for {set i 0} {$i < [llength $includes] - 1} {incr i} { for {set j [expr {1+$i}]} {$j < [llength $includes]} {incr j} { set i1 [lindex $includes $i] set i2 [lindex $includes $j] set cmd [list git rev-list --cherry-mark --no-merges --right-only --reverse --date-order $i1...$i2] set mycommits [mustexec $cmd "Failed to get revlist"] foreach commit $mycommits { if {[string index $commit 0] eq "=" && [dict exists $commits [string range $commit 1 end]]} { dict unset commits [string range $commit 1 end] } } } } return [lreverse [dict keys $commits]] } proc cmd:release {} { global major version if {![info exists major] || $version eq ""} { fatal "Need version number (-v) for short changelog." } if {![file exists ChangeLog.gz] || ![file exists doc/Changes$major]} { fatal "ChangeLog or doc/Changes$major don't exist, are we in the right directory? Then please create them empty if necessary." } set short [cmd:short] set full [cmd:full] log "Writing ChangeLog.gz" set fs [open ChangeLog.gz w] zlib push gzip $fs -level 9 puts $fs [string trim $full \n] close $fs log "Exiting, TODO: remove this when shortlog is done!" exit 0 log "Writing doc/Changes$major" set fs [open doc/Changes$major w] puts $fs [string trim $short \n] close $fs } proc clean {data} { regsub -all -- {(\r)} $data {} data regsub -all -- {\t} $data { } data regsub -all -- { +\n} $data "\n" data regsub -all -- {\n{4,}} $data "\n\n\n" data return $data } proc getcommitinfo:date {commit} { clock format [getcommitinfo:time $commit] -gmt 1 -format "%Y-%m-%d" } proc getcommitinfo:files {commit} { set data [mustexec [list git show --pretty= --numstat $commit] "Failed to get commit info for $commit"] set result "" foreach line [split $data \n] { if {$line eq ""} { continue } if {![regexp -- {^(\d+|-)\t(\d+|-)\t(.+)$} $line - add del file]} { error "ERROR ON '$line'" } if {$add eq "-" && $del eq "-"} { lappend result [format "%13s %s" (binary) $file] } else { lappend result [format "%6s %6s %s" +$add -$del $file] } } join $result \n } proc getcommitinfo:tags {commit} { global tags if {![dict exists $tags $commit]} { return "" } dict get $tags $commit } proc getcommitinfo:body {commit} { # roughly where we started using subject/body split messages after cvs->git if {[getcommitinfo:time $commit] > 1451487300} { return [getcommitinfofield body $commit] } return "" } proc getcommitinfo:subject {commit} { if {[getcommitinfo:time $commit] > 1451487300} { set msg [string trim [getcommitinfofield subject $commit]] if {[string index $msg 0] in {"*" "-"}} { set lines [lmap x [split $msg [string index $msg 0]] { set x [string totitle [string trim $x]]; expr {$x eq "" ? [continue] : "$x"} }] return [join $lines ". "] } return [getcommitinfofield subject $commit] } set msg [getcommitinfofield fullbody $commit] # yes, really (14c25840) set msg [string map {---------------------------------------------------------------------- ""} $msg] set lines [lmap l [split $msg \n] { expr {[set l [string trim $l]] eq "" ? [continue] : [string totitle "$l"]} }] if {![llength $lines]} { return "*** EMPTY COMMIT MESSAGE ***" } return [join $lines ". "] } proc getcommitinfo:fullbody {commit} { set msg [getcommitinfofield fullbody $commit] set msg [string trim $msg] if {[string index $msg 0] in {"*" "-"}} { set lines [lmap x [split $msg [string index $msg 0]] { set x [string trim $x]; expr {$x eq "" ? [continue] : "* $x"} }] return [join $lines \n] } return $msg } proc getcommitinfofield {field commit} { global commitinfocache commitinfofields # vlog "Getting $commit ($field)" if {![dict exists $commitinfocache $commit]} { set result [split [mustexec [list git show -s --pretty=format:[join [dict values $commitinfofields] %x00] $commit] "Failed to get commit info for $commit"] \x00] for {set i 0} {$i < [dict size $commitinfofields]} {incr i} { dict set commitinfocache $commit [lindex [dict keys $commitinfofields] $i] [string trim [lindex $result $i]] } dict set commitinfocache $commit filelist [split [mustexec [list git show --name-only --format= $commit] "Failed to get commit files for $commit"] \n] } regsub -all -- {\r\n?} [dict get $commitinfocache $commit $field] "\n" } set commitinfocache "" set commitinfofields {fullbody %B time %ct authorname %aN authoremail %aE shorthash %h hash %H authordate %aI subject %s body %b} foreach field [list {*}[dict keys $commitinfofields] filelist] { if {![llength [info commands getcommitinfo:$field]]} { interp alias {} getcommitinfo:$field {} getcommitinfofield $field } } proc getcommitinfo {commit args} { global commitinfocache commitinfofields set data "" foreach info $args { dict set data $info [getcommitinfo:$info $commit] } return $data } proc reportstatus {what i max} { if {($i & 0xF) == 0 || $i == $max - 1} { puts -nonewline stderr "\u001b\[1000D$what ... [format %3d [expr {$i == $max ? 100 : 100*(1+$i)/$max}]] %" } if {$i == $max - 1} { puts "" } } proc cmd:full {} { global excludes includes tags set commits [commitlist 1] set result {""} for {set i 0} {$i < [llength $commits]} {incr i} { reportstatus "Generating ChangeLog info" $i [llength $commits] set commit [lindex $commits $i] set commitinfo [getcommitinfo $commit body subject authorname authoremail shorthash authordate files] dict with commitinfo { set this "" lappend this "Commit $shorthash ($authordate) by $authorname <$authoremail>" "" if {[string index $subject 0] in {* -} && [string index $subject 1] eq " "} { set body [getcommitinfo:fullbody $commit] } elseif {$subject ne ""} { lappend this [adjust $subject] "" } if {$body ne ""} { set thisbody "" foreach line [split $body \n] { lappend thisbody [indent [adjust $line] 2] } lappend this [join $thisbody \n] "" } if {$files ne ""} { lappend this $files "" } } lappend result [join $this \n] } log "" return [clean [join $result \n[string repeat - 120]\n]] } proc dateindent {commits date} { set result "" for {set i 0} {$i < [llength $commits]} {incr i} { set msg [lindex $commits $i] if {$i == 0} { lappend result "$date $msg" } else { lappend result "[string repeat " " [string length $date]] $msg" } } return $result } proc versionindent {lines} { lmap l $lines { return -level 0 " $l" } } proc finalformatshortlog {commits} { set versionresult "" foreach version [lreverse [dict keys $commits]] { set versioncommits [dict get $commits $version] set dateresult "" foreach date [lreverse [dict keys $versioncommits]] { set datecommits [dict get $versioncommits $date] set byresult "" # force unattributed commits to come first # if {[dict exists $datecommits ""]} { # set unattrib [dict get $datecommits ""] # dict unset datecommits "" # dict set datecommits "" $unattrib # } # foreach by [lreverse [dict keys $datecommits]] {} foreach datecommit $datecommits { lassign $datecommit by bycommits set bycommits [list $bycommits] # set bycommits [lreverse [dict get $datecommits $by]] set this [lmap c $bycommits { set rest [lassign [split [adjust $c 100] \n] first] set rest [lmap r $rest { return -level 0 " $r" }] set rest [list "* $first" {*}$rest] if {$by ne ""} { lappend rest " \[$by\]" } join $rest \n }] if {$by ne ""} { # lappend this " $by" } lappend byresult $this } vlog "BYRESULT: $byresult" lappend dateresult "[join [dateindent [split [join [lmap x $byresult { join $x \n }] \n] \n] $date] \n]" } vlog "DATERESULT: $dateresult" lappend versionresult "[expr {$version ne "" ? "Eggdrop $version:" : ""}]\n\n[join [versionindent [split [join $dateresult \n] \n]] \n]" } join $versionresult \n\n } proc cmd:short {} { global version verbose tags major set commits [lreverse [commitlist]] if {$verbose} { vlog "--- Start of History ---" foreach commit $commits { vlog "* $commit[expr {[dict exists $tags $commit] ? " ([dict get $tags $commit])" : ""}]" } vlog "---- End of History ----" } foreach key {version date foundby patchby} { dict set last $key "" } set result "" set thisversion "" for {set i 0} {$i < [llength $commits]} {incr i} { reportstatus "Generating doc/Changes info" $i [llength $commits] set commit [lindex $commits $i] # skip merge commits unless they have a tag associated to them (e.g. v1.8.1 is a merge commit with a tag) if {![dict exists $tags $commit] && ![catch {exec git cat-file -t $commit^2}]} { continue } set commitinfo [getcommitinfo $commit fullbody subject date body filelist] set body [dict get $commitinfo body] set fullmsg [dict get $commitinfo fullbody] set shortmsg [dict get $commitinfo subject] set date [dict get $commitinfo date] set files [dict get $commitinfo filelist] set found "" set patch "" set newfiles "" foreach file $files { set fn [lindex [file split $file] end] if {$file in {src/patch.h src/version.h ChangeLog.gz ChangeLog} || [string match doc/Changes?.* $file] || $fn in {configure}} { continue } lappend newfiles $file } if {![dict exists $tags $commit] && [llength $files] && ![llength $newfiles]} { vlog "Skipping $commit ($files)" continue } # Subject can contain this information too, scan the whole body, then replace in subject foreach {- category names} [regexp -nocase -all -inline -- {(found|patch) by:([^\r\n/]+)} $fullmsg] { foreach nick [split $names {, }] { set nick [string trim $nick ""] if {$nick ne ""} { # dict to deduplicate dict set [string tolower $category] $nick 1 } } } # Only at the end regsub -all -nocase -- {(found|patch) by:.*$} $shortmsg {} shortmsg set by "" if {[dict size $found]} { lappend by "Found by: [join [dict keys $found] {, }]" } if {[dict size $patch]} { lappend by "Patch by: [join [dict keys $patch] {, }]" } set by [join $by { / }] # dict_lappend thisversion $date $by $shortmsg dict_lappend thisversion $date [list $by $shortmsg] if {[dict exists $tags $commit]} { # got version tag, everything up to here belongs to that version dict set result "[dict get $tags $commit] ($date)" $thisversion set thisversion "" } } log "" dict set result [expr {$version eq "" ? "" : "v$version"}] $thisversion set log [finalformatshortlog $result] return [clean "Eggdrop Changes (Last Updated [clock format [clock seconds] -gmt 1 -format "%Y-%m-%d"]):\n__________________________________________\n\n$log"] } start eggdrop-1.10.0/misc/newversion0000775000175000017500000001073614703073435014425 0ustar geogeo#! /bin/sh # # newversion - prepares the tree for a new version number in git # # Copyright (C) 2004 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. MOD_CONFIGURE_ACS="src/mod/compress.mod/configure.ac src/mod/dns.mod/configure.ac" DOCS="doc/sphinx_source/using/tcl-commands.rst \ doc/sphinx_source/using/text-sub.rst" fix_version_h() { sed -ie 's:^#define EGG_NUMVER.*$:#define EGG_NUMVER '${NEW_NUMVERSION}':' src/version.h sed -ie 's:^#define EGG_STRINGVER.*$:#define EGG_STRINGVER '\"${NEW_EGGVERSION}\"':' src/version.h } if test ! -f src/main.c; then echo "You are not in the Eggdrop root directory." exit 1 fi umask 022 OLD_EGGVERSION=$(grep AC_INIT configure.ac| sed -e 's/AC_INIT(\[Eggdrop\],\[//g' -e 's/\],\[bugs@eggheads.org\].*//g') #NEW_EGGVERSION=$(echo $OLD_EGGVERSION | cut -d. -f1-2).$(($(echo $OLD_EGGVERSION | cut -d. -f3) + 1)) NEW_EGGVERSION="1.10.0" NEW_NUMVERSION=$(($(grep '^#define EGG_NUMVER.*' src/version.h |cut -d " " -f 3|sed -e 's/..$/00/') + 100)) #NEW_NUMVERSION="1090000" #Remove existing staged files git reset HEAD -- . echo "" # Generate ChangeLog ###git log $(git rev-list -n 1 v${OLD_EGGVERSION})..HEAD --name-only --no-merges --pretty=format:"- - - - - - - - - - - - - - -%n%w(75)Commit %h (%ai) by %aN%n %s %n %b" > ChangeLog TRIMVERSION=${NEW_EGGVERSION%rc*} MAX=$(echo ${OLD_EGGVERSION}| cut -d "." -f 3) MAJOR=$(echo ${OLD_EGGVERSION}| rev| cut -d "." -f2- |rev) MAJOR=${MAJOR%rc*} MINOR=0 while [ $MINOR -le $MAX ]; do INCLUDE="${INCLUDE} -i v${MAJOR}.${MINOR}" MINOR=$(expr $MINOR + 1) done git fetch origin git fetch -t origin #echo "Running misc/genchanges -l $INCLUDE -i develop -r origin full > ChangeLog" #misc/genchanges -l $INCLUDE -i develop -r origin full > ChangeLog #gzip -f ChangeLog #git add ChangeLog.gz #Generate doc/ChangesX.Y file MINOR=1 INCLUDE="" while [ $MINOR -le $MAX ]; do INCLUDE="${INCLUDE} -i v${MAJOR}.${MINOR}" MINOR=$(expr $MINOR + 1) done #echo "Running misc/genchanges -l -e v1.6.21 -e v1.8.0 $INCLUDE -i develop -v ${MAJOR}.${MINOR}rc1 -r origin short > doc/Changes1.8" #misc/genchanges -l -e v1.6.21 -e v1.8.0 $INCLUDE -i develop -v ${MAJOR}.${MINOR}rc1 -r origin short > doc/Changes1.8 #git add doc/Changes1.8 #git commit -m "Generate ChangeLog/Changes files for ${NEW_EGGVERSION}" > /dev/null # Remove patchlevel. echo -n "Setting alpha patchlevel for a stable release..." misc/setpatch alpha >/dev/null echo " done." # Fix version.h. echo -n "Updating src/version.h..." fix_version_h echo " done." # Fix configure.ac's. echo -n "Fixing configure.ac files..." for i in $MOD_CONFIGURE_ACS configure.ac; do sed 's:'${OLD_EGGVERSION}':'${NEW_EGGVERSION}':g' $i > ${i}_ mv ${i}_ $i done echo " done." echo -n "Fixing docs..." sed -i 's:'${OLD_EGGVERSION}':'${NEW_EGGVERSION}':g' doc/sphinx_source/conf.py for i in $DOCS; do sed -i 's:'${OLD_EGGVERSION}':'${NEW_EGGVERSION}':g' $i done echo " done." git commit -am "Update version strings to ${NEW_EGGVERSION}" > /dev/null # Generate docs echo -n "Generating docs (be patient)..." misc/generatedocs > /dev/null 2>&1 git commit -am "Generate docs with ${NEW_EGGVERSION} version" > /dev/null echo " done." # Run autoconf echo -n "Running autoconf..." CURRENT_PWD=$PWD autoconf for i in $MOD_CONFIGURE_ACS; do cd ${CURRENT_PWD}/`dirname $i` && autoconf done cd $CURRENT_PWD git commit -am "Run autoconf" > /dev/null echo " done." echo "" echo "" echo "Summary:" echo "--------" echo "" echo "version.h:" grep "^#define.*" src/version.h echo "" echo "Docs version string:" grep "^version = .*" doc/sphinx_source/conf.py echo "" echo "Complete." echo "" eggdrop-1.10.0/misc/install-sh0000775000175000017500000001273614703073435014306 0ustar geogeo#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 eggdrop-1.10.0/misc/config.sub0000775000175000017500000010470714703073435014265 0ustar geogeo#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2023 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2023-07-31' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x$basic_os != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os in linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \ | linux-musl* | linux-relibc* | linux-uclibc* | linux-mlibc* ) ;; uclinux-uclibc* ) ;; managarm-mlibc* | managarm-kernel* ) ;; windows*-gnu* | windows*-msvc*) ;; -dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* | -mlibc* ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel* ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel* ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; *-msvc* ) echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; vxworks-simlinux | vxworks-simwindows | vxworks-spe) ;; nto-qnx*) ;; os2-emx) ;; *-eabi* | *-gnueabi*) ;; none-coff* | none-elf*) # None (no kernel, i.e. freestanding / bare metal), # can be paired with an output format "OS" ;; -*) # Blank kernel with real OS is always fine. ;; *-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: eggdrop-1.10.0/misc/setpatch0000775000175000017500000000726314703073435014042 0ustar geogeo#! /bin/bash # # addpatch - generates src/version.h # # Copyright (C) 2002 - 2024 Eggheads Development Team # Copyright (C) 2000 Fabian Knittel # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. show_usage() { echo "Usage: `basename $0` [-hs] " echo "" echo " patchname - Name of patch to add." echo " * Use 'none' as patchname to remove existing patch" echo "" echo " -h, --help - Print this help and exit." echo " -s, --show - Print current patch name and exit." exit 1 } if test "x${1}" = "x" || test "x${1}" = "x-h" || test "x${1}" = "x--help"; then show_usage else patch_name=$1 fi if test ! -f src/main.c; then echo "You are not in the Eggdrop root directory." exit 1 fi oldpatch_name=$(grep -E '^#define EGG_PATCH.*' src/version.h|cut -d "\"" -f 2 ) if test "x${oldpatch_name}" = "x"; then oldpatch_name='stable' fi if test "x${1}" = "x-s" || test "x${1}" = "x--show"; then echo ${oldpatch_name} exit fi stringver=$(grep -E '^#define EGG_STRINGVER.*' src/version.h|cut -d "\"" -f 2) old_numver=$(grep -E '^#define EGG_NUMVER.*' src/version.h|cut -d " " -f 3) foo=${old_numver: -2} if [ $foo -lt 99 ]; then new_numver=$((old_numver + 1)) else echo "Patch level has exceeded 99- you *really* need to release a new version." exit fi echo "Current version: ${stringver}" echo "Current numerical version: ${old_numver}" echo "Current patch: ${oldpatch_name}" echo "" echo "New numerical version ${new_numver}" echo "New patch: ${patch_name}" cat < src/version.h /* * version.h * include file controlling version strings used by Eggdrop * * should contain something similar to only the following 3 lines: * #define EGG_STRINGVER "1.8.0" * #define EGG_NUMVER 1080000 * #define EGG_PATCH "patchstring" */ /* * Copyright (C) 1997 Robey Pointer * Copyright (C) 1999 - 2024 Eggheads Development Team * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ EOS echo "#define EGG_STRINGVER \"$stringver\"" >> src/version.h echo "#define EGG_NUMVER $new_numver" >> src/version.h if [ $patch_name != "none" ]; then echo "#define EGG_PATCH \"$patch_name\"" >> src/version.h fi eggdrop-1.10.0/misc/getcommit0000775000175000017500000000254614703073435014216 0ustar geogeo#! /bin/sh # # getcommit - get a descriptive commit name (git) # # Copyright (C) 2015 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. command -v git >/dev/null 2>&1 HASGIT=$? VER=`git describe --always 2>/dev/null` if [ $? -ne 0 -o $HASGIT -ne 0 -o "x$VER" = "x" ]; then if [ -r src/version.h ]; then VER=$(misc/setpatch -s 2>/dev/null) if [ $? -ne 0 -o "x$VER" = "x" ]; then VER="unknown" fi fi fi echo -n $VER eggdrop-1.10.0/misc/makedepend0000775000175000017500000000700314703073435014314 0ustar geogeo#! /bin/sh # # makedepend - updates Makefile dependencies throughout the tree # # Copyright (C) 2004 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. show_usage() { echo "Usage: `basename $0` [-h|-f]" echo "" echo " -h, --help - Print this help and exit." echo " -n, --nocleanup - Don't run 'make distclean' when finished." echo " -f, --force - Continue even if 'make depend' fails." exit 1 } update_makefile() { if test ! -f ${1}/.depend; then echo "Warning: no .depend found in ${1}/; skipping." elif ! grep '#safety hash' >/dev/null 2>/dev/null ${1}/${2}; then echo "Warning: no '#safety hash' found in ${1}/${2}; skipping." else sed '/#safety hash/,$d' < ${1}/$2 > ${1}/${2}_ echo "#safety hash" >> ${1}/${2}_ cat ${1}/.depend >> ${1}/${2}_ mv ${1}/${2}_ ${1}/${2} echo "Updated ${1}/${2}." fi } update_disabled() { cd ./src/mod/${1}.mod/ && make 'CC=gcc' \ 'CFLAGS = -I. -I../../.. -I../../../src/mod -DMAKING_DEPEND -DHAVE_CONFIG_H -DMAKING_MODS' depend if test ! $? = 0; then echo "Error: 'make depend' failed in ./src/mod/${1}.mod/." >&2 echo "" >&2 test $use_force = 1 || exit 1 fi cd $CURRENT_PWD } if test ! -f src/main.c; then echo "You are not in the Eggdrop root directory." exit 1 fi use_force=0 no_cleanup=0 for arg in $@; do if test "x${arg}" = "x-h" || test "x${arg}" = "x--help"; then show_usage fi if test "x${arg}" = "x-f" || test "x${arg}" = "x--force"; then use_force=1 fi if test "x${arg}" = "x-n" || test "x${arg}" = "x--nocleanup"; then no_cleanup=1 fi done echo "" echo -n "Running 'make distclean'..." make distclean >/dev/null 2>/dev/null echo " done." echo -n "Running configure..." sh configure >/dev/null 2>/dev/null && make config >/dev/null 2>/dev/null echo " done." echo "" echo "Running 'make depend'..." echo "" make depend if test ! $? = 0; then echo "Error: 'make depend' failed." >&2 echo "" >&2 test $use_force = 1 || exit 1 fi echo "" echo "Running 'make depend' for disabled modules..." echo "" DISABLED_MODULES=$(cat disabled_modules | grep '^[a-z]') CURRENT_PWD=$(pwd) for i in ${DISABLED_MODULES}; do update_disabled $i done echo "" echo "Updating Makefiles and Makefile.ins..." echo "" for i in $(find ./src/ -name "Makefile.in" -exec dirname '{}' ';' | grep -v '^\./src/mod$'); do update_makefile $i "Makefile.in" done for i in $(find ./src/ -name "Makefile" -exec dirname '{}' ';' | grep -v '^\./src/mod$'); do update_makefile $i "Makefile" done if test $no_cleanup = 0; then echo "" echo -n "Running 'make distclean'..." make distclean >/dev/null echo " done." fi echo "" echo "Complete." echo "" eggdrop-1.10.0/misc/docsfilter.py0000664000175000017500000000054514703073435015005 0ustar geogeo#!/usr/bin/env python from panflute import * def upper(elem, doc): if isinstance(elem, Str): elem.text = elem.text.upper() def action(elem, doc): if isinstance(elem, Header): if elem.level == 2: return elem.walk(upper) def main(doc=None): return run_filter(action, doc=doc) if __name__ == "__main__": main() eggdrop-1.10.0/misc/updatecopyright0000775000175000017500000000561714703073435015443 0ustar geogeo#! /bin/sh # # updatecopyright - updates copyright in files # # Copyright (C) 2005 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Brackets as a cheap way to not find self PATTERN="copyright.*eggheads developmen[t]" find_copyright_files() { grep -lri -- "$PATTERN" * } update_copyright() { LINE=`grep -i -- "$PATTERN" $1` # Format 1 grep -Ei 'copyright.*[0-9]{4} ?- ?[0-9]{4}.*eggheads' $i 2>&1 >/dev/null if [ $? -eq 0 ]; then echo "Format 1" sed -e 's/\(copyright[^\n0-9]*[0-9][0-9][0-9][0-9] *- *\)[0-9][0-9][0-9][0-9]\( eggheads\)/\1'"$YEAR"'\2/ig' $i > ${i}_ chmod --reference=$i ${i}_ mv ${i}_ $i fi # Format 2 grep -Ei 'copyright[^-]*[0-9]{4}[^-]*eggheads' $i 2>&1 >/dev/null if [ $? -eq 0 ]; then echo "Format 2" sed -e 's/\(copyright[^\s0-9-]*[0-9][0-9][0-9][0-9]\)\( eggheads\)/\1 - '"$YEAR"'\2/ig' $i > ${i}_ chmod --reference=$i ${i}_ mv ${i}_ $i fi # Cats and Dogs sed -i '/Eggdrop v" EGG_STRINGVER " (C) 1997 Robey Pointer (C) 1999-/c\ "Eggdrop v" EGG_STRINGVER " (C) 1997 Robey Pointer (C) 1999-'$YEAR' Eggheads Development Team",' src/main.c sed -i '/Eggdrop v" EGG_STRINGVER "+" EGG_PATCH " (C) 1997 Robey Pointer (C) 1999-/c\ "Eggdrop v" EGG_STRINGVER "+" EGG_PATCH " (C) 1997 Robey Pointer (C) 1999-'$YEAR' Eggheads Development Team",' src/main.c } if test ! -f src/main.c; then echo "You are not in the Eggdrop root directory." exit 1 fi if test "x$1" = "x"; then echo "Usage: $0 " exit 1 fi YEAR=$1 if test $YEAR -lt 2015 -o $YEAR -gt 2030; then echo "Invalid year. Usage: $0 " exit 1 fi count=0 echo "Updating documentation copyright..." sed -i "s/^copyright = .*/copyright = u'$YEAR, Eggheads'/" doc/sphinx_source/conf.py sed -i "s/^copyright = .*/copyright = u'$YEAR, Eggheads'/" doc/sphinx_source/firstinstall/conf.py ./misc/generatedocs for i in $(find_copyright_files); do count=$(($count + 1)) echo "${i}... " update_copyright $i $YEAR echo "done." done echo "Found/fixed ${count} files." eggdrop-1.10.0/misc/commit.template0000664000175000017500000000023014703073435015311 0ustar geogeo# One-line summary, e.g. Fix foobar-variable not being set correctly. Fixes #123. # Longer summary, line wrap at 72. # Found by: Foo # Patch by: Bar eggdrop-1.10.0/misc/mkinstalldirs0000775000175000017500000000122714703073435015101 0ustar geogeo#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here eggdrop-1.10.0/misc/killwhitespace0000775000175000017500000000304414703073435015230 0ustar geogeo#! /bin/sh # # killwhitespace - removes trailing whitespace from source files # # Copyright (C) 2005 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. find_whitespace_files() { grep -rE '[[:space:]]+$' . | sed 's/:.*//' | grep '\.[ch]$' | sort | uniq } if test ! -f src/main.c; then echo "You are not in the Eggdrop root directory." exit 1 fi echo -n "Running 'make clean'... " make clean >/dev/null 2>&1 echo "done." count=0 for i in $(find_whitespace_files); do count=$(($count + 1)) echo -n "${i}... " sed -e 's:[ \t]*$::g' $i > ${i}_ mv ${i}_ $i echo "done." done echo "Found/fixed ${count} files." eggdrop-1.10.0/misc/generatedocs0000775000175000017500000001311114703073435014657 0ustar geogeo#! /bin/bash # # generateDocs - creates HTML and plaintext documentation from # reStructuredText format files. -Geo # # # Copyright (C) 2004 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. show_usage() { echo "Usage: `basename $0` [-v version]" echo "" echo " -h, --help - Print this help and exit." echo " -v, --ver - Update document version string." exit 1 } do_ver=0 if test "x${1}" = "x-v" || test "x${1}" = "x--ver"; then do_ver=1 if test "x${2}" = "x"; then show_usage fi ver=$2 fi BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "*** Searching for pandoc..." PANDOC="$(which pandoc)" if [ $? -eq 0 ]; then echo "Found." else echo "Not found. Pandoc can be found at pandoc.org or via apt-get install pandoc. Exiting..." exit 1 fi echo "*** Searching for panflute..." PANDOC="$(pip3 show panflute)" if [ $? -eq 0 ]; then echo "Found." else echo "Not found. Panflute can be installed via pip3 install panflute. Exiting..." exit 1 fi echo "*** Searching for sphinx-build..." SPHINX="$(which sphinx-build)" if [ $? -eq 0 ]; then echo "Found." else echo "Not found. Sphinx can be found at https://www.sphinx-doc.org or via apt-get install python-sphinx. Exiting..." exit 1 fi if [ $do_ver -eq 1 ]; then echo "*** Updating docs to version ${ver}..." sed -e "s:version = '.*':version = '${ver}':" \ -e "s:release = '.*':release = '${ver}'": doc/sphinx_source/conf.py > doc/sphinx_source/conf.py_ if grep "version = '${ver}'" doc/sphinx_source/conf.py_ && grep "release = '${ver}'" doc/sphinx_source/conf.py_; then mv doc/sphinx_source/conf.py_ doc/sphinx_source/conf.py echo "Updated." else echo "Documentation version update failed. Aborting..." exit 1 fi fi mkdir -p tmpdocs echo "*** Generating plaintext docs..." for i in $( find $BASEDIR/../doc/sphinx_source/ -type f -name "*.rst" ); do FILENAME=$(basename "$i") FILENAME="${FILENAME%.*}" echo $FILENAME pandoc -f rst -t plain --filter ./misc/docsfilter.py -o tmpdocs/$FILENAME.txt $i done echo "*** Generating HTML files..." ( cd $BASEDIR/../doc/sphinx_source/ && make -B html ) echo "*** Stupid housecleaning..." mv tmpdocs/about.txt $BASEDIR/../doc/ABOUT mv tmpdocs/legal.txt $BASEDIR/../doc/LEGAL mv tmpdocs/install.txt $BASEDIR/../INSTALL mv tmpdocs/readme.txt $BASEDIR/../README mv tmpdocs/upgrading.txt $BASEDIR/../UPGRADING mv tmpdocs/included.txt $BASEDIR/../doc/modules/MODULES mv tmpdocs/writing.txt $BASEDIR/../doc/modules/writing-modules mv tmpdocs/assoc.txt $BASEDIR/../doc/modules/mod.assoc mv tmpdocs/blowfish.txt $BASEDIR/../doc/modules/mod.blowfish mv tmpdocs/channels.txt $BASEDIR/../doc/modules/mod.channels mv tmpdocs/compress.txt $BASEDIR/../doc/modules/mod.compress mv tmpdocs/console.txt $BASEDIR/../doc/modules/mod.console mv tmpdocs/ctcp.txt $BASEDIR/../doc/modules/mod.ctcp mv tmpdocs/dns.txt $BASEDIR/../doc/modules/mod.dns mv tmpdocs/filesys.txt $BASEDIR/../doc/modules/mod.filesys mv tmpdocs/ident.txt $BASEDIR/../doc/modules/mod.ident mv tmpdocs/irc.txt $BASEDIR/../doc/modules/mod.irc mv tmpdocs/notes.txt $BASEDIR/../doc/modules/mod.notes mv tmpdocs/pbkdf2.txt $BASEDIR/../doc/modules/mod.pbkdf2 mv tmpdocs/python.txt $BASEDIR/../doc/modules/mod.python mv tmpdocs/seen.txt $BASEDIR/../doc/modules/mod.seen mv tmpdocs/server.txt $BASEDIR/../doc/modules/mod.server mv tmpdocs/share.txt $BASEDIR/../doc/modules/mod.share mv tmpdocs/transfer.txt $BASEDIR/../doc/modules/mod.transfer mv tmpdocs/twitch.txt $BASEDIR/../doc/modules/mod.twitch mv tmpdocs/uptime.txt $BASEDIR/../doc/modules/mod.uptime mv tmpdocs/woobie.txt $BASEDIR/../doc/modules/mod.woobie mv tmpdocs/firstscript.txt $BASEDIR/../doc/FIRST-SCRIPT mv tmpdocs/bans.txt $BASEDIR/../doc/BANS mv tmpdocs/botnet.txt $BASEDIR/../doc/BOTNET mv tmpdocs/core.txt $BASEDIR/../doc/core.settings mv tmpdocs/features.txt $BASEDIR/../FEATURES mv tmpdocs/ipv6.txt $BASEDIR/../doc/IPV6 mv tmpdocs/ircv3.txt $BASEDIR/../doc/IRCv3 mv tmpdocs/partyline.txt $BASEDIR/../doc/PARTYLINE mv tmpdocs/patch.txt $BASEDIR/../doc/PATCH-HOWTO mv tmpdocs/pbkdf2info.txt $BASEDIR/../doc/PBKDF2 mv tmpdocs/tcl-commands.txt $BASEDIR/../doc/tcl-commands.doc mv tmpdocs/twitch-tcl-commands.txt $BASEDIR/../doc/twitch-tcl-commands.doc mv tmpdocs/tls.txt $BASEDIR/../doc/TLS mv tmpdocs/tricks.txt $BASEDIR/../doc/TRICKS mv tmpdocs/twitchinfo.txt $BASEDIR/../doc/TWITCH mv tmpdocs/users.txt $BASEDIR/../doc/USERS mv tmpdocs/accounts.txt $BASEDIR/../doc/ACCOUNTS mv tmpdocs/autoscripts.txt $BASEDIR/../doc/AUTOSCRIPTS rm -rf tmpdocs rm -rf $BASEDIR/../doc/html/_sources rm -rf $BASEDIR/../doc/doctrees/ rm -rf $BASEDIR/../doc/html/.buildinfo echo "Yahtzee!" eggdrop-1.10.0/misc/runautotools0000775000175000017500000000504614703073435015002 0ustar geogeo#! /bin/sh # # runautotools - # # Copyright (C) 2004 - 2024 Eggheads Development Team # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. REQUIRED_AUTOCONF_VERSION=2.71 show_usage() { echo "Usage: `basename $0` [-h|-v]" echo " -h, --help - Print this help and exit." echo " -f, --force - Skip the autoconf version check (do not commit generated files with this)." exit 0 } if test ! -f src/main.c; then echo "You are not in the Eggdrop root directory." exit 1 fi if test "x${1}" = "x-h" || test "x${1}" = "x--help"; then show_usage fi FORCE=0 if test "x${1}" = "x-f" || test "x${1}" = "x--force"; then FORCE=1 fi # All developers should use the same autotools version to avoid unnecessary back/forth changes in configure scripts echo "Checking autotools version..." AUTOCONFVERSION=$(autoconf --version | head -n 1 | awk '{print $NF}') if test $FORCE -eq 0 && test "x$AUTOCONFVERSION" != "x$REQUIRED_AUTOCONF_VERSION"; then echo "Refusing to run autotools with mismatching version, required is $REQUIRED_AUTOCONF_VERSION, you have $AUTOCONFVERSION. Adjust requirement in misc/runautotools if this is intentional" exit 1 fi echo "Running autotools in root directory..." # Necessary to regenerate misc/getcommit revision info touch -c configure.ac autoconf autoheader CURRENT_PWD=$PWD for i in $(find ./src/mod -name "configure.ac" -exec dirname '{}' ';'); do cd $i && touch -c configure.ac && autoconf echo "Running autoconf in $i..." cd $CURRENT_PWD done for i in $(find ./src/mod -name "config.h.in" -exec dirname '{}' ';'); do cd $i && autoheader echo "Running autoheader in $i..." cd $CURRENT_PWD done echo "" echo "Complete." eggdrop-1.10.0/misc/modconfig0000775000175000017500000004165214703073435014174 0ustar geogeo#! /bin/sh # # modconfig # # Copyright (C) 2000 - 2024 Eggheads Development Team # Written by Fabian Knittel # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. mc_pn=`echo $0 | sed -e 's/^.*\///'` mc_top_srcdir= mc_srcdir= mc_bindir=. mc_flag_quiet=no mc_flag_onlynew=no # Read options while true; do case ${1} in --top_srcdir=*) mc_top_srcdir=`echo ${1} | sed -e 's/^--top_srcdir=//'` ;; --top_srcdir) shift mc_top_srcdir=${1} ;; --srcdir=*) mc_srcdir=`echo ${1} | sed -e 's/^--srcdir=//'` ;; --srcdir) shift mc_srcdir=${1} ;; --bindir=*) mc_bindir=`echo ${1} | sed -e 's/^--bindir=//'` ;; --bindir) shift mc_bindir=${1} ;; --quiet|-q) mc_flag_quiet=yes ;; --only-new|-n) mc_flag_onlynew=yes ;; --*) echo "${mc_pn}: warning: unknown option \`${1}'." 2>&1 ;; *) # Non-option parameter. break ;; esac # Break out of loop if there are no more arguments to process. if shift; then : else break; fi done # Find srcdir and top_srcdir if test "x${mc_srcdir}" = x; then if test "x${mc_top_srcdir}" != x; then mc_srcdir=${mc_top_srcdir}/src else echo "${mc_pn}: error: could not find src directory." 2>&1 exit 1 fi fi if test "x${mc_top_srcdir}" = x; then if test "x${mc_srcdir}" != x; then mc_top_srcdir=${mc_srcdir}/.. else echo "${mc_pn}: error: could not find top src directory." 2>&1 exit 1 fi fi # # Files # # List of all selected modules (including the `.mod' at the end) mc_fmodules=${mc_bindir}/.modules # List of all modules we have detected so far. mc_fknownmods=${mc_bindir}/.known_modules # List of modules disabled by default mc_fdisabledmods=${mc_top_srcdir}/disabled_modules mc_mod_dir=${mc_srcdir}/mod mc_mod_bin_dir=${mc_bindir}/src/mod mc_fMakefile=${mc_mod_bin_dir}/Makefile mc_fstatic_h=${mc_mod_dir}/static.h # File descriptor usage: # 1 Standard output # 2 Errors # # 6 Misc messages and warnings # 7 Goes to /dev/null exec 7>/dev/null if test "${mc_flag_quiet}" = yes; then exec 6>&7 else exec 6>&1 fi # Detect flags needed to achieve 'echo -n' (originally from GNU autoconf) ... if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null then mc_n= mc_c=' ' mc_t=' ' else mc_n=-n mc_c= mc_t= fi else mc_n= mc_c='\c' mc_t= fi # This helps us call ourself. mc_self_call="$0 --srcdir=${mc_srcdir} --top_srcdir=${mc_topsrcdir}" # Assign parameters mc_cmd=$1 if test "x${mc_cmd}" != x; then shift mc_paras=$* fi case x${mc_cmd} in xhelp) # # Display help # cat 1>&6 <&6 # Check whether all known mods still exist for mc_mod in ${mc_known_mods}; do echo ${mc_n} ".${mc_c}" >&6 if test ! -d ${mc_mod_dir}/${mc_mod}; then grep -v "^${mc_mod}$" ${mc_fknownmods} > ${mc_fknownmods}_new mv ${mc_fknownmods}_new ${mc_fknownmods} fi done echo " done." 1>&6 fi ;; xdetect-modules) # # Detect modules. Active modules will be added to the `.modules' file. The # behaviour changes as soon as `.modules' already exists. # echo ${mc_n} "Detecting modules...${mc_c}" >&6 if ${mc_self_call} -q is-configured; then mc_mods_configured=yes mv ${mc_fmodules} ${mc_fmodules}_old mc_fmodules_old=${mc_fmodules} mc_fmodules=${mc_fmodules}_old else mc_mods_configured=no mc_fmodules_old= fi mc_mods=`echo ${mc_srcdir}/mod/*.mod | sed -e 's/\.mod//g'` if test "${mc_mods}" = "${mc_srcdir}/mod/*"; then echo "${mc_pn}: error: no modules detected." >&2 exit 1 fi # Add them again. mc_mods=`echo ${mc_mods} | sed -e 's/\.mod//g'` for mc_mod in ${mc_mods}; do mc_mod=`echo ${mc_mod} | sed -e 's/.*\///g'` mc_new_mod_state=disabled echo ${mc_n} ".${mc_c}" >&6 # Do we have an existing configuration? if (test "${mc_mods_configured}" = yes); then # Is the module active? if (grep "^${mc_mod}\.mod\$" ${mc_fmodules} 1>&7 2>&1) then mc_new_mod_state=enabled else # Was it configured before? if (grep "^${mc_mod}\.mod\$" ${mc_fknownmods} 1>&7 2>&1); then : else mc_new_mod_state=enabled fi fi else if (sed s/\ //g ${mc_fdisabledmods} 2>&1 | grep "^${mc_mod}\$" 1>&7 2>&1) then : else mc_new_mod_state=enabled fi fi if test "${mc_new_mod_state}" = enabled && test -n "`find $mc_mod_bin_dir/${mc_mod}.mod -name \*.c`"; then ${mc_self_call} -q add ${mc_mod} else ${mc_self_call} -q del ${mc_mod} fi done if test "x${mc_fmodules_old}" != x; then # mc_fmodules actually points to the .modules_old file. rm -f ${mc_fmodules} touch ${mc_fmodules_old} fi echo " done." >&6 ;; xMakefile) # # Build `src/mod/Makefile' # echo ${mc_n} "Building ${mc_fMakefile}... ${mc_c}" 1>&6 # Check for selected modules if test -r ${mc_fmodules}; then # Convert newlines to spaces. mc_sel_modules=`cat ${mc_fmodules} | \ awk '{ printf("%s ", $0); }'` else echo "${mc_pn}: error: no modules selected. You did not run \`make config' yet." 1>&2; exit 1 fi mc_mod_objs=`echo ${mc_sel_modules} | sed -e 's/\.mod/.mod_o/g'` mc_mod_libs=`echo ${mc_sel_modules} | sed -e 's/\.mod/.mod_so/g'` if test ! -f ${mc_fMakefile}; then echo "failed." 1>&6 echo "${mc_pn}: error: make file template not found." 1>&2 exit 1 fi # The following sed expression modifies src/mod/Makefile to # hold the new module names. if (cat "${mc_fMakefile}" | \ sed -e "s/^\(mods =\).*$/\1 ${mc_sel_modules}/g" \ -e "s/^\(mod_objs =\).*$/\1 ${mc_mod_objs}/g" \ -e "s/^\(mod_libs =\).*$/\1 ${mc_mod_libs}/g" \ 1> "${mc_fMakefile}_new"); then mv "${mc_fMakefile}_new" "${mc_fMakefile}" else echo "failed." 1>&6 echo "${mc_pn}: sed failed to build ${mc_fMakefile}." 1>&2 exit 1 fi echo "done." 1>&6 ;; xstatic.h) # # Build `static.h' # echo ${mc_n} "Building static.h..." 1>&6 # Check for selected modules if test ! -r ${mc_fmodules}; then echo " failed." 1>&6 echo "${mc_pn}: error: no modules selected. You did not run \`make config' yet." 1>&2; exit 1 fi mc_sel_modules=`cat ${mc_fmodules} | sed -e 's/\.mod//g'` # Note: All data is written to `src/mod/static.h' which is # later included into `src/main.c'. # Remove old static.h rm -f ${mc_fstatic_h} # Header cat 1>> ${mc_fstatic_h} << EOF /* src/mod/static.h -- header file for static compiles. * * NOTE: Do not edit directly. Instead, re-run \`make config'. */ #ifndef _EGG_MOD_STATIC_H #define _EGG_MOD_STATIC_H EOF # Create declarations for module _start functions for mc_mod in ${mc_sel_modules}; do echo ${mc_n} ".${mc_c}" 1>&6 echo "char *${mc_mod}_start();" 1>> ${mc_fstatic_h} done echo 1>> ${mc_fstatic_h} # The link_statics() function ... echo "static void link_statics()" 1>> ${mc_fstatic_h} echo "{" 1>> ${mc_fstatic_h} for mc_mod in ${mc_sel_modules}; do echo " check_static(\"${mc_mod}\", ${mc_mod}_start);" 1>> ${mc_fstatic_h} done cat 1>> ${mc_fstatic_h} << EOF } #endif /* _EGG_MOD_STATIC_H */ EOF echo " done." 1>&6 ;; xdel) # # Remove a module from the list # if test "x${mc_paras}" = x; then echo "${mc_pn}: error: no modules specified." 2>&1 exit 1 fi mc_nfmodules="${mc_fmodules}_new" # Remove trailing `.mod' mc_mods=`echo ${mc_paras} | sed -e 's/\.mod//g'` for mc_mod in ${mc_mods}; do # Remove any path information mc_mod=`echo ${mc_mod} | sed -e 's/.*\///'` echo "${mc_pn}: disabling eggdrop module: ${mc_mod}" 1>&6 # Add module to the list of known modules. if grep "^${mc_mod}\.mod$" ${mc_fknownmods} 1>&7 2>&7; then if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then grep -v "^${mc_mod}\.mod$" ${mc_fknownmods} \ > ${mc_fknownmods}_new mv ${mc_fknownmods}_new ${mc_fknownmods} fi else if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then : else echo ${mc_mod}.mod 1>> ${mc_fknownmods} fi fi # In case there are any active modules ... if test -r ${mc_fmodules}; then # Remove module from list of active modules. if grep -v "^${mc_mod}\.mod$" ${mc_fmodules} \ 1> ${mc_nfmodules} then : else echo "${mc_pn}: error: building new module file failed" 1>&2 echo "Grepping for ${mc_mod}.mod in ${mc_fmodules} and writing to ${mc_nfmodules}." kill -STOP $$ exit 1 fi mv ${mc_nfmodules} ${mc_fmodules} fi done ;; xadd) # # Add a module to the list # if test "x${mc_paras}" = x; then echo "${mc_pn}: error: no modules specified." 2>&1 exit 1 fi # Remove trailing `.mod' mc_mods=`echo ${mc_paras} | sed -e 's/\.mod//g'` for mc_mod in ${mc_mods}; do # Remove any path information mc_mod=`echo ${mc_mod} | sed -e 's/.*\///'` # Add module to the list of known modules. if grep "^${mc_mod}\.mod$" ${mc_fknownmods} 1>&7 2>&7; then if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then grep -v "^${mc_mod}\.mod$" ${mc_fknownmods} \ > ${mc_fknownmods}_new mv ${mc_fknownmods}_new ${mc_fknownmods} fi else if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then : else echo ${mc_mod}.mod 1>> ${mc_fknownmods} fi fi # Add module to the list of active modules. if grep "^${mc_mod}\.mod$" ${mc_fmodules} 1>&7 2>&7; then : else if test ! -d ${mc_mod_dir}/${mc_mod}.mod; then echo "${mc_pn}: warning: module does not exist: \`${mc_mod}', ignoring." 1>&2 else echo "${mc_pn}: enabling eggdrop module: ${mc_mod}" 1>&6 # Add it to the file echo ${mc_mod}.mod 1>> ${mc_fmodules} fi fi done ;; xclear) # # Clear list of modules # echo "${mc_pn}: cleared list of eggdrop modules." 1>&6 rm -f ${mc_fmodules} touch ${mc_fmodules} ;; xupdate-depends) # # Check the dependencies and add modules which are depended on, but # aren't enabled. # mc_all_depends= mc_missing= echo ${mc_n} "Calculating dependencies...${mc_c}" 1>&6 # Check for selected modules if test ! -r ${mc_fmodules}; then echo " failed." 1>&6 echo "${mc_pn}: error: no modules selected. You did not run configure yet." 1>&2 exit 1 fi mc_sel_modules=`cat ${mc_fmodules}` mc_new_mods="${mc_sel_modules}" while (test "x${mc_new_mods}" != x); do mc_mod_list="${mc_new_mods}" mc_new_mods= # Go through every module in the list for mc_mod in ${mc_mod_list}; do echo ${mc_n} ".${mc_c}" 1>&6 # We have an info file, don't we? if (test ! -f ${mc_mod_dir}/${mc_mod}/modinfo); then continue fi # Figure out the module's dependencies mc_mod_depends=`grep "^DEPENDS:" ${mc_mod_dir}/${mc_mod}/modinfo | sed -e 's/^DEPENDS://'` # Check whether the dependencies are fulfilled for mc_m_depend in ${mc_mod_depends}; do if (echo ${mc_sel_modules} | \ grep " ${mc_m_depend}" 1>&7 2>&7) || \ (echo ${mc_sel_modules} | \ grep "^${mc_m_depend}" 1>&7 2>&7) then : else # Does the module actually exist? if test ! -d ${mc_mod_dir}/${mc_m_depend}.mod then mc_missing="${mc_missing} ${mc_m_depend}" continue fi # This one is missing. Add it to the # list. mc_all_depends="${mc_all_depends} ${mc_m_depend}" mc_sel_modules="${mc_sel_modules} ${mc_m_depend}" # Add to list of modules to check in # next dependency cycle. mc_new_mods="${mc_new_mods} ${mc_m_depend}.mod" fi done done done echo " done." 1>&6 # Warn about missing modules. if test "x${mc_missing}" != x; then cat 1>&2 <&6 echo ${mc_all_depends} | sed -e 's/ /, /g' 1>&6 # Add the modules ${mc_self_call} -q add ${mc_all_depends} # Update the makefile ${mc_self_call} -q Makefile fi ;; xconfigure) # # Interactive module selection # cat 1>&6 <&2 exit 1 fi # Read current list mc_sel_modules=`cat ${mc_fmodules}` # Detect available modules mc_mods=`echo ${mc_mod_dir}/*.mod` # Error out if we have no available modules if test "${mc_mods}" = "echo ${mc_mod_dir}/*.mod"; then echo "${mc_pn}: error: no modules found." 1>&2 exit 1 fi # Loop through each available module for mc_mod in ${mc_mods}; do # Remove directory information from name mc_mod=`echo ${mc_mod} | sed -e 's/.*\///'` # Only ask for new modules? if test "${mc_flag_onlynew}" = yes; then # Did we already query for that module? if grep "^${mc_mod}$" ${mc_fknownmods} 1>&7 2>&7; then continue fi fi # Remove .mod ending mc_modname=`echo ${mc_mod} | sed -e 's/\.mod//g'` # Note: We need to make sure that we only catch module names # that match _exactly_. e.g. don't mix bseen and seen. if (echo ${mc_sel_modules} | grep " ${mc_mod}" 1>&7 2>&7) || (echo ${mc_sel_modules} | grep "^${mc_mod}" 1>&7 2>&7) then # The module is selected. mc_mstate="enabled" mc_mdisp="(E)nable / (d)isable [E/d] ->" else # The module is NOT selected. mc_mstate="disabled" mc_mdisp="(e)nable / (D)isable [e/D] ->" fi # Display description if test -r ${mc_mod_dir}/${mc_mod}/modinfo; then echo "" 1>&6 grep "^DESC:" ${mc_mod_dir}/${mc_mod}/modinfo | \ sed -e 's/^DESC:/ /' 1>&6 echo "" 1>&6 fi while true; do echo ${mc_n} "\`${mc_modname}' is ${mc_mstate}: ${mc_mdisp} ${mc_c} " 1>&6 read mc_ask_response; if (test "${mc_ask_response}" = D); then mc_ask_response=d; fi if (test "${mc_ask_response}" = E); then mc_ask_response=e; fi # If the user just presses [return] or # if the selected state matches the old state, # then we change nothing. if test "x${mc_ask_response}" = x || \ (test "${mc_ask_response}" = d && \ test "${mc_mstate}" = disabled) || \ (test "${mc_ask_response}" = e && \ test "${mc_mstate}" = enabled); then echo "Changing nothing." 1>&6 break; fi if (test "${mc_ask_response}" = e); then # Add it to the list. mc_sel_modules="${mc_sel_modules} ${mc_mod}" echo "Enabled module '${mc_modname}'." 1>&6 break; fi if (test "${mc_ask_response}" = d); then # Remove module from list. mc_sel_modules=`echo ${mc_sel_modules} | sed -e "s/ ${mc_mod}//g" -e "s/^${mc_mod}//g"` echo "Disabled module '${mc_modname}'." 1>&6 break; fi done echo "" 1>&6 done echo ${mc_n} "Recreating list of active modules...${mc_c}" 1>&6 ${mc_self_call} -q clear if (${mc_self_call} -q add ${mc_sel_modules}); then echo " done." 1>&6 else echo " failed!" 1>&6 exit 1 fi ;; *) if test "x${mc_cmd}" = x; then echo "${mc_pn}: error: no command supplied." 1>&2 else echo "${mc_pn}: error: ${mc_cmd}: unknown command." 1>&2 fi ${mc_self_call} help ;; esac exit 0 eggdrop-1.10.0/FEATURES0000664000175000017500000000471614703073435012507 0ustar geogeoEggdrop Features Eggdrop is the most advanced IRC robot available. It has been under development since December 1993, and unlike most other bots, it is still regularly updated. Some of its features include: - Capability (CAP) support used to enable IRCv3 features. Eggdrop currently supports the following IRCv3 capability sets: account-notify, account-tag, away-notify, cap-notify, chghost, echo-message, extended-join, invite-notify, message-tags, monitor, SASL, server-time, setname, WHOX, and +typing. - Support for SSL-enabled IRC servers - Support for IPv6 users - Support for Twitch servers - Completely separate channel user lists like having a separate bot for each channel. - A "party line" available through dcc chat or telnet, with multiple channels, giving you the ability to talk to people without being affected by netsplits. - A "botnet". A botnet consists of one or more bots linked together. This can allow bots to op each other securely, control floods efficiently, and share user lists, ban lists, exempt/invite lists, and ignore lists (if sharing is enabled). - User records are saved on disk and alterable via dcc chat. Each user can have a password (encrypted), a list of valid hostmasks, a set of access flags, etc. - The ability to "learn" new users (if you choose to let the bot do so) by letting users /MSG the bot "hello". The bot will grant them automatic access of whatever type you specify (or even no access at all). - A file system where users can upload and download files in an environment that looks and acts (for the most part) like a typical UNIX system. It also has the ability to mark files and directories as hidden -- unaccessible to people without certain user flags. - Console mode: you can view each channel through dcc chat or telnet, selectively looking at mode changes, joins and parts, channel talk, or any combination of the above. - A scripting language: commands and features can be easily added to the bot by means of the Tcl scripting language, giving you the power of TOTAL customization of your bot. - Module support: you can remove/add features to your bot by adding or removing modules. Copyright (C) 1997 Robey Pointer Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/CONTENTS0000664000175000017500000000405614703073435012523 0ustar geogeoDirectory Contents - / Last revised: September 21, 2018 _____________________________________________________________________ Directory Contents - / doc/ Lots of IMPORTANT DOCUMENTATION that you MUST READ is in this directory. help/ All of the bot's help files are stored here. language/ All of the bot's language files are stored here. logs/ This is a good place for eggdrop to store log files. m4/ M4 autoconf macros. misc/ These are misc. source/script files. scripts/ Tcl scripts included with Eggdrop are contained in this directory. src/ This is the Eggdrop source. text/ This contains the motd and banner files. aclocal.m4 config.h.in configure configure.ac These are scripts for automatic configure of the bot. AUTHORS Contains a list of Eggdrop developers and major contributors. ChangeLog Contains git commit logs from each change made to Eggdrop in the git repository. COPYING Eggdrop legal information is contained in this file. disabled_modules Any module listed in this file will not be compiled by default. eggdrop-basic.conf This is a minimal sample configuration file for your bot. To unlock the full potential of your eggdrop, please use eggdrop.conf. eggdrop.conf This is a full configuration file for your bot. FEATURES This tells you what Eggdrop can do -- a kind of advertisement. INSTALL Information on installing your Eggdrop. Makefile.in This helps with the automated compiling of the bot. NEWS This lists significant differences with previous versions. README You should read this file before even trying to compile Eggdrop. ssl.conf This is an OpenSSL config file, used for generating certificates THANKS Contains a full list of Eggdrop contributors. UPGRADING Contains information on upgrading from a 1.6 bot to a 1.8 bot. _____________________________________________________________________ Copyright (C) 2003 - 2024 Eggheads Development Team eggdrop-1.10.0/NEWS0000664000175000017500000001300214703073435012031 0ustar geogeoNews Last revised: December 4, 2021 _________________________________________________________________ What's new? This file lists major and incompatible changes in Eggdrop versions. You can find the full list of changes in doc/Changes1.10. For support, feel free to visit us on Libera #eggdrop. For upgrading help, read the UPGRADING file. In general, always make a BACKUP of your config and user/chanfile before performing an upgrade! _________________________________________________________________ Eggdrop v1.10.0: General changes: - Added the new Tcl 'autoscripts' capability. By loading the autoscripts Tcl script, Eggdrop can automatically view, download and install Tcl scripts hosted by the Eggheads team, all via the partyline! No modification of the config file needed. - Eggdrop can now use the account a user is logged into as an identification method in the same manner that a hostmask does. For this feature to be fully accurate, Eggdrop use a server with WHOX enabled and negotiate the extended-join and account-notify IRCv3 capabilities. - Added the IRCv3 userhost-in-names capability. This capability is negotiated with the server at connect and prompts the server to add hostmask to the NAMES command. This is useful in a scenario where an IRC server has disabled the WHO command, but allows Eggdrop to still track hostmasks (and removes the "pending" status from the channel listing under .status). - Added the IRCv3 standard-replies capability. This capability is negotiated with the server at connect and enables the use of non-numeric FAIL, WARN, and NOTE messages. - Modified .bans to properly display channel bans. - Fixed a bug with network reads performed on TLS connections, where Eggdrop could hang until a connection times out, most commonly manifesting itself on server connects and userfile transfers. This is expected to fix the last documented issue with Eggdrop's handling of secure connections. - Eggdrop now requires TLS/SSL libs to be installed by default. Whereas previously Eggdrop would previously continue to compile if TLS libraries were not found, it will now error unless the user explicitly specifies the --disable-tls flag. - Fixed the Monitor bind to properly use wildcards in binds. - Updated language files from ISO-8859 to UTF-8. Botnet changes: - Fixed an issue in pbkdf2-only links properly using/comparing PASS2 entries Tcl API changes: - Updated much of the core Tcl integration to be compatible with the upcoming Tcl 9 release. Much work was done (thank you DasBrain!) to update Eggdrop's internal Tcl calls to prevent breakages using Tcl 9. Most of these changes are transparent to the user, but the one major item to call out is the improvement of Tcl's UTF-8 emoji handling, which no longer requires users to modify TCL_MAX and compile Tcl manually in order to use emojis properly. - The Python module (below) adds the pysource Tcl command, to load a python script into Eggdrop. - Added the Tcl CHGHOST bind, which is triggered when a user's hostmask is changed via an IRCv3 CHGHOST message. - Added the 'hidden-host' type to the event (EVNT) bind. This bind is triggered when the bot's own host is hidden (+x) by a 396 message sent by server. - Added the 'got-chanlist' type to the event (EVNT) bind. This bind is triggered once Eggdrop finishes receiving the list of usernames for a channel from a server. This can be used when Eggdrop needs to wait to perform specific functions when joining a channel but needs to wait until the users on a channel have been presented by the server. - Fixed a bug in the isidentified command to check if a user has definitively been identified or unidentified. Module changes: - Added a Python module! This module integrates an embedded Python interpreter similar to the Tcl interpreter already present in Eggdrop. This module adds the .python command to the partyline (again, similar to the .tcl command) to execute python strings, as well as adding the pysource Tcl command that will load a Python script into Eggdrop. See doc/modules/mod.python for details on how to use it, or example scripts in the scripts/ directory. Eggdrop config changes: - The copy-to-tmp option was removed from the config. This value is now functions under the old '1' behavior where an intermediate temp file is created before copying from/to files that are in use. - The quick-logs option was removed from the config. This value was created to hedge against frequent writes to disk, but is less relveant with today's technology. Eggdrop now writes logfiles to disk immediately. - The old DNS module section was removed - A Python module section was added, but does not load the python module by default. - The Autoscripts capability to load and manage some scripts from the partyline is loaded by default Documentation changes: - Added documentation that covers values commonly used when writing new Tcl binds in C - Added a tutorial to demonstrate how to share userfiles - Added version variable for document generation ________________________________________________________________________ Copyright (C) 1997 Robey Pointer Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/eggdrop.conf0000775000175000017500000020521614703073435013645 0ustar geogeo#! /path/to/executable/eggdrop # ^- This should contain a fully qualified path to your Eggdrop executable. # # This is a sample Eggdrop configuration file which includes all possible # settings that can be used to configure your bot. # # The pound signs (#) that you see at the beginning of some lines mean that # the remainder of that line is a comment, or just for your information. By # adding or deleting pound signs, you can comment or uncomment a setting, # respectively. # # Arguments for a command or setting may be inclosed in <>'s or []'s in the # example/description. Arguments in <>'s are required, while [] means optional. # # More detailed descriptions of all these settings can be found in # doc/settings/. ##### BASIC SETTINGS ##### # This setting defines the username the bot uses on IRC. This setting has no # effect if an ident daemon is running on your bot's machine. See also ident # module. set username "lamest" # This setting defines which contact person should be shown in .status, # /msg help, and other places. You really should include this information. set admin "Lamer " # This setting is used only for info to share with others on your botnet. # Set this to the IRC network your bot is connected to. set network "I.didn't.edit.my.config.file.net" # This setting defines which timezone is your bot in. It's used for internal # routines as well as for logfile timestamping and scripting purposes. # The timezone string specifies the name of the timezone and must be three # or more alphabetic characters. For example, Central European Time(UTC+1) # should be "CET". set timezone "EST" # The offset setting specifies the time value to be added to the local # time to get Coordinated Universal Time (UTC aka GMT). The offset is # positive if the local timezone is west of the Prime Meridian and # negative if it is east. The value (in hours) must be between -23 and # 23. For example, if the timezone is UTC+1, the offset is -1. set offset "5" # If you don't want to use the timezone setting for scripting purposes only, # but instead everywhere possible, un-comment the following line. #set env(TZ) "$timezone$offset" ############################################################################ ## Network settings overview ## With the addition of IPv6 and the associated config changes, here are some ## BASIC common networking scenarios, along with the appropriate settings ## needed: ## ## SHELL PROVIDER (MULTIPLE IPs/VHOSTS) ## * set vhost4 or vhost6 to the IP/vhost you want to use ## * do not set nat-ip ## ## HOME COMPUTER/VPS, DIRECT INTERNET CONNECTION (SINGLE IP, NO NAT) ## * do not set vhost4/vhost6 ## * do not set nat-ip ## ## HOME COMPUTER, BEHIND A NAT ## * do not set vhost4/vhost6 ## * set nat-ip to your external IP ## ## And as a general rule, if you're having issues with Eggdrop responding to ## a CTCP chat request, try setting vhost4/6 to your external IP. ## ## Below is a detailed description of each setting, please read them to ## learn more about their function. ############################################################################ # If you're using virtual hosting (your machine has more than 1 IP), you # may want to specify the particular IP to bind to. You can specify either # by hostname or by IP. Note that this is not used for listening. Use the # 'listen' command to specify the listening address. If you are behind a # NAT, you will likely want to leave this commented out as Eggdrop should # determine the correct IP on its own. #set vhost4 "virtual.host.com" #set vhost4 "99.99.0.0" # IPv6 vhost to bind to for outgoing IPv6 connections. You can set it # to any valid IPv6 address or hostname, resolving to an IPv6 address. # Note that this is not used for listening. Use the 'listen' command # to specify the listening address. #set vhost6 "my.ipv6.host.com" #set vhost6 "2001:db8::c001:b07" # Prefer IPv6 over IPv4 for connections and dns resolution? Set to 1 to try # IPv6 first, otherwise set to 0 for IPv4. If the preferred protocol family # is not supported, the other one will be tried. set prefer-ipv6 0 # If you want to have your Eggdrop messages displayed in a language other # than English, change this setting to match your preference. An alternative # would be to set the environment variable EGG_LANG to that value. # # Languages included with Eggdrop: Danish, English, French, Finnish, German, # Italian, Portuguese. #addlang "english" ##### LOG FILES ##### # 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 # g - raw outgoing share traffic # h - raw incoming share traffic # j - joins, parts, quits, topic changes, and netsplits on the channel # k - kicks, bans, and mode changes on the channel # l - linked bot messages # 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 incoming botnet traffic # u - raw outgoing 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 concurrent logfiles that can be opened # for writing at one time. At most, this value should be the maximum # number of channels you expect to create log files for. There is no # value for 'infinity'; very few cases should ever require more than 20. # A decrease to this value while running will require a restart (not rehash) # of the bot. However, don't decrease it below 5. set max-logs 20 # 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 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 incoming botnet traffic via console/log mode 't', raw outgoing botnet # traffic via console/log mode 'u', raw outgoing share traffic via # console/log mode 'g', and raw incoming 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 that captures items logged at the # m, c, and o log levels (private msgs/ctcps, commands/errors, and misc # info) from any channel. logfile mco * "logs/eggdrop.log" # This creates a logfile named lamest.log that captures items logged at the # j, p, and k log levels (joins/parts/quits/netsplits, public chat, # kicks/bans/mode changes) on the channel #lamest. #logfile jpk #lamest "logs/lamest.log" # Use this feature to timestamp entries in the log file. set log-time 1 # Set the following to the timestamp for the logfile entries. Popular times # might be "[%H:%M]" (hour, min), or "[%H:%M:%S]" (hour, min, sec). # Read `man strftime' for more formatting options. Keep it below 32 chars. set timestamp-format {[%H:%M:%S]} # 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. 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. If you set it to 2, the "Backing up user # file..." and "Backing up channel file..." messages will also not be logged. # In addition to this, you can disable the "Switching logfiles..." and the new # date message at midnight, by setting this to 3. set quiet-save 0 ##### CONSOLE ##### # This is the default console mode. It uses the same event flags as the log # files do. The console channel is automatically set to your "primary" channel, # which is set in the modules section of the config file. Masters can change # their console channel and modes with the '.console' command. set console "mkcoblxs" ##### FILES AND DIRECTORIES ##### # Specify here the filename your userfile should be saved as. set userfile "LamestBot.user" # Specify here the filename Eggdrop will save its pid to. If no pidfile is # specified, pid.(botnet-nick) will be used. #set pidfile "pid.LamestBot" # Specify here where Eggdrop should look for help files. Don't modify this # setting unless you know what you're doing! set help-path "help/" # Specify here where Eggdrop should look for text files. This is used for # certain Tcl and DCC commands. set text-path "text/" # The MOTD (Message Of The day) is displayed when people dcc chat or telnet # to the bot. Look at doc/TEXT-SUBSTITUTIONS for options. set motd "text/motd" # This banner will be displayed on telnet connections. Look at # doc/TEXT-SUBSTITUTIONS for options. set telnet-banner "text/banner" # This specifies what permissions the user, channel, and notes files should # be set to. The octal values are the same as for the chmod system command. # # To remind you: # # u g o u g o u g o # 0600 rw------- 0400 r-------- 0200 -w------- u - user # 0660 rw-rw---- 0440 r--r----- 0220 -w--w---- g - group # 0666 rw-rw-rw- 0444 r--r--r-- 0222 -w--w--w- o - others # # Note that the default 0600 is the most secure one and should only be changed # if you need your files for shell scripting or other external applications. set userfile-perm 0600 ##### BOTNET/DCC/TELNET ##### # Settings in this section should be unimportant for you until you deal # with botnets (multiple Eggdrops connected together to maximize efficiency). # You should read doc/BOTNET before modifying these settings. # If you want to use a different nickname on the botnet than you use on # IRC (i.e. if you're on an un-trusted botnet), un-comment the next line # and set it to the nick you would like to use. #set botnet-nick "LlamaBot" # This opens a telnet port by which you and other bots can interact with the # Eggdrop by telneting in. There are more options for the listen command in # doc/tcl-commands.doc. Note that if you are running more than one bot on the # same machine, you will want to space the telnet ports at LEAST 5 apart, # although 10 is even better. # # Valid ports are typically anything between 1025 and 65535 assuming the # port is not already in use. If you would like the bot to listen for users # and bots in separate ports, use the following format: # # listen 3333 bots # listen 4444 users # # If you wish to use only one port, use this format: # # listen 3333 all # # You can setup a SSL port by prepending a plus sign to it: # # listen +5555 all # # To bind the listening port to a specific IP instead of all available, insert # a valid IP assigned to the host Eggdrop is running on in front of the port # (this replaces the listen-addr setting used prior to Eggdrop v1.9) # # listen 1.2.3.4 3333 all # # You need to un-comment this line and change the port number in order to open # the listen port. You should not keep this set to 3333. #listen 3333 all # This setting defines whether or not people can boot users on the Eggdrop # from other bots in your botnet. # Options are: # 0 = allow *no* outside boots # 1 = allow boots from sharebots # 2 = allow any boots set remote-boots 2 # This setting allows remote bots to tell your Eggdrop to unlink from # share bots. set share-unlinks 1 # This setting will drop telnet connections not matching a known host. set protect-telnet 0 # This setting will make the bot ignore DCC chat requests which appear to # have bogus information on the grounds that the user may have been trying # to make the bot connect to somewhere that will get it into trouble, or # that the user has a broken client, in which case the connect wouldn't work # anyway. set dcc-sanitycheck 0 # This setting defines the time in seconds the bot should wait for ident reply # before the lookup fails. The default ident on timeout is 'telnet'. A value of # 0 disables the ident lookup entirely. set ident-timeout 5 # Define here whether or not a +o user still needs the +p flag to dcc the bot. set require-p 1 # If you want people allow to telnet in and type 'NEW' to become a new user, # set this to 1. This is similar to the 'hello' msg command. The protect-telnet # setting must be set to 0 to use this. set open-telnets 0 # If you don't want Eggdrop to identify itself as an eggdrop on a telnet # connection, set this setting to 1. Eggdrop will display a logon prompt with # only the contents of the stealth-prompt setting. set stealth-telnets 0 # If stealth-telnets is 1, the string in this setting will replace the # traditional Eggdrop banner. Two common choices are listed. (The \n's are # present to maintain backwards compatibility and will be removed in a # future release) #set stealth-prompt "login: " set stealth-prompt "\n\nNickname.\n" # If you want Eggdrop to display a banner when telneting in, set this setting # to 1. The telnet banner is set by 'set telnet-banner'. set use-telnet-banner 0 # This setting defines a time in seconds that the bot should wait before # a dcc chat, telnet, or relay connection times out. set connect-timeout 15 # Specify here the number of lines to accept from a user on the partyline # within 1 second before they are considered to be flooding and therefore # get booted. set dcc-flood-thr 3 # Define here how many telnet connection attempts in how many seconds from # the same host constitute a flood. The correct format is Attempts:Seconds. set telnet-flood 5:60 # If you want telnet-flood to apply even to +f users, set this setting to 1. set paranoid-telnet-flood 1 # Set here the amount of seconds before giving up on hostname/address lookup # (you might want to increase this if you are on a slow network). The default is # RES_TIMEOUT, which is generally 5, the allowed maximum is RES_MAXRETRANS (see # ). #set resolve-timeout 5 ##### SSL SETTINGS ##### # Settings in this section take effect when eggdrop is compiled with TLS # support. # # IMPORTANT: The following two settings MUST be uncommented in order to # use SSL functionality! # File containing your private key, needed for the SSL certificate # (see below). You can create one issuing the following command: # # openssl genrsa -out eggdrop.key 4096 # # It will create a 4096 bit RSA key, strong enough for eggdrop. # For your convenience, you can type 'make sslcert' after 'make install' # and you'll get a key and a certificate in your eggdrop directory. # If you installed to a non-default location, use 'make sslcert DEST=...' # # THIS IS REQUIRED if you intend to use this bot as a hub for SSL hubs/ # listen ports, secure file transfer, /ctcp botnick schat, or # using a certificate to authenticate with NickServ. #set ssl-privatekey "eggdrop.key" # Specify the filename where your SSL certificate is located. If you # don't set this, eggdrop will not be able to act as a server in SSL # connections, as with most ciphers a certificate and a private key # are required on the server side. Must be in PEM format. # If you don't have one, you can create it using the following command: # # openssl req -new -key eggdrop.key -x509 -out eggdrop.crt -days 365 # # For your convenience, you can type 'make sslcert' after 'make install' # and you'll get a key and a certificate in your eggdrop directory. # If you installed to a non-default location, use 'make sslcert DEST=...' # # THIS IS REQUIRED if you intend to use this bot as a hub for SSL hubs/ # listen ports, secure file transfer, /ctcp botnick schat, or # using a certificate to authenticate with NickServ. #set ssl-certificate "eggdrop.crt" # Sets the maximum depth for the certificate chain verification that will # be allowed for ssl. When certificate verification is enabled, any chain # exceeding this depth will fail verification. #set ssl-verify-depth 9 # Specify the location at which CA certificates for verification purposes # are located. These certificates are trusted. If you don't set this, # certificate verification will not work. set ssl-capath "/etc/ssl/" #set ssl-cafile "" # Specify the list of protocols allowed for use with ssl. The protocol list is # one or more protocol strings separated by spaces. Available protocols are # SSLv2, SSLv3, TLSv1, TLSv1.1, TLSv1.2, TLSv1.3. # set ssl-protocols "TLSv1 TLSv1.1 TLSv1.2 TLSv1.3" # Specify the list of ciphers (in order of preference) allowed for use with # ssl. The cipher list is one or more cipher strings separated by colons, # commas or spaces. Unavailable ciphers are silently ignored unless no usable # cipher could be found. For the list of possible cipher strings and their # meanings, please refer to the ciphers(1) manual. # Note: if you set this, the value replaces any ciphers OpenSSL might use by # default. To include the default ciphers, you can put DEFAULT as a cipher # string in the list. # For example: # # set ssl-ciphers "DEFAULT ADH" # # This will make eggdrop allow the default OpenSSL selection plus anonymous # DH ciphers. # # set ssl-ciphers "ALL" # # This will make eggdrop allow all ciphers supported by OpenSSL, in a # reasonable order. #set ssl-ciphers "" # Specify the location of a dhparam file. This file is necessary if you are # using a Diffie-Hellman based key exchange. If you don't know what this is, # you are probably safe leaving it commented. # You can create a dhparam file using the following command: # openssl dhparam -out dhparam.pem 4096 #set ssl-dhparam "dhparam.pem" # Enable certificate authorization. Set to 1 to allow users and bots to # identify automatically by their certificate fingerprints. Setting it # to 2 to will force fingerprint logins. With a value of 2, users without # a fingerprint set or with a certificate UID not matching their handle # won't be allowed to login on SSL enabled telnet ports. Fingerprints # must be set in advance with the .fprint and .chfinger commands. # NOTE: this setting has no effect on plain-text ports. #set ssl-cert-auth 0 # You can control SSL certificate verification using the following variables. # All of them are flag-based. You can set them by adding together the numbers # for all exceptions you want to enable. By default certificate verification # is disabled and all certificates are assumed to be valid. The numbers are # the following: # # Enable certificate verification - 1 # Allow self-signed certificates - 2 # Don't check peer common or alt names - 4 # Allow expired certificates - 8 # Allow certificates which are not valid yet - 16 # Allow revoked certificates - 32 # A value of 0 disables verification. # Control certificate verification for DCC chats (only /dcc chat botnick) #set ssl-verify-dcc 0 # Control certificate verification for linking to hubs #set ssl-verify-bots 0 # Control certificate verification for SSL listening ports. This includes # leaf bots connecting, users telneting in and /ctcp bot chat. #set ssl-verify-clients 0 ##### MORE ADVANCED SETTINGS ##### # Set this to your socks host if your Eggdrop sits behind a firewall. If # you use a Sun "telnet passthru" firewall, prefix the host with a '!'. #set firewall "!sun-barr.ebay:3666" # If you have a NAT firewall (your box has an IP in one of the following # ranges: 192.168.0.0-192.168.255.255, 172.16.0.0-172.31.255.255, # 10.0.0.0-10.255.255.255 and your firewall transparently changes your # address to a unique address for your box) or you have IP masquerading # between you and the rest of the world, and /dcc chat, /ctcp chat or # userfile sharing aren't working, enter your outside IP here. This IP # is used for transfers and CTCP replies only, and is different than the # vhost4/6 settings. You likely still need to set them. #set nat-ip "127.0.0.1" # If you want all dcc file transfers to use a particular portrange either # because you're behind a firewall, or for other security reasons, set it # here. #set reserved-portrange 2010:2020 # Set the time in minutes that temporary ignores should last. set ignore-time 15 # Define here what Eggdrop considers 'hourly'. All calls to it, including such # things as note notifying or userfile saving, are affected by this. # For example: # # set hourly-updates 15 # # The bot will save its userfile 15 minutes past every hour. set hourly-updates 00 # Un-comment the next line and set the list of owners of the bot. # You NEED to change this setting. # This is a list of handles -- usernames in the bot. #set owner "MrLame, MrsLame" # Who should a note be sent to when new users are learned? set notify-newusers "$owner" # Enter the flags that new users added via the 'hello' message command (see # 'learn-users' description further down) should get by default. See # '.help whois' on the partyline for a list of flags and their descriptions. set default-flags "hp" # Enter all user-defined fields that should be displayed in a '.whois'. # This will only be shown if the user has one of these extra fields. # You might prefer to comment this out and use the userinfo1.0.tcl script # which provides commands for changing all of these. set whois-fields "url birthday" # Uncomment these two lines if you wish to disable the .tcl and .set commands. # If you select your owners wisely, you should be okay enabling these. #unbind dcc n tcl *dcc:tcl #unbind dcc n set *dcc:set # If you enable this setting, only permanent owners (owner setting) will be # able to use .tcl and .set. Moreover, if you want only let permanent owners # use .dump, then set this to 2. # WARNING: setting this to 0 is a security risk, don't do it unless you trust # your owners enough to give them shell access to the account the bot is # running on. set must-be-owner 1 # Comment out this line to add the 'simul' partyline command (owners can # manipulate other people on the party line). Please select owners wisely # and use this command ethically! unbind dcc n simul *dcc:simul # Set here the maximum number of socket connections you will allow. You can # increase this later, but never decrease it below current usage. # If you're using Tcl threads, this is a per-thread maximum. set max-socks 100 # Enable this setting if you want +d & +k users to use commands bound as -|-. set allow-dk-cmds 1 # If your Eggdrop rejects bots that actually have already disconnected from # another hub, but the disconnect information has not yet spread over the # botnet due to lag, use this setting. The bot will wait dupwait-timeout # seconds before it checks again and then finally reject the bot. set dupwait-timeout 5 # Enable cidr support for b/e/I modes. This means the bot will understand # and match modes in cidr notation, and will be able to put and enforce such # bans or unban itself, if banned with a cidr mask. # Do NOT set this, if your network/server does not support cidr! set cidr-support 0 # Disable this setting if you do not want to show name and release level of the # operating system. You'll probably also want to edit the default motd (in # text/motd) and remove its display from there. set show-uname 1 # You MUST remove this line for your bot to start. This has been added to # prevent you from starting up a bot that is not fully configured. Bots # that have not been fully configured may join the wrong IRC network, the # wrong channels, or generally do things that you do not want. Please make # sure that you have double-checked every setting. There's also a similar line # lower down, just to make sure you're reading :) die "Please make sure you edit your config file completely." ##### MODULES ##### # Below are various settings for the modules included with Eggdrop. # PLEASE READ AND EDIT THEM CAREFULLY, even if you're an old hand at # Eggdrop, things change. # This path specifies the path were Eggdrop should look for its modules. # If you use 'make install' (like all good kiddies do ;), this is a fine # default. Otherwise, use your head :) set mod-path "modules/" #### PBKDF2 MODULE #### # IF YOU DON'T READ THIS YOU MAY RENDER YOUR USERFILE USELESS LATER # Eggdrop uses hashing in the userfile, so users can have secure passwords. # Eggdrop will not start without an encryption module. # # As of Eggdrop 1.9.0, a new module was added for hashing, the PBKDF2 module. # The PBKDF2 module was designed to work with the previous encryption module # (blowfish) to make the transition easier. If this is a new bot, you can # safely load just the PBKDF2 module. If you are transitioning a userfile from # 1.8 or earlier, you should load this AND the blowfish module (below). By doing # so, Eggdrop will seamlessly update the old blowfish hashes to the new PBKDF2 # hashes once a user logs in for the first time, and allow you to (eventually) # remove the blowfish module altogether (See the remove-pass setting). # Outside of the specific case noted above, please note that if you change your # encryption method later (i.e. using other modules like a rijndael module), you # can't use your current userfile anymore. # # NOTE FOR BOTNET USERS: If all bots on the botnet are not running the same # configuration settings for encryption, you may encounter password-related # issues when linking. # loadmodule pbkdf2 # Cryptographic hash function used. openssl list -digest-algorithms #set pbkdf2-method "SHA256" # Number of rounds. The higher the number, the longer hashing takes; but also # the higher the protection against brute force attacks. #set pbkdf2-rounds 16000 # Remove old password hashes after updating to a pbkdf2 hash? # # WARNING: DO NOT CHANGE THIS UNLESS YOU KNOW WHAT YOU ARE DOING # Enabling this setting will break compatibility with older Eggdrops by ceasing # to write to the PASS field (where password hashes from modules like blowfish # are stored), as well as remove an existing PASS hash if found when writing a # new pbkdf2 hash. In some scenarios (for example, a hub sharing a userfile to # a leaf that does not have a pbkdf2 module loaded) enabling this setting may # result in a user having no password set at all. # # This setting is planned to be enabled by default in Eggdrop 2.0. #set remove-pass 0 #### BLOWFISH MODULE #### # # This module is planned to be removed in Eggdrop 2.0 # # Load this if you intend to use a pre-1.9.0 userfile (Or in other words, do # not load this if you are starting this as a fresh bot and are not linking # it to a botnet that uses blowfish hashes) # # You also need to load this if you use a script that employs the # encrypt/decrypt Tcl commands. # loadmodule blowfish # Specify whether to use ECB or CBC operation modes for the tcl commands # 'encrypt' and 'decrypt'. Prior to version 1.9.0, the less secure ecb # method was used by default. If you are using these commands with older bots, # change this to 'ecb' for compatibility, or upgrade the older bots. set blowfish-use-mode cbc #### PYTHON MODULE ##### # # This module gives Eggdrop the ability to run python scripts. if loaded, # Python scripts can be loaded at the end of the config file using the pysouce # command to tell Eggdrop where the file is loaded. The module requires Python # version 3.8 or higher to run. To load the python module, uncomment it below. #loadmodule python #### CHANNELS MODULE #### # This module provides channel related support for the bot. Without it, # you won't be able to make the bot join a channel or save channel # specific userfile information. loadmodule channels # Enter here the filename where dynamic channel settings are stored. set chanfile "LamestBot.chan" # Set this setting to 1 if you want your bot to expire bans/exempts/invites set # by other opped bots on the channel. set force-expire 0 # Set this setting to 1 if you want your bot to share user greets with other # bots on the channel if sharing user data. set share-greet 0 # Set this setting to 1 if you want to allow users to store an info line. set use-info 1 # Set this setting to 1 if you want to allow both +p and +s channel modes # to be enforced at the same time by the chanmode channel setting. # Make sure your server supports +ps mixing or you may get endless mode # floods. set allow-ps 0 # The following settings are used as default values when you .+chan #chan or # .tcl channel add #chan. Look below for explanation of every option. set default-flood-chan 15:60 set default-flood-deop 3:10 set default-flood-kick 3:10 set default-flood-join 5:60 set default-flood-ctcp 3:60 set default-flood-nick 5:60 set default-aop-delay 5:30 set default-idle-kick 0 set default-chanmode "nt" set default-stopnethack-mode 0 set default-revenge-mode 0 set default-ban-type 3 set default-ban-time 120 set default-exempt-time 60 set default-invite-time 60 set default-chanset { -autoop -autovoice -bitch +cycle +dontkickops +dynamicbans +dynamicexempts +dynamicinvites -enforcebans +greet -inactive -nodesynch -protectfriends +protectops -revenge -revengebot -secret -seen +shared -statuslog +userbans +userexempts +userinvites -protecthalfops -autohalfop -static } # chanmode +/- # This setting makes the bot enforce channel modes. It will always add # the + and remove the - modes. # # idle-kick 0 # This setting will make the bot check every minute for idle # users. Set this to 0 to disable idle check. # # stopnethack-mode 0 # This setting will make the bot de-op anyone who enters the channel # with serverops. There are seven different modes for this settings: # 0 turn off # 1 isoptest (allow serverop if registered op) # 2 wasoptest (allow serverop if op before split) # 3 allow serverop if isop or wasop # 4 allow serverop if isop and wasop. # 5 If the channel is -bitch, see stopnethack-mode 3 # If the channel is +bitch, see stopnethack-mode 1 # 6 If the channel is -bitch, see stopnethack-mode 2 # If the channel is +bitch, see stopnethack-mode 4 # # revenge-mode 0 # This settings defines how the bot should punish bad users when # revenging. There are four possible settings: # 0 Deop the user. # 1 Deop the user and give them the +d flag for the channel. # 2 Deop the user, give them the +d flag for the channel, and kick them. # 3 Deop the user, give them the +d flag for the channel, kick, and ban them. # # ban-type 3 # This setting defines what type of bans should eggdrop place for +k users or # when revenge-mode is 3. # Available types are: # 0 *!user@host # 1 *!*user@host # 2 *!*@host # 3 *!*user@*.host # 4 *!*@*.host # 5 nick!user@host # 6 nick!*user@host # 7 nick!*@host # 8 nick!*user@*.host # 9 nick!*@*.host # You can also specify types from 10 to 19 which correspond to types # 0 to 9, but instead of using a * wildcard to replace portions of the # host, only numbers in hostnames are replaced with the '?' wildcard. # Same is valid for types 20-29, but instead of '?', the '*' wildcard # will be used. Types 30-39 set the host to '*'. # # ban-time 120 # Set here how long temporary bans will last (in minutes). If you # set this setting to 0, the bot will never remove them. # # exempt-time 60 # Set here how long temporary exempts will last (in minutes). If you # set this setting to 0, the bot will never remove them. The bot will # check the exempts every X minutes, but will not remove the exempt if # a ban is set on the channel that matches that exempt. Once the ban is # removed, then the exempt will be removed the next time the bot checks. # Please note that this is an IRCnet feature. # # invite-time 60 # Set here how long temporary invites will last (in minutes). If you # set this setting to 0, the bot will never remove them. The bot will # check the invites every X minutes, but will not remove the invite if # a channel is set to +i. Once the channel is -i then the invite will be # removed the next time the bot checks. Please note that this is an IRCnet # feature. # # aop-delay (minimum:maximum) # This is used for autoop, autohalfop, autovoice. If an op or voice joins a # channel while another op or voice is pending, the bot will attempt to put # both modes on one line. # aop-delay 0 No delay is used. # aop-delay X An X second delay is used. # aop-delay X:Y A random delay between X and Y is used. # # need-op { putserv "PRIVMSG #lamest :op me cos i'm lame!" } # This setting will make the bot run the script enclosed in brackets # if it does not have ops. This must be shorter than 120 characters. # If you use scripts like getops.tcl or botnetop.tcl, you don't need # to set this setting. # # need-invite { putserv "PRIVMSG #lamest :let me in!" } # This setting will make the bot run the script enclosed in brackets # if it needs an invite to the channel. This must be shorter than 120 # characters. If you use scripts like getops.tcl or botnetop.tcl, you # don't need to set this setting. # # need-key { putserv "PRIVMSG #lamest :let me in!" } # This setting will make the bot run the script enclosed in brackets # if it needs the key to the channel. This must be shorter than 120 # characters. If you use scripts like getops.tcl or botnetop.tcl, you # don't need to set this setting # # need-unban { putserv "PRIVMSG #lamest :let me in!" } # This setting will make the bot run the script enclosed in brackets # if it needs to be unbanned on the channel. This must be shorter than # 120 characters. If you use scripts like getops.tcl or botnetop.tcl, # you don't need to set this setting # # need-limit { putserv "PRIVMSG #lamest :let me in!" } # This setting will make the bot run the script enclosed in brackets # if it needs the limit to be raised on the channel. This must be # shorter than 120 characters. If you use scripts like getops.tcl or # botnetop.tcl, you don't need to set this setting # # flood-chan 15:60 # Set here how many channel messages in how many seconds from one # host constitutes a flood. Setting this to 0, 0:X or X:0 disables # flood protection for the channel, where X is an integer >= 0. # # flood-deop 3:10 # Set here how many deops in how many seconds from one host constitutes # a flood. Setting this to 0, 0:X or X:0 disables deop flood protection # for the channel, where X is an integer >= 0. # # flood-kick 3:10 # Set here how many kicks in how many seconds from one host constitutes # a flood. Setting this to 0, 0:X or X:0 disables kick flood protection # for the channel, where X is an integer >= 0. # # flood-join 5:60 # Set here how many joins in how many seconds from one host constitutes # a flood. Setting this to 0, 0:X or X:0 disables join flood protection # for the channel, where X is an integer >= 0. # # flood-ctcp 3:60 # Set here how many channel ctcps in how many seconds from one host # constitutes a flood. Setting this to 0, 0:X or X:0 disables ctcp flood # protection for the channel, where X is an integer >= 0. # # flood-nick 5:60 # Set here how many nick changes in how many seconds from one host # constitutes a flood. Setting this to 0, 0:X or X:0 disables nick flood # protection for the channel, where X is an integer >= 0. # # A complete list of all available channel settings: # # enforcebans # When a ban is set, kick people who are on the channel and match # the ban? # # dynamicbans # Only activate bans on the channel when necessary? This keeps # the channel's ban list from getting excessively long. The bot # still remembers every ban, but it only activates a ban on the # channel when it sees someone join who matches that ban. # # userbans # Allow bans to be made by users directly? If turned off, the bot # will require all bans to be made through the bot's console. # # dynamicexempts # Only activate exempts on the channel when necessary? This keeps # the channel's exempt list from getting excessively long. The bot # still remembers every exempt, but it only activates a exempt on # the channel when it sees a ban set that matches the exempt. The # exempt remains active on the channel for as long as the ban is # still active. # # userexempts # Allow exempts to be made by users directly? If turned off, the # bot will require all exempts to be made through the bot's console. # # dynamicinvites # Only activate invites on the channel when necessary? This keeps # the channel's invite list from getting excessively long. The bot # still remembers every invite, but the invites are only activated # when the channel is set to invite only and a user joins after # requesting an invite. Once set, the invite remains until the # channel goes to -i. # # userinvites # Allow invites to be made by users directly? If turned off, the # bot will require all invites to be made through the bot's console. # # autoop # Op users with the +o flag as soon as they join the channel? # This is insecure and not recommended. # # autohalfop # Halfop users with the +l flag as soon as they join the channel? # This is insecure and not recommended. # # bitch # Only let users with +o) flag be opped on the channel? # # greet # Say a user's info line when they join the channel? # # protectops # Re-op a user with the +o flag if they get deopped? # # protecthalfops # Re-halfop a user with the +l flag if they get dehalfopped? # # protectfriends # Re-op a user with the +f flag if they get deopped? # # statuslog # Log the channel status line every 5 minutes? This shows the bot's # status on the channel (op, voice, etc.), the channel's modes, and # the total number of members, ops, voices, regular users, and +b, # +e, and +I modes on the channel. A sample status line follows: # # [01:40] @#lamest (+istn) : [m/1 o/1 v/4 n/7 b/1 e/5 I/7] # # revenge # Remember people who deop/kick/ban the bot, valid ops, or friends # and punish them? Users with the +f flag are exempt from revenge. # # revengebot # This is similar to to the 'revenge' option, but it only triggers # if a bot gets deopped, kicked or banned. # # autovoice # Voice users with the +v flag when they join the channel? # # secret # Prevent this channel from being listed on the botnet? # # shared # Share channel-related user info for this channel? # # cycle # Cycle the channel when it has no ops? # # dontkickops # Do you want the bot not to be able to kick users who have the +o # flag, letting them kick-flood for instance to protect the channel # against clone attacks. # # inactive # This prevents the bot from joining the channel (or makes it leave # the channel if it is already there). It can be useful to make the # bot leave a channel without losing its settings, channel-specific # user flags, channel bans, and without affecting sharing. # # seen # Respond to seen requests in the channel? The seen module must be # loaded for this to work. # # nodesynch # Allow non-ops to perform channel modes? This can stop the bot from # fighting with services such as ChanServ, or from kicking IRCops when # setting channel modes without having ops. # # static # Allow only permanent owners to remove the channel? # To add a channel to eggdrop, please enter the bot's partyline and type # .+chan #channel. Check also .help chanset and .help chaninfo. # You can still add a channel here and it will be saved if you have a # chanfile. We recommend you to use the partyline though. # #channel add #lamest #### SERVER MODULE #### # This module provides the core server support. You have to load this # if you want your bot to come on IRC. Not loading this is equivalent # to the old NO_IRC define. loadmodule server # Control certificate verification for irc servers. For a description of the # possible values, look at the SSL SETTINGS section above. #set ssl-verify-server 0 ## What is your network? ## Options are: ## EFnet ## IRCnet ## Undernet ## DALnet ## Libera ## freenode ## QuakeNet ## Rizon ## Twitch (This requires twitch.mod to be loaded as well) ## Other (This is a good, sane default option to use if your network/ircd is ## not listed here. Additional configuration options for this setting ## can be found further down in the IRC MODULE section) set net-type "EFnet" # Set the nick the bot uses on IRC, and on the botnet unless you specify a # separate botnet-nick, here. set nick "Lamestbot" # Set the alternative nick which the bot uses on IRC if the nick specified # by 'set nick' is unavailable. All '?' characters will be replaced by random # numbers. set altnick "Llamab?t" # Set what should be displayed in the real-name field for the bot on IRC. # This can not be blank, it has to contain something. set realname "/msg LamestBot hello" # This is a Tcl script to be run immediately after connecting to a server. If # you want to authenticate Eggdrop with NickServ, uncomment and edit the middle # line below. bind evnt - init-server evnt:init_server proc evnt:init_server {type} { global botnick putquick "MODE $botnick +i-ws" # putserv "PRIVMSG NickServ :identify " } # Set the default port which should be used if none is specified with # '.jump' or in 'set servers'. set default-port 6667 # This is the bot's server list. The bot will start at the first server listed, # and cycle through them whenever it gets disconnected. You need to change these # servers to YOUR network's servers. # # The format is: # server add [port [password]] # Prefix the port with a plus sign to attempt a SSL connection: # server add +port [password] # # Both the port and password fields are optional. If a port isn't specified, # the default-port setting will be used. If you want to set a password or use # SSL, you must specify a port. # # This format is new as of version 1.9.0. The previous method using # set servers {} will still work for now, but is deprecated and will be removed # in a future release. server add you.need.to.change.this 6667 server add another.example.com 6669 password server add 2001:db8:618:5c0:263:: 6669 password server add ssl.example.net +7000 #### CAP Features #### # This section controls IRCv3 capabilities supported natively by Eggdrop. You # can enable individual settings here to be requested as part of the # registration process with the IRC server. Not all servers support all CAP # features. https://ircv3.net/support/networks.html maintains a list of some # popular servers, and you can also use '.tcl cap ls' from the partyline # to list capabilities available on that server. # # The capabilities currently known to be supported by Eggdrop are as follows: # # account-notify, account-tag, away-notify, chghost, echo-message, # extended-join, invite-notify, message-tags, server-time, sasl, setname, # +typing # # SASL is a method that allows Eggdrop to authenticate with a NickServ service # as part of the connection process to a server, eliminating the need to later # authenticate via a /msg command. # # To request SASL authentication via CAP, set this to 1 #set sasl 0 # Set SASL mechanism to authenticate with. # Options are: # 0 = PLAIN (normal user/pass exchange, only encrypted # if connected to the IRC server with a # SSL/TLS connection) # # 1 = ECDSA-NIST256P-CHALLENGE (Uses a certificate; usually requires a # public key to be registered with NickServ # or other similar service. Set certificate # to use in sasl-ecdsa-key setting below) # # 2 = EXTERNAL (Some other method you set up. Certificates # used are defined in ssl-certificate and # ssl-privatekey settings in SSL section) # #set sasl-mechanism 0 # Set username to authenticate to IRC NickServ with #set sasl-username "llamabot" # Set password to authenticate to IRC NickServ with #set sasl-password "password" # Specify the location of certificate to use for the SASL # ecdsa-nist256p-challenge. An ECDSA certificate can be generated with the # command: # openssl ecparam -genkey -name prime256v1 -out eggdrop-ecdsa.pem #set sasl-ecdsa-key "eggdrop-ecdsa.pem" # Set SASL failure action # If SASL authentication fails, do you want to connect to the server anyway? # Set this to 0 to disconnect and retry until success, or 1 to continue # connecting to the server without SASL authentication. #set sasl-continue 1 # # Timeout (in seconds) before giving up SASL authentication #set sasl-timeout 15 # To request the account-notify feature via CAP, set this to 1 set account-notify 1 # To request the extended-join feature via CAP, set this to 1 set extended-join 1 # To request the invite-notify feature via CAP, set this to 1 #set invite-notify 0 # To request the message-tags feature via CAP, set this to 1 #set message-tags 0 # To request the account-tag feature via CAP, set this to 1 # This can be enabled if necessary for imperfect account tracking if you don't # have the WHOX, account-notify and extended-join features available # see doc/ACCOUNTS for details #set account-tag 0 # If you have any additional CAP features you would like to request at # registration but are not listed above, set them here as space separated # strings. Setting features here does not guarantee Eggdrop's ability to support # them. #set cap-request "feature1 feature2 feature3" #### End of CAP features #### # Number of seconds to wait between transmitting queued lines to the server. # Lower this value at your own risk. ircd is known to start flood control at # 512 bytes/2 seconds. set msg-rate 2 # This setting makes the bot try to get his original nickname back if its # primary nickname is already in use. set keep-nick 1 # This setting makes the bot squelch the error message when rejecting a DCC # CHAT, SEND or message command. Normally, Eggdrop notifies the user that the # command has been rejected because they don't have access. Note that sometimes # IRC server operators detect bots that way. set quiet-reject 1 # If you want your bot to answer lower case ctcp requests (non rfc- # compliant), set this setting to 1. mIRC will do this, most other # clients will not. set lowercase-ctcp 0 # Set how many ctcps should be answered at once. set answer-ctcp 3 # Set here how many msgs in how many seconds from one host constitutes # a flood. If you set this to 0:0, msg flood protection will be disabled. set flood-msg 5:60 # Set here how many ctcps in how many seconds from one host constitutes # a flood. If you set this to 0:0, ctcp flood protection will be disabled. set flood-ctcp 3:60 # This setting defines how long Eggdrop should wait before moving from one # server to another on disconnect. If you set 0 here, Eggdrop will not wait # at all and will connect instantly. Setting this too low could result in # your bot being K:Lined. set server-cycle-wait 60 # Set here how long Eggdrop should wait for a response when connecting to a # server before giving up and moving on to next server. set server-timeout 60 # Set this to 1 if Eggdrop should check for stoned servers? (where the # server connection has died, but Eggdrop hasn't been notified yet). set check-stoned 1 # If you want your bot to exit the server if it receives an ERROR message, # set this to 1. set serverror-quit 1 # Set here the maximum number of lines to queue to the server. If you're # going to dump large chunks of text to people over IRC, you will probably # want to raise this. 300 is fine for most people though. set max-queue-msg 300 # If you want Eggdrop to trigger binds for ignored users, set this to 1. set trigger-on-ignore 0 # This setting configures PUBM and MSGM binds to be exclusive of PUB and MSG # binds. This means if a MSGM bind with the mask "*help*" exists and is # triggered, any MSG bindings with "help" in their mask will not be # triggered. Don't enable this unless you know what you are doing! set exclusive-binds 0 # Allow identical messages in the mode queue? set double-mode 1 # Allow identical messages in the server queue? set double-server 1 # Allow identical messages in the help queue? set double-help 1 # This optimizes the kick queue. It also traces nick changes and parts in # the channel and changes the kick queue accordingly. # Options are: # 0 = Turn it off. # 1 = Optimize the kick queue by summarizing kicks. # 2 = Trace nick changes and parts on the channel and change the queue # accordingly. For example, bot will not try to kick users who have # already parted the channel. # ATTENTION: Setting 2 is very CPU intensive. set optimize-kicks 1 # If your network supports more recipients per command then 1, you can # change this behavior here. Set this to the number of recipients per # command, or set this to 0 for unlimited. set stack-limit 4 # Sets the default RPL_ISUPPORT (raw 005) information to use as a fallback. # These MUST be compatible to all IRCds you might want to connect to. # The actual server settings overwrite these, so you shouldn't need to modify. #set isupport-default "CASEMAPPING=rfc1459 CHANNELLEN=80 NICKLEN=9 CHANTYPES=#& PREFIX=(ov)@+ CHANMODES=b,k,l,imnpst MODES=3 MAXCHANNELS=10 TOPICLEN=250 KICKLEN=250 STATUSMSG=@+" ### SERVER MODULE - OTHER NETWORKS (net-type "Other") ### # This settings defines how umode +r is understood by Eggdrop. Some networks # use +r to indicate a restricted connection. If this is your case, and you # want your bot to leave restricted servers and jump to the next server on its # list, then set it to 1. The default setting is 0. #set check-mode-r 0 # This setting allows you to specify the maximum nick-length supported by your # network. The default setting is 9. The maximum supported length by Eggdrop # is 32. #set nick-len 9 #### CTCP MODULE #### # This module provides the normal ctcp replies that you'd expect. # Without it loaded, CTCP CHAT will not work. The server module # is required for this module to function. loadmodule ctcp # Set here how the ctcp module should answer ctcps. # Options are: # 0 = Normal behavior is used. # 1 = The bot ignores all ctcps, except for CHAT and PING requests # by users with the +o flag. # 2 = Normal behavior is used, however the bot will not answer more # than X ctcps in Y seconds (defined by 'set flood-ctcp'). set ctcp-mode 0 # There are also several variables to help make your bot less noticeable. # They are: ctcp-version, ctcp-finger, and ctcp-userinfo. You can use set to set # them to values you'd like. #### IRC MODULE #### # This module provides basic IRC support for your bot. You have to # load this if you want your bot to come on IRC. The server and channels # modules must be loaded for this module to function. loadmodule irc # Set this to 1 if you want to bounce all server bans. set bounce-bans 0 # Set this to 1 if you want to bounce all server exemptions (+e modes). # This is disabled if use-exempts is disabled. set bounce-exempts 0 # Set this to 1 if you want to bounce all server invitations (+I modes). # This is disabled if use-invites is disabled. set bounce-invites 0 # Set this to 1 if you want to bounce all server modes. set bounce-modes 0 # The following settings should be left commented unless the default values # are being overridden. By default, exempts and invites are on for EFnet and # IRCnet, but off for all other large networks. This behavior can be modified # with the following 2 flags. If your network doesn't support +e/+I modes then # you will be unable to use these features. # # Do you want to enable exempts (+e modes)? #set use-exempts 0 # Do you want to enable invites (+I modes)? #set use-invites 0 # If you want people to be able to add themselves to the bot's userlist # with the default userflags (defined above in the config file) via the # 'hello' msg command, set this to 1. set learn-users 0 # Set here the time (in seconds) to wait for someone to return from a netsplit # (i.e. wasop will expire afterwards). Set this to 1500 on IRCnet since its # nick delay stops after 30 minutes. set wait-split 600 # Set here the time (in seconds) that someone must have been off-channel # before re-displaying their info line. set wait-info 180 # Set this to the maximum number of bytes to send in the arguments # of modes sent to the server. Most servers default this to 200. set mode-buf-length 200 # Many IRCops find bots by seeing if they reply to 'hello' in a msg. # You can change this to another word by un-commenting the following # two lines and changing "myword" to the word wish to use instead of # 'hello'. It must be a single word. #unbind msg - hello *msg:hello #bind msg - myword *msg:hello # Many takeover attempts occur due to lame users blindly /msg ident'ing to # the bot and attempting to guess passwords. We now unbind this command by # default to discourage them. You can enable these commands by commenting the # following two lines. unbind msg - ident *msg:ident unbind msg - addhost *msg:addhost # Some IRC servers are using some non-standard op-like channel prefixes/modes. # Define them here so the bot can recognize them. Just "@" should be fine for # most networks. Un-comment the second line for some UnrealIRCds. set opchars "@" #set opchars "@&~" # If you are so lame you want the bot to display peoples info lines, even # when you are too lazy to add their chanrecs to a channel, set this to 1. # *NOTE* This means *every* user with an info line will have their info # line displayed on EVERY channel they join (provided they have been gone # longer than wait-info). set no-chanrec-info 0 ### IRC MODULE - IRCnet SPECIFIC FEATURES (net-type "IRCnet") ### # Attention: Use these settings *only* if you set 'net-type' to "IRCnet"! # At the moment, the current IRCnet IRCd version (2.10) doesn't support the # mixing of b, o and v modes with e and I modes. This might be changed in the # future, so use 1 at the moment for this setting. set prevent-mixing 1 ### IRC MODULE - OTHER NETWORKS (net-type "Other") ### # Attention: Use these settings *only* if you set net-type to "Other"! # If your network supports more users per kick command then 1, you can # change this behavior here. Set this to the number of users to kick at # once, or set this to 0 for all at once. #set kick-method 1 # Some networks don't include the +l limit and +k or -k key modes # in the modes-per-line limitation. Set include-lk to 0 for # these networks. #set include-lk 1 # If your network doesn't use rfc 1459 compliant string matching routines, # set this to 0. #set rfc-compliant 1 #### TWITCH MODULE #### # This module attempts to provide connectivity with the Twitch gaming platform. # While Twitch provides an IRC gateway to connect with it's streaming service, # it does not claim to (and certainly does not) follow the IRC RFC in any # meaningful way. The intent of this module is not to provide the full spectrum # of management functions typically associated with Eggdrop; please see the docs # for additional information. Only load this if you are connecting to Twitch! # Please see doc/TWITCH for Twitch-specific setup information, like how to # configure the required CAP settings in the IRC section above. #loadmodule twitch #### TRANSFER MODULE #### # The transfer module provides DCC SEND/GET support and userfile transfer # support for userfile sharing. Un-comment the next line to load it if you # need this functionality. #loadmodule transfer # Set here the maximum number of simultaneous downloads to allow for # each user. set max-dloads 3 # Set here the block size for dcc transfers. ircII uses 512 bytes, # but admits that it may be too small. 1024 is standard these days. # 0 is turbo-dcc (recommended). set dcc-block 0 # Set here the time (in seconds) to wait before an inactive transfer times out. set xfer-timeout 30 # By default, Eggdrop will abort the linking process if userfile sharing is # enabled but the userfile transfer fails. Set this to 0 to keep the bots # linked if the userfile transfer fails and retry every minute (both bots must # be v1.9.0 or higher). #set sharefail-unlink 1 #### SHARE MODULE #### # This module provides userfile sharing support between two directly # linked bots. The transfer and channels modules are required for this # module to correctly function. Un-comment the following line to load # the share module. #loadmodule share # Settings in this section must be un-commented before setting. # When two bots get disconnected, this setting allows them to create a # resync buffer which saves all changes done to the userfile during # the disconnect. When they reconnect, they will not have to transfer # the complete user file, but, instead, just send the resync buffer. # # NOTE: This has been known to cause loss of channel flags and other # problems. Using this setting is not recommended. #set allow-resync 0 # This setting specifies how long to hold another bots resync data # before flushing it. #set resync-time 900 # When sharing user lists, DON'T ACCEPT global flag changes from other bots? # NOTE: The bot will still send changes made on the bot, it just won't accept # any global flag changes from other bots. This overrides the private-globals # setting (below). #set private-global 0 # When sharing user lists, if private-global isn't set, which global flag # changes from other bots should be ignored? #set private-globals "mnot" # When sharing user lists, don't accept ANY userfile changes from other # bots? Paranoid people should use this feature on their hub bot. This # will force all userlist changes to be made via the hub. #set private-user 0 # This setting makes the bot discard its own bot records in favor of # the ones sent by the hub. # NOTE: No passwords or botflags are shared, only ports and # address are added to sharing procedure. This only works with hubs that # are v1.5.1 or higher. #set override-bots 0 #### COMPRESS MODULE #### # This module provides support for file compression. This allows the # bot to transfer compressed user files and therefore save a significant amount # of bandwidth. The share module must be loaded to load this module. Un-comment # the following line to the compress module. #loadmodule compress # Allow compressed sending of user files? The user files are compressed with # the compression level defined in `compress-level'. set share-compressed 1 # This is the default compression level used. These levels are the same as # those used by GNU gzip. #set compress-level 9 #### FILESYSTEM MODULE #### # This module provides an area within the bot where users can store and # manage files. With this module, the bot is usable as a file server. The # transfer module is required for this module to function. Un-comment # the following line to load the filesys module. #loadmodule filesys # Set here the 'root' directory for the file system. set files-path "/home/mydir/filesys" # If you want to allow uploads, set this to the directory uploads # should be put into. Set this to "" if you don't want people to # upload files to your bot. set incoming-path "/home/mydir/filesys/incoming" # If you don't want to have a central incoming directory, but instead # want uploads to go to the current directory that a user is in, set # this setting to 1. set upload-to-pwd 0 # Eggdrop creates a '.filedb' file in each subdirectory of your file area # to keep track of its own file system information. If you can't do that (for # example, if the dcc path isn't owned by you, or you just don't want it to do # that) specify a path here where you'd like all of the database files to be # stored instead. set filedb-path "" # Set here the maximum number of people that can be in the file area at once. # Setting this to 0 makes it effectively infinite. set max-file-users 20 # Set here the maximum allowable file size that will be received (in KB). # Setting this to 0 makes it effectively infinite. set max-filesize 1024 #### NOTES MODULE #### # This module provides support for storing of notes for users from each other. # Note sending between currently online users is supported in the core, this is # only for storing the notes for later retrieval. loadmodule notes # Set here the filename where private notes between users are stored. set notefile "LamestBot.notes" # Set here the maximum number of notes to allow to be stored for each user # (to prevent flooding). set max-notes 50 # Set here how long (in days) to store notes before expiring them. set note-life 60 # Set this to 1 if you want to allow users to specify a forwarding address # for forwarding notes to another account on another bot. set allow-fwd 0 # Set this to 1 if you want the bot to let people know hourly if they have # any notes. set notify-users 0 # Set this to 1 if you want the bot to let people know on join if they have # any notes. set notify-onjoin 1 # Comment out this next line. Otherwise, your bot won't start. die "You didn't edit your config file completely like you were told, did you?" # This next line checks if eggdrop is being executed from the source directory if {[file exists aclocal.m4]} { die {You are attempting to run Eggdrop from the source directory. Please finish installing Eggdrop by running "make install" and run it from the install location.} } #### CONSOLE MODULE #### # This module provides storage of console settings when you exit the # bot or type .store on the partyline. loadmodule console # Save users console settings automatically? Otherwise, they have # to use the .store command. set console-autosave 1 # If a user doesn't have any console settings saved, which channel # do you want them automatically put on? set force-channel 0 # Enable this setting if a user's global info line should be displayed # when they join a botnet channel. set info-party 0 #### WOOBIE MODULE #### # This is for demonstrative purposes only. If you are looking for starting # point in writing modules, woobie is the right thing. #loadmodule woobie #### SEEN MODULE #### # This module provides very basic seen commands via msg, on channel or via dcc. # This module works only for users in the bot's userlist. If you are looking for # a better and more advanced seen module, try the gseen module, originally # written by G'Quann and currently maintained by mortmann. You can find it at # https://github.com/michaelortmann/gseen.mod. #loadmodule seen #### ASSOC MODULE #### # This module provides assoc support, i.e. naming channels on the botnet. # You can load it by un-commenting the following line. #loadmodule assoc #### UPTIME MODULE #### # This module reports uptime statistics to the uptime contest web # site at https://www.eggheads.org/uptime/. # Go look and see what your uptime is! It takes about 9 hours to show up, # so if your bot isn't listed, try again later. The server module must be # loaded for this module to function. # # Information sent to the server includes the bot's uptime, botnet-nick, # server, version, and IP address. This information is stored in a temporary # logfile for debugging purposes only. The only publicly available information # will be the bot's botnet-nick, version and uptime. If you do not wish for this # information to be sent, comment out the following line. loadmodule uptime #### IDENT MODULE #### # This module adds Eggdrop support for the externally-provided oident # service, or alternatively the ability for Eggdrop to act as its own ident # daemon. Please read the docs at doc/settings/mod.ident for additional # information on correctly configuring this section. If you don't know # what ident or oident are, it is safe to leave this section commented. #loadmodule ident # Set the ident method you wish to use. Each of these methods requires # some form of external configuration in order to function. See # doc/settings/mod.ident for additional information. # Options are: # 0 = oidentd # Your bot will overwrite $HOME/.oidentd.conf right before opening the # socket to the IRC server with the global reply. # NOTE: requires the oidentd service to be running on the host machine # 1 = Builtin # Your bot will automatically turn its builtin identd on and off when # needed so it shouldn't conflict with other identds that do the same. # NOTE: Eggdrop must be granted permissions on the host system to bind # to port 113. #set ident-method 0 # Set the ident port to use for ident-method 1. #set ident-port 113 ##### AUTOSCRIPTS ##### # Load this script to enable the autoscripts functionality for Eggdrop. # Autoscripts are scripts that can be downloaded, installed and configured via # the partyline. For more information, read doc/AUTOSCRIPTS source scripts/autoscripts.tcl ##### SCRIPTS ##### # This is a good place to load scripts to use with your bot. # This line loads script.tcl from the scripts directory inside your Eggdrop's # directory. All scripts should be put there, although you can place them where # you like as long as you can supply a fully qualified path to them. # # source scripts/script.tcl source scripts/alltools.tcl source scripts/action.fix.tcl # This script enhances Eggdrop's built-in dcc '.whois' command to allow all # users to '.whois' their own handle. source scripts/dccwhois.tcl # This script provides many useful informational functions, like setting # users' URLs, e-mail address, ICQ numbers, etc. You can modify it to add # extra entries. source scripts/userinfo.tcl loadhelp userinfo.help # Use this script for Tcl and Eggdrop backwards compatibility. # NOTE: This can also cause problems with some newer scripts. #source scripts/compat.tcl # A few IRC networks (EFnet and Undernet) have added some simple checks to # prevent drones from connecting to the IRC network. While these checks are # fairly trivial, they will prevent your Eggdrop from automatically # connecting. In an effort to work-around these, we have developed a couple of # TCL scripts to automate the process. if {[info exists net-type]} { switch -- ${net-type} { "EFnet" - "0" { # EFnet source scripts/quotepong.tcl } } } eggdrop-1.10.0/scripts/0000775000175000017500000000000014703073435013025 5ustar geogeoeggdrop-1.10.0/scripts/quotepong.tcl0000664000175000017500000001325614703073435015561 0ustar geogeo# quotepong.tcl by [sL] (Feb 14, 08) # Based on quotepass.tcl by simple, guppy, [sL] # # Ascii Letter definitions provided by Freeder # # Description: # # Some EFnet servers require the user to type /quote pong : # when ident is broken or disabled. This will send pong : to # the server when connecting. # set a2t_alphabet(a) "\n\ /\\ \n\ \ / \\ \n\ \ / /\\ \\ \n\ \ / ____ \\ \n\ /_/ \\_\\\n" set a2t_alphabet(b) "\ ____ \n\ | _ \\ \n\ | |_) |\n\ | _ < \n\ | |_) |\n\ |____/" set a2t_alphabet(c) "\ _____ \n\ \ / ____|\n\ | | \n\ | | \n\ | |____ \n\ \ \\_____|" set a2t_alphabet(d) "\ _____ \n\ | __ \\ \n\ | | | |\n\ | | | |\n\ | |__| |\n\ |_____/ " set a2t_alphabet(e) "\ ______ \n\ | ____|\n\ | |__ \n\ | __| \n\ | |____ \n\ |______|\n" set a2t_alphabet(f) "\ ______ \n\ | ____|\n\ | |__ \n\ | __| \n\ | | \n\ |_| " set a2t_alphabet(g) "\ _____\n\ \ / ____|\n\ | | __ \n\ | | |_ |\n\ | |__| |\n\ \ \\_____|" set a2t_alphabet(h) "\ _ _ \n\ | | | |\n\ | |__| |\n\ | __ |\n\ | | | |\n\ |_| |_|" set a2t_alphabet(i) "\ _____ \n\ |_ _|\n\ \ | | \n\ \ | | \n\ \ _| |_ \n\ |_____|" set a2t_alphabet(j) "\ _ \n\ \ | |\n\ \ | |\n\ \ _ | |\n\ | |__| |\n\ \ \\____/ " set a2t_alphabet(k) "\ _ __\n\ | |/ /\n\ | ' / \n\ | < \n\ | . \\ \n\ |_|\\_\\" set a2t_alphabet(l) "\ _ \n\ | | \n\ | | \n\ | | \n\ | |____ \n\ |______|" set a2t_alphabet(m) "\ __ __ \n\ | \\/ |\n\ | \\ / |\n\ | |\\/| |\n\ | | | |\n\ |_| |_|" set a2t_alphabet(n) "\ _ _ \n\ | \\ | |\n\ | \\| |\n\ | . ` |\n\ | |\\ |\n\ |_| \\_|" set a2t_alphabet(o) "\ ____ \n\ \ / __ \\ \n\ | | | |\n\ | | | |\n\ | |__| |\n\ \ \\____/ " set a2t_alphabet(p) "\ _____ \n\ | __ \\ \n\ | |__) |\n\ | ___/ \n\ | | \n\ |_| " set a2t_alphabet(q) "\ ____ \n\ \ / __ \\ \n\ | | | |\n\ | | | |\n\ | |__| |\n\ \ \\___\\_\\" set a2t_alphabet(r) "\ _____ \n\ | __ \\ \n\ | |__) |\n\ | _ / \n\ | | \\ \\ \n\ |_| \\_\\" set a2t_alphabet(s) "\ _____ \n\ \ / ____|\n\ | (___ \n\ \ \\___ \\ \n\ \ ____) |\n\ |_____/ " set a2t_alphabet(t) "\ _______ \n\ |__ __|\n\ \ | | \n\ \ | | \n\ \ | | \n\ \ |_| " set a2t_alphabet(u) "\ _ _ \n\ | | | |\n\ | | | |\n\ | | | |\n\ | |__| |\n\ \ \\____/ " set a2t_alphabet(v) " __ __\n\ \\ \\ / /\n\ \ \\ \\ / / \n\ \ \\ \\/ / \n\ \ \\ / \n\ \ \\/ " set a2t_alphabet(w) " __ __\n\ \\ \\ / /\n\ \ \\ \\ /\\ / / \n\ \ \\ \\/ \\/ / \n\ \ \\ /\\ / \n\ \ \\/ \\/ " set a2t_alphabet(x) " __ __\n\ \\ \\ / /\n\ \ \\ V / \n\ \ > < \n\ \ / . \\ \n\ /_/ \\_\\" set a2t_alphabet(y) " __ __\n\ \\ \\ / /\n\ \ \\ \\_/ / \n\ \ \\ / \n\ \ | | \n\ \ |_| " set a2t_alphabet(z) "\ ______\n\ |___ /\n\ \ / / \n\ \ / / \n\ \ / /__ \n\ /_____|" proc a2t_ascii2text {ascii {count 6}} { global a2t_alphabet # foreach line [split $ascii \n] { putlog $line } set a2t_result "" for {set i 0} {$i < $count} {incr i} { foreach let [split abcdefghijklmnopqrstuvwxyz ""] { set match 1 set tascii $ascii foreach alph_line [split $a2t_alphabet($let) \n] { set alph_line [string range $alph_line 1 end] set asc_line [lindex [split $tascii \n] 0] set tascii [join [lrange [split $tascii \n] 1 end] \n] # need to fix our match pattern regsub -all {\\} $alph_line {\\\\} alph_line if {![string match "[string trim $alph_line]*" [string trim $asc_line]]} { set match 0 break } } if {$match} { append a2t_result $let # remove the ascii letter set new_ascii [list] foreach alph_line [split $a2t_alphabet($let) \n] { set alph_line [string range $alph_line 1 end] set asc_line [lindex [split $ascii \n] 0] set ascii [join [lrange [split $ascii \n] 1 end] \n] # need to fix our regspec regsub -all {\\} $alph_line {\\\\} alph_line regsub -all {\|} $alph_line "\\|" alph_line regsub -all {\)} $alph_line "\\)" alph_line regsub -all {\(} $alph_line "\\(" alph_line regsub -- $alph_line "$asc_line" "" asc_line lappend new_ascii $asc_line } set ascii [join $new_ascii \n] } if {$match} { break } } } return [string toupper $a2t_result] } set quotepong_match "/QUOTE PONG :cookie" bind evnt - init-server quotepong_unbind bind evnt - disconnect-server quotepong_unbind bind evnt - connect-server quotepong_bind proc quotepong_servermsg {from cmd text} { global quotepong_match quotepong_count quotepong_ascii if {![info exists quotepong_count] && [string match "*$quotepong_match*" $text]} { set quotepong_count 0 set quotepong_ascii [list] return 0 } if {[info exists quotepong_count] && ($cmd == "998")} { if {$quotepong_count == 0} { putlog "Received ASCII Cookie from server:" } incr quotepong_count lappend quotepong_ascii [lindex [split $text :] 1] putlog "[lindex [split $text :] 1]" if {$quotepong_count == 6} { # time to send back to server set cookie [a2t_ascii2text [join $quotepong_ascii \n]] putlog "Sending Cookie to server: $cookie" putserv "PONG :$cookie" catch {unset quotepong_count} } } return 0 } proc quotepong_unbind {type} { # Try to unbind our raw NOTICE bind once we are connected since it will # never be needed again catch { unbind raw - NOTICE quotepong_servermsg unbind raw - 998 quotepong_servermsg } } proc quotepong_bind {type} { bind raw - NOTICE quotepong_servermsg bind raw - 998 quotepong_servermsg } putlog "Loaded quotepong.tcl" eggdrop-1.10.0/scripts/ques5.tcl0000664000175000017500000003163514703073435014603 0ustar geogeo# # ques5.tcl # # Copyright (C) 1995 - 1997 Robey Pointer # Copyright (C) 1999 - 2024 Eggheads Development Team # # v1 -- 20aug95 # v2 -- 2oct95 [improved it] # v3 -- 17mar96 [fixed it up for 1.0 multi-channel] # v4 -- 3nov97 [Fixed it up for 1.3.0 version bots] by TG # v4.00001 nov97 [blurgh] # v5-BETA1 -- 26sep99 by rtc # # o clean webfile var removal # o using timezone variable from config file # o unified options and removed unnecessary ones. # o convert urls, nicks etc. to HTML before we put them into the page. # o nice html source indenting # o replace the old file after the new one has completely written to # disk # o the description still contained robey's address, replaced # by the eggheads email. # o don't link any spaces in the HTML2.0 file # v5-RC1 -- 29sep99 by rtc # o info line wasn't converted to HTML. # o now supports bold, italic and underline text style and colors. # v5-FINAL -- 04oct99 by rtc # o style converter now strictly follows HTML standard. # o Fake color attributes with number > 2^32 don't cause Tcl # error anymore. # o now uses strftime as time and date functions have both been removed # in 1.3.29 # this will create an html file every so often (the default is once every # 5 minutes). the html file will have a table showing the people currently # on the channel, their user@hosts, who's an op, and who's idle. it # uses a table which some browsers (and pseudo-browsers like lynx) can't # see, but it can optionally make a second page which will support these # archaic browsers. browsers supporting push-pull will receive the updated # page automatically periodically. # # if you have a "url" field defined for a user, their nickname in the # table will be a link pointing there. otherwise it checks the info # line and comment field to see if they start with "http://" -- if so, # that link will be used. as a last resort, it will make a "mailto:" # link if an email address is recorded for the user. # # feel free to modify and play with this. the original was written in # 15 minutes, then at various times i fixed bugs and added features. # softlord helped me make the design look a little nicer. :) if you make # any nifty improvements, please let us know. # eggheads@eggheads.org # this line makes sure other scripts won't interfere if {[info exists web_file] || [array exists web_file]} {unset web_file} # You must define each channel you want a webfile for . # If you want a HTML2.0 file, too, put it's filename separated by # a colon to the same option, it goes to the same directory. #set web_file(#turtle) "/home/lamest/public_html/turtle.html:turtle-lynx.html" # This example demonstrates how to put lynx files into another dir. #set web_file(#gloom) "/home/lamest/public_html/gloom.html:lynx/gloom.html" # You can also prevent the HTML2.0 file from being written. #set web_file(#channel) "/home/lamest/public_html/channel.html" # You can even let the bot write only a HTML2.0. #set web_file(#blah) "/home/lamest/public_html/:blah.html" # how often should these html files get updated? # (1 means once every minute, 5 means once every 5 minutes, etc) set web_update 5 # Which characters should be allowed in URLs? # DO NOT MODIFY unless you really know what you are doing. # Especially never add '<', '"' and '>' set web_urlchars "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 :+-/!\$%&()=[]{}#^~*.:,;\\|?_@" # IRC -> HTML color translation table set web_color(0) "#FFFFFF" set web_color(1) "#000000" set web_color(2) "#00007F" set web_color(3) "#008F00" set web_color(4) "#FF0000" set web_color(5) "#7F0000" set web_color(6) "#9F009F" set web_color(7) "#FF7F00" set web_color(8) "#F0FF00" set web_color(9) "#00F700" set web_color(10) "#008F8F" set web_color(11) "#00F7FF" set web_color(12) "#0000FF" set web_color(13) "#FF00FF" set web_color(14) "#7F7F7F" set web_color(15) "#CFCFCF" # IRC -> HTML style translation table set web_style(\002) " " set web_style(\003) " " set web_style(\026) " " set web_style(\037) " " proc getnumber {string} { set result "" foreach char [split $string ""] { if {[string first $char "0123456789"] == -1} { return $result } else { append result $char } } return $result } proc webify {string} { # Tcl8.1 only: #return [string map {\" " & & < < > >} $string] # Otherwise use this: regsub -all "\\&" $string "\\&" string regsub -all "\"" $string "\\"" string regsub -all "<" $string "<" string regsub -all ">" $string ">" string return $string } proc convstyle {string} { global web_color web_style set result "" set stack "" for {set i 0} "\$i < [string length $string]" {incr i} { set char [string index $string $i] switch -- $char { "\002" - "\026" - "\037" { if {[string first $char $stack] != -1} { # NOT && if {[string index $stack 0] == $char} { append result [lindex $web_style($char) 1] set stack [string range $stack 1 end] } } else { append result [lindex $web_style($char) 0] set stack $char$stack } } "\003" { if {[string first $char $stack] != -1} { if {[string index $stack 0] == $char} { append result [lindex $web_style($char) 1] set stack [string range $stack 1 end] } } set c [getnumber [string range $string [expr $i + 1] [expr $i + 2]]] if {$c != "" && $c >= 0 && $c <= 15} { incr i [string length $c] append result "" set stack $char$stack } } default {append result $char} } } foreach char [split $stack ""] { if {$char == "\002" || $char == "\003" || $char == "\026" || $char == "\037"} { append result [lindex $web_style($char) 1] } } return $result } proc urlstrip {string} { global web_urlchars set result "" foreach char [split $string ""] { if {[string first $char $web_urlchars] != -1} { append result $char } } return $result } proc do_ques {} { global web_file web_update web_timerid global botnick timezone if {[info exists web_timerid]} {unset web_timerid} foreach chan [array names web_file] { if {[lsearch -exact [string tolower [channels]] [string tolower $chan]] == -1} {continue} set i [split $web_file($chan) ":"] set dir "" set file1 [lindex $i 0] set file2 [lindex $i 1] set j [string last "/" $file1] if {$j != -1} { set dir [string range $file1 0 $j] set file1 [string range $file1 [expr $j + 1] end] } unset i j if {$file1 != ""} { set fd1 [open $dir$file1~new w] } else { set fd1 [open "/dev/null" w] } if {$file2 != ""} { set fd2 [open $dir$file2~new w] } else { set fd2 [open "/dev/null" w] } puts $fd1 "" puts $fd1 " " puts $fd1 " People on [webify $chan] right now" puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd2 "" puts $fd2 " " puts $fd2 " People on [webify $chan] right now" puts $fd2 " " puts $fd2 " " puts $fd2 " " puts $fd2 " " if {![onchan $botnick $chan]} { puts $fd1 "

Oops!

" puts $fd1 " I'm not on [webify $chan] right now for some reason
" puts $fd1 " IRC isn't a very stable place these days..." puts $fd1 " Please try again later!
" puts $fd2 "

Oops!

" puts $fd2 " I'm not on [webify $chan] right now for some reason
" puts $fd2 " IRC isn't a very stable place these days..." puts $fd2 " Please try again later!
" } else { puts $fd1 "

[webify $chan]

" puts $fd2 "

[webify $chan]

" if {$file2 != ""} { puts $fd1 " If this page looks screwy on your browser, " puts $fd1 " try the HTML 2.0 " puts $fd1 " version.
" } puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd2 " People on [webify $chan] as of [webify [strftime %a,\ %d\ %b\ %Y\ %H:%M\ %Z]]" puts $fd2 "
"
      puts $fd2 "      Nickname  Status           User@Host"
      foreach nick [chanlist $chan] {
        set len1 9
        set len2 16
        puts $fd1 "      
" if {[isop $nick $chan]} {lappend status "op"} if {[getchanidle $nick $chan] > 10} {lappend status "idle"} set host [getchanhost $nick $chan] set handle [finduser $nick!$host] set host [webify $host] if {[onchansplit $nick $chan]} { lappend status "split" #incr len2 [string length ""] incr len2 17 } if {![info exists status]} { set status "-" } else { set status [join $status ", "] } set url [urlstrip [getuser $handle XTRA url]] set info [getuser $handle INFO] set comment [getuser $handle COMMENT] set email [getuser $handle XTRA email] if {$url == "" && [string range $comment 0 6] == "http://"} { set url [urlstrip $comment] } if {$url == "" && [string range $info 0 6] == "http://"} { set url [urlstrip $info] } if {$url == "" && $email != "" && [string match *@*.* $email]} { set url [urlstrip mailto:$email] } incr len1 [string length [webify $nick]] incr len1 -[string length $nick] if {[string tolower $nick] == [string tolower $botnick]} { set host "<- it's me, the channel bot!" set info "" } elseif {[matchattr $handle b]} { set host "<- it's another channel bot" set info "" } if {$url != ""} { incr len1 [string length ""] puts $fd1 " " puts $fd2 " [format %-${len1}s [webify $nick]] [format %-${len2}s $status] $host" } else { puts $fd1 " " puts $fd2 " [format %-${len1}s [webify $nick]] [format %-${len2}s $status] $host" } puts $fd1 " " puts $fd1 " " puts $fd1 " " if {$info != ""} { puts $fd1 " " puts $fd1 " " puts $fd1 " " puts $fd2 " Info: [convstyle [webify $info]]" } unset len1 len2 status info url host comment email } puts $fd1 "
People on [webify $chan] as of [webify [strftime %a,\ %d\ %b\ %Y\ %H:%M\ %Z]]
NicknameStatusUser@Host
[webify $nick][webify $nick]$status$host
Info: [convstyle [webify $info]]
" puts $fd2 " " } puts $fd1 "
" puts $fd1 " This page is automatically refreshed every [webify $web_update] minute(s).
" puts $fd1 "
Created by quesedilla v5 via eggdrop.
" puts $fd1 " " puts $fd1 "" puts $fd1 "" puts $fd2 "
" puts $fd2 " This page is automatically refreshed every [webify $web_update] minute(s).
" puts $fd2 "
Created by quesedilla v5 via eggdrop.
" puts $fd2 " " puts $fd2 "" puts $fd2 "" close $fd1 close $fd2 if {$file1 != ""} {exec /bin/mv $dir$file1~new $dir$file1} if {$file2 != ""} {exec /bin/mv $dir$file2~new $dir$file2} unset nick file1 file2 dir fd1 fd2 } set web_timerid [timer $web_update do_ques] } #if {[info exists web_timerid]} { # killtimer $web_timerid # unset web_timerid #} if {![info exists web_timerid] && $web_update > 0} { set web_timerid [timer $web_update do_ques] } #do_ques foreach chan [array names web_file] { if {[string first ":" $web_file($chan)] != -1} { lappend channels "$chan" } else { lappend channels "$chan (no lynx)" } } if {![info exists channels]} { putlog "Quesedilla v5 final loaded (no channels)" } else { putlog "Quesedilla v5 final loaded: [join $channels ,\ ]" unset channels } if {![info exists timezone]} { set timezone [clock format 0 -format %Z] } eggdrop-1.10.0/scripts/CONTENTS0000664000175000017500000000460614703073435014213 0ustar geogeoDirectory Contents - scripts/ Last revised: August 08, 2004 _____________________________________________________________________ Directory Contents - scripts/ These are the example scripts that come with eggdrop. They're meant to be useful AND to introduce Tcl to those who haven't dealt with it before. Even people who program in Tcl may be confused by Eggdrop's implementation at first, because so many commands were added to interface with the bot. action.fix.tcl Gets rid of those ugly /me's people do instead of a .me. alltools.tcl Several useful procs for use in scripts. autobotchk Tcl script used to crontab your Eggdrop. Type 'scripts/autobotchk' from the Eggdrop's root directory for help. botchk A shell script which can be used for auto-starting the bot via 'cron'. cmd_resolve.tcl Adds a dcc command called '.resolve' which can be used to resolve hostnames or IP addresses via the partyline. compat.tcl Maps old Tcl functions to new ones, for lazy people who can't be bothered updating their scripts. dccwhois.tcl Enhances Eggdrop's built-in dcc '.whois' command to allow all users to '.whois' their own handle. getops.tcl A way for bots to get ops from other bots on the botnet (if they're on the same channel). klined.tcl Removes servers from your server list that your bot has been k-lined on, to prevent admins getting peeved with constant connects from your bot's host. notes2.tcl Check your notes on every shared bot of the hub. ques5.tcl Makes web pages of who's on each channel, updated periodically (requires alltools.tcl). quotepong.tcl Some EFnet servers require the user to type /quote pong : when identd is broken or disabled. This will send pong : to the server when connecting. sentinel.tcl (by slennox) Flood protection script for Eggdrop with integrated BitchX CTCP simulation. This script is designed to provide strong protection for your bot and channels against large floodnets and proxy floods. userinfo.tcl Cute user info settings things. weed Weed out certain undesirables from an Eggdrop userlist. Type 'scripts/weed' from the Eggdrop's root directory for help. _____________________________________________________________________ Copyright (C) 2001 - 2024 Eggheads Development Team eggdrop-1.10.0/scripts/getops.tcl0000664000175000017500000002465314703073435015044 0ustar geogeo # Getops 2.3b # This script is used for bots to request and give ops to each other. # For this to work, you'll need: # - Bots must be linked in a botnet # - Every bot that should be ops on your channels must load this script # - Add all bots you wanna op with this one using the .+bot nick address # command. The "nick" should be exactly the botnet-nick of the other bot # - Add the hostmasks that uniquely identify this bot on IRC # - Add a global or channel +o flag on all bots to be opped # - Do exactly the same on all other bots # The security of this relies on the fact that the bot which wants to have # ops must be 1) linked to the current botnet (which requires a password), # 2) have an entry with +o on the bot that he wants ops from and 3) must match # the hostmask that is stored on each bots userfile (so it is good to keep the # hostmasks up-to-date). # ----------------------------------------------------------------------------- # 2.3c by PPSlim # - Small fix on timer handling. # Not list formatted, allowing command parsing of channel name # 2.3b by gregul # - small fix in getbot # 2.3a by guppy # - fix for bind need # 2.3 by guppy # - minor cleanup to use some 1.6 tcl functions # - use bind need over need-op, need-invite, etc ... # 2.2g by poptix # - Fabian's 2.2e broke the script, fixed. # 2.2f by Eule # - removed key work-around added in 2.2d as eggdrop now handles this # correctly. # 2.2e by Fabian # - added support for !channels (so-called ID-channels), using chandname2name # functions. This makes it eggdrop 1.5+ specific. # 2.2d by brainsick # - Undernet now handles keys differently. It no longer gives the key on a # join, but instead gives it on an op, but eggdrop doesn't check for this. # getops-2.2d should now handle this correctly. (This should be the final # fix to the key problems.) # 2.2c by Progfou (Jean Christophe ANDRE ) # - changed "Requested" to "Requesting" as it was a little confusing # - corrected the "I am not on chan..." problem with key request # (thanks to Kram |FL| and Gael for reporting it) # - removed more unnecessary check # 2.2b by Progfou (Jean Christophe ANDRE ) # - removed global +o in unknown bot test # - removed unnecessary checks due to previous unknown bot test # 2.2a by Progfou (Jean Christophe ANDRE ) # - removed Polish language! # 2.2 by Cron (Arkadiusz Miskiewicz ) # - works good (tested on eggdrop 1.3.11) # - asks from unknown (and bots without +bo) are ignored # - all messages in Polish language # - better response from script to users # - fixed several bugs # 2.1 by Ernst # - asks for ops right after joining the channel: no wait anymore # - sets "need-op/need-invite/etc" config right after joining dynamic channels # - fixed "You aren't +o" being replied when other bot isn't even on channel # - better response from bots, in case something went wrong # (for example if bot is not recognized (hostmask) when asking for ops) # - removed several no-more-used variables # - added the information and description above # 2.0.1 by beldin (1.3.x ONLY version) # - actually, iso needed to be modded for 1.3 :P, and validchan is builtin # and I'll tidy a couple of functions up to # 2.0 by DarkDruid # - It'll work with dynamic channels(dan is a dork for making it not..) # - It will also only ask one bot at a time for ops so there won't be any more # annoying mode floods, and it's more secure that way # - I also took that annoying wallop and resynch stuff out :P # - And I guess this will with with 1.3.x too # Previously by The_O, dtM. # Original incarnation by poptix (poptix@poptix.net) # ----------------------------------------------------------------------------- # [0/1] do you want GetOps to notice when some unknown (unauthorized) bot # sends request to your bot set go_bot_unknown 1 # [0/1] do you want your bot to request to be unbanned if it becomes banned? set go_bot_unban 1 # [0/1] do you want GetOps to notice the channel if there are no ops? set go_cycle 0 # set this to the notice txt for the above (go_cycle) set go_cycle_msg "Please part the channel so the bots can cycle!" # ----------------------------------------------------------------------------- set bns "" proc gain_entrance {what chan} { global botnick botname go_bot_unban go_cycle go_cycle_msg bns switch -exact $what { "limit" { foreach bs [lbots] { putbot $bs "gop limit $chan $botnick" putlog "GetOps: Requesting limit raise from $bs on $chan." } } "invite" { foreach bs [lbots] { putbot $bs "gop invite $chan $botnick" putlog "GetOps: Requesting invite from $bs for $chan." } } "unban" { if {$go_bot_unban} { foreach bs [lbots] { putbot $bs "gop unban $chan $botname" putlog "GetOps: Requesting unban on $chan from $bs." } } } "key" { foreach bs [lbots] { putbot $bs "gop key $chan $botnick" putlog "GetOps: Requesting key on $chan from $bs." } } "op" { if {[hasops $chan]} { set bot [getbot $chan] if {$bot == ""} { set bns "" set bot [getbot $chan] } lappend bns "$bot" if {$bot != ""} { putbot $bot "gop op $chan $botnick" putlog "GetOps: Requesting ops from $bot on $chan" } } { if {$go_cycle} { putserv "NOTICE [chandname2name $chan] :$go_cycle_msg" } } } } } proc hasops {chan} { foreach user [chanlist $chan] { if {[isop $user $chan]} { return 1 } } return 0 } proc getbot {chan} { global bns foreach bn [bots] { if {[lsearch $bns $bn] < 0} { if {[matchattr $bn o|o $chan]} { set nick [hand2nick $bn $chan] if {[onchan $nick $chan] && [isop $nick $chan]} { return $bn break } } } } } proc botnet_request {bot com args} { global go_bot_unban go_bot_unknown set args [lindex $args 0] set subcom [lindex $args 0] set chan [string tolower [lindex $args 1]] if {![validchan $chan]} { putbot $bot "gop_resp I don't monitor $chan." return 0 } # Please note, 'chandname2name' will cause an error if it is not a valid channel # Thus, we make sure $chan is a valid channel -before- using it. -poptix set idchan [chandname2name $chan] set nick [lindex $args 2] if {$subcom != "takekey" && ![botonchan $chan]} { putbot $bot "gop_resp I am not on $chan." return 0 } if {![matchattr $bot b]} { if { $go_bot_unknown == 1} { putlog "GetOps: Request ($subcom) from $bot - unknown bot (IGNORED)" } return 0 } switch -exact $subcom { "op" { if {![onchan $nick $chan]} { putbot $bot "gop_resp You are not on $chan for me." return 1 } set bothand [finduser $nick![getchanhost $nick $chan]] if {$bothand == "*"} { putlog "GetOps: $bot requested ops on $chan. Ident not recognized: $nick![getchanhost $nick $chan]." putbot $bot "gop_resp I don't recognize you on IRC (your ident: $nick![getchanhost $nick $chan])" return 1 } if {[string tolower $bothand] == [string tolower $nick]} { putlog "GetOps: $bot requested ops on $chan." } { putlog "GetOps: $bot requested ops as $nick on $chan." } if {[iso $nick $chan] && [matchattr $bothand b]} { if {[botisop $chan]} { if {![isop $nick $chan]} { putlog "GetOps: $nick asked for op on $chan." putbot $bot "gop_resp Opped $nick on $chan." pushmode $chan +o $nick } } { putbot $bot "gop_resp I am not +o on $chan." } } { putbot $bot "gop_resp You aren't +o in my userlist for $chan, sorry." } return 1 } "unban" { if {$go_bot_unban} { putlog "GetOps: $bot requested that I unban him on $chan." foreach ban [chanbans $chan] { if {[string compare $nick $ban]} { set bug_1 [lindex $ban 0] pushmode $chan -b $bug_1 } } return 1 } { putlog "GetOps: Refused request to unban $bot ($nick) on $chan." putbot $bot "gop_resp Sorry, not accepting unban requests." } } "invite" { putlog "GetOps: $bot asked for an invite to $chan." putserv "invite $nick $idchan" return 1 } "limit" { putlog "GetOps: $bot asked for a limit raise on $chan." pushmode $chan +l [expr [llength [chanlist $chan]] + 1] return 1 } "key" { putlog "GetOps: $bot requested the key on $chan." if {[string match *k* [lindex [getchanmode $chan] 0]]} { putbot $bot "gop takekey $chan [lindex [getchanmode $chan] 1]" } { putbot $bot "gop_resp There isn't a key on $chan!" } return 1 } "takekey" { putlog "GetOps: $bot gave me the key to $chan! ($nick)" foreach channel [string tolower [channels]] { if {$chan == $channel} { if {$idchan != ""} { putserv "JOIN $idchan $nick" } else { putserv "JOIN $channel $nick" } return 1 } } } default { putlog "GetOps: ALERT! $bot sent fake 'gop' message! ($subcom)" } } } proc gop_resp {bot com msg} { putlog "GetOps: MSG from $bot: $msg" return 1 } proc lbots {} { set unf "" foreach users [userlist b] { foreach bs [bots] { if {$users == $bs} { lappend unf $users } } } return $unf } # Returns list of bots in the botnet and +o in my userfile on that channel proc lobots { channel } { set unf "" foreach users [userlist b] { if {![matchattr $users o|o $channel]} { continue } foreach bs [bots] { if {$users == $bs} { lappend unf $users } } } return $unf } proc iso {nick chan} { return [matchattr [nick2hand $nick $chan] o|o $chan] } proc gop_need {chan type} { # Use bind need over setting need-op, need-invite, etc ... gain_entrance $type $chan } bind need - * gop_need bind bot - gop botnet_request bind bot - gop_resp gop_resp bind join - * gop_join proc requestop { chan } { global botnick set chan [string tolower $chan] foreach thisbot [lobots $chan] { # Send request to all, because the bot does not have the channel info yet putbot $thisbot "gop op $chan $botnick" lappend askedbot $thisbot } if {[info exist askedbot]} { regsub -all " " $askedbot ", " askedbot putlog "GetOps: Requested Ops from $askedbot on $chan." } { putlog "GetOps: No bots to ask for ops on $chan." } return 0 } proc gop_join { nick uhost hand chan } { if {[isbotnick $nick]} { utimer 3 [list requestop $chan] } return 0 } set getops_loaded 1 putlog "GetOps v2.3c loaded." eggdrop-1.10.0/scripts/userinfo.tcl0000664000175000017500000002334614703073435015373 0ustar geogeo# userinfo.tcl v1.08 for Eggdrop 1.4.3 and higher # Scott G. Taylor -- ButchBub!staylor@mrynet.com # # v1.00 ButchBub 14 July 1997 -Original release. Based on # whois.tcl "URL" commands. # v1.01 Beldin 11 November 1997 -1.3 only version # v1.02 Kirk 19 June 1998 -extremely small fixes # v1.03 guppy 17 March 1999 -small fixes again # v1.04 Ernst 15 June 1999 -fix for egg 1.3.x + TCL 8.0 # v1.05 Dude 14 July 1999 -small cosmetic/typo fixes # -$lastbind bug work around fix # -added userinfo_loaded var # -fixed bug in dcc_chuserinfo proc # -unbinds removed user fields # -dcc .showfields command added # -deletes removed userinfo fields # from the whois-fields list. # v1.06 guppy 19 March 2000 -removed lastbind workaround since # lastbind is fixed in eggdrop1.4.3 # v1.07 TaKeDa 20 August 2001 -now script works also on bots, # which didn't have server module loaded # -added new fields PHONE and ICQ # v1.08 mortmann 16 July 2020 -added new fields YOUTUBE and TWITCH # # TO USE: o Set the desired userinfo field keywords to the # `userinfo-fields' line below where indicated. # o Load this script on a 1.4.3 or later Eggdrop bot. # o Begin having users save the desired information. If you # choose to add the default "IRL" field, they just use # the IRC command: /MSG irl Joe Blow. # o See the new information now appear with the whois command. # # This script enhances the `whois' output utilizing the `whois-fields' # option of eggdrop 1.1-grant and later versions. It adds the functionality # of whois.tcl used in pre-1.1-grant versions. # # The fields desired to be maintained in the userfile `xtra' information # should be put in `userinfo-fields'. This is different than the Eggdrop # configuration variable `whois-fields' in that this script will add the # commands to change these fields. It will also add these desired fields # to the `whois-fields' itself, so do not define them there as well. The # fields added in `userinfo-fields' will be converted to upper case for # aesthetics in the `whois' command output. # # The commands that will be added to the running eggdrop are: # ( will be the respective userfile field added in `userinfo-fields') # # TYPE COMMAND USAGE # ====== ============== ======================================== # msg To change your via /MSG. # dcc . To change your via DCC. # dcc .ch To change someone else's via DCC. # # Currently supported fields and commands: # # FIELD USAGE # ===== ===================== # URL WWW page URL # IRL In Real Life name # BF Boyfriend # GF Girlfriend # DOB Birthday (Date Of Birth) # EMAIL Email address # PHONE Phone number # ICQ ICQ number # YOUTUBE YouTube channel # TWITCH Twitch channel ################################ # Set your desired fields here # ################################ set userinfo-fields "URL BF GF IRL EMAIL DOB PHONE ICQ YOUTUBE TWITCH" # This script's identification set userinfover "Userinfo TCL v1.08" # This script is NOT for pre-1.4.3 versions. catch { set numversion } if {![info exists numversion] || ($numversion < 1040300)} { putlog "*** Can't load $userinfover -- At least Eggdrop v1.4.3 required" return 0 } # Make sure we don't bail because whois and/or userinfo-fields aren't set. if { ![info exists whois-fields]} { set whois-fields "" } if { ![info exists userinfo-fields]} { set userinfo-fields "" } # Add only the userinfo-fields not already in the whois-fields list. foreach field [string tolower ${userinfo-fields}] { if { [lsearch -exact [string tolower ${whois-fields}] $field] == -1 } { append whois-fields " " [string toupper $field] } } # If olduserinfo-fields doesn't exist, create it. if { ![info exists olduserinfo-fields] } { set olduserinfo-fields ${userinfo-fields} } # Delete only the userinfo-fields that have been removed but are still # listed in the whois-fields list. foreach field [string tolower ${olduserinfo-fields}] { if { [lsearch -exact [string tolower ${whois-fields}] $field] >= 0 && [lsearch -exact [string tolower ${userinfo-fields}] $field] == -1 } { set fieldtmp [lsearch -exact [string tolower ${whois-fields}] $field] set whois-fields [lreplace ${whois-fields} $fieldtmp $fieldtmp] } } # If olduserinfo-fields don't equal userinfo-fields, lets run through the # old list of user fields and compare them with the current list. this way # any fields that have been removed that were originally in the list will # have their msg/dcc commands unbinded so you don't have to do a restart. if {[info commands putserv] == ""} { set isservermod 0 } else { set isservermod 1 } if { [string tolower ${olduserinfo-fields}] != [string tolower ${userinfo-fields}] } { foreach field [string tolower ${olduserinfo-fields}] { if { [lsearch -exact [string tolower ${userinfo-fields}] $field] == -1 } { if $isservermod {unbind msg - $field msg_setuserinfo} unbind dcc - $field dcc_setuserinfo unbind dcc m ch$field dcc_chuserinfo } } set olduserinfo-fields ${userinfo-fields} } # Run through the list of user info fields and bind their commands if { ${userinfo-fields} != "" } { foreach field [string tolower ${userinfo-fields}] { if $isservermod {bind msg - $field msg_setuserinfo} bind dcc - $field dcc_setuserinfo bind dcc m ch$field dcc_chuserinfo } } # This is the `/msg ' procedure if $isservermod { proc msg_setuserinfo {nick uhost hand arg} { global lastbind quiet-reject userinfo-fields set userinfo [string toupper $lastbind] set arg [cleanarg $arg] set ignore 1 foreach channel [channels] { if {[onchan $nick $channel]} { set ignore 0 } } if {$ignore} { return 0 } if {$hand != "*"} { if {$arg != ""} { if {[string tolower $arg] == "none"} { putserv "NOTICE $nick :Removed your $userinfo line." setuser $hand XTRA $userinfo "" } { putserv "NOTICE $nick :Now: $arg" setuser $hand XTRA $userinfo "[string range $arg 0 159]" } } { if {[getuser $hand XTRA $userinfo] == ""} { putserv "NOTICE $nick :You have no $userinfo set." } { putserv "NOTICE $nick :Currently: [getuser $hand XTRA $userinfo]" } } } else { if {${quiet-reject} != 1} { putserv "NOTICE $nick :You must be a registered user to use this feature." } } putcmdlog "($nick!$uhost) !$hand! $userinfo $arg" return 0 } #checking for server module } # This is the dcc '.' procedure. proc dcc_setuserinfo {hand idx arg} { global lastbind userinfo-fields set userinfo [string toupper $lastbind] set arg [cleanarg $arg] if {$arg != ""} { if {[string tolower $arg] == "none"} { putdcc $idx "Removed your $userinfo line." setuser $hand XTRA $userinfo "" } { putdcc $idx "Now: $arg" setuser $hand XTRA $userinfo "[string range $arg 0 159]" } } { if {[getuser $hand XTRA $userinfo] == ""} { putdcc $idx "You have no $userinfo set." } { putdcc $idx "Currently: [getuser $hand XTRA $userinfo]" } } putcmdlog "#$hand# [string tolower $userinfo] $arg" return 0 } # This is the DCC `.ch' procedure proc dcc_chuserinfo {hand idx arg} { global lastbind userinfo-fields set userinfo [string toupper [string range $lastbind 2 end]] set arg [cleanarg $arg] if { $arg == "" } { putdcc $idx "syntax: .ch[string tolower $userinfo] \[<[string tolower $userinfo]>|NONE\]" return 0 } set who [lindex [split $arg] 0] if {![validuser $who]} { putdcc $idx "$who is not a valid user." return 0 } if {[llength [split $arg]] == 1} { set info "" } { set info [lrange [split $arg] 1 end] } if {$info != ""} { if {[string tolower $info] == "none"} { putdcc $idx "Removed $who's $userinfo line." setuser $who XTRA $userinfo "" putcmdlog "$userinfo for $who removed by $hand" } { putdcc $idx "Now: $info" setuser $who XTRA $userinfo "$info" putcmdlog "$userinfo for $who set to \"$info\" by $hand" } } { if {[getuser $who XTRA $userinfo] == ""} { putdcc $idx "$who has no $userinfo set." } { putdcc $idx "Currently: [getuser $who XTRA $userinfo]" } } return 0 } bind dcc m showfields showfields proc showfields {hand idx arg} { global userinfo-fields if { ${userinfo-fields} == "" } { putdcc $idx "There are no user info fields set." return 0 } putdcc $idx "Currently: [string toupper ${userinfo-fields}]" putcmdlog "#$hand# showfields" return 0 } proc cleanarg {arg} { set response "" for {set i 0} {$i < [string length $arg]} {incr i} { set char [string index $arg $i] if {($char != "\12") && ($char != "\15")} { append response $char } } return $response } # Set userinfo_loaded variable to indicate that the script was successfully # loaded. this can be used in scripts that make use of the userinfo tcl. set userinfo_loaded 1 # Announce that we've loaded the script. putlog "$userinfover loaded (${userinfo-fields})." putlog "use '.help userinfo' for commands." eggdrop-1.10.0/scripts/cmd_resolve.tcl0000664000175000017500000000237214703073435016037 0ustar geogeo# # cmd_resolve.tcl # written by Jeff Fisher (guppy@eggheads.org) # # This script adds the commands '.resolve' and '.dns' which can be used to # lookup hostnames or ip addresses in the partyline without causing the bot # to block while doing so thanks to the dns module. # # updates # ------- # 15Apr2003: fixed a logging bug and stop using regexp incorrectly # 05Nov2000: fixed a nasty security hole, .resolve [die] # 04Nov2000: first version bind dcc -|- resolve resolve_cmd bind dcc -|- dns resolve_cmd proc resolve_cmd {hand idx arg} { global lastbind if {[scan $arg "%s" hostip] != 1} { putidx $idx "Usage: $lastbind " } else { putidx $idx "Looking up $hostip ..." set hostip [split $hostip] dnslookup $hostip resolve_callback $idx $hostip $lastbind } return 0 } proc resolve_callback {ip host status idx hostip cmd} { if {![valididx $idx]} { return 0 } elseif {!$status} { putidx $idx "Unable to resolve $hostip" } elseif {[string tolower $ip] == [string tolower $hostip]} { putidx $idx "Resolved $ip to $host" } else { putidx $idx "Resolved $host to $ip" } putcmdlog "#[idx2hand $idx]# $cmd $hostip" return 0 } loadhelp cmd_resolve.help putlog "Loaded cmd_resolve.tcl successfully." eggdrop-1.10.0/scripts/notes2.tcl0000664000175000017500000001611614703073435014750 0ustar geogeo# # notes2.tcl - v2.1.2 - released by MHT # - a bind apart script from #TSF # - for eggdrop 1.3.15+ # #### # # history: # -------- # 2.0.0 - first release for 1.3.14+mht series # (get notesat2.tcl for 1.1.5 series) # # 2.0.2 - Message bug corrected: "erased notes; left." is better. # - Corrected weird switch tcl syntax, bug found by Islandic. # It's so different from C (I hate tcl!). # - Deactivated message "I don't know you", boring me ! # - No more logs for notes-indexing on join :-) # # 2.0.3 - Corrected invalid idx bug, if user quits before receiving # his notes check. # # 2.1.0 - Improved protocol to avoid idx mistake for multiple connected users. # Backward compatibility is kept, but price is that idx mistake occurs # if a multiple connected user quits before receiving notes check. # Generally never happens, except in case of 'Chriphil's syndrome' ;-p # - Added missing 'You don't have that many messages.' # # 2.1.1 - fixed a couple of small bugs pertaining to $nick being used instead of # $botnet-nick (found by takeda, fixed by guppy) # # 2.1.2 - fix matchattr for shared bots (found by maimizuno, fixed by Cizzle) # #### # Check your notes on every shared bot of the hub. # # .notes [bot|all] index # .notes [bot|all] read <#|all> # .notes [bot|all] erase <#|all> # # # may be numbers and/or intervals separated by ; # ex: .notes erase 2-4;8;16- # .notes noBOTy read all # ######## unbind dcc - notes *dcc:notes bind dcc - notes *dcc:notes2 bind chon - * *chon:notes2 bind bot - notes2: *bot:notes2 bind bot - notes2reply: *bot:notes2reply ######## proc n2_notesindex {bot handle idx} { global nick botnet-nick switch "([notes $handle])" { "(-2)" { putbot $bot "notes2reply: $handle Notefile failure. $idx" } #"-1" { putbot $bot "notes2reply: $handle I don't know you. $idx" } "(-1)" { return 0 } "(0)" { putbot $bot "notes2reply: $handle You have no messages. $idx" } default { putbot $bot "notes2reply: $handle ### You have the following notes waiting: $idx" set index 0 foreach note [notes $handle "-"] { if {($note != 0)} { incr index set sender [lindex $note 0] set date [strftime "%b %d %H:%M" [lindex $note 1]] putbot $bot "notes2reply: $handle %$index. $sender ($date) $idx" } } putbot $bot "notes2reply: $handle ### Use '.notes ${botnet-nick} read' to read them. $idx" } } return 1 } ######## proc n2_notesread {bot handle idx numlist} { if {($numlist == "")} { set numlist "-" } switch "([notes $handle])" { "(-2)" { putbot $bot "notes2reply: $handle Notefile failure. $idx" } #"(-1)" { putbot $bot "notes2reply: $handle I don't know you. $idx" } "(-1)" { return 0 } "(0)" { putbot $bot "notes2reply: $handle You have no messages. $idx" } default { set count 0 set list [listnotes $handle $numlist] foreach note [notes $handle $numlist] { if {($note != 0)} { set index [lindex $list $count] set sender [lindex $note 0] set date [strftime "%b %d %H:%M" [lindex $note 1]] set msg [lrange $note 2 end] incr count putbot $bot "notes2reply: $handle $index. $sender ($date): $msg $idx" } else { putbot $bot "notes2reply: $handle You don't have that many messages. $idx" } } } } return 1 } ######## proc n2_noteserase {bot handle idx numlist} { switch [notes $handle] { "(-2)" { putbot $bot "notes2reply: $handle Notefile failure. $idx" } #"(-1)" { putbot $bot "notes2reply: $handle I don't know you. $idx" } "(-1)" { return 0 } "(0)" { putbot $bot "notes2reply: $handle You have no messages. $idx" } default { set erased [erasenotes $handle $numlist] set remaining [notes $handle] if {($remaining == 0) && ($erased == 0)} { putbot $bot "notes2reply: $handle You have no messages. $idx" } elseif {($remaining == 0)} { putbot $bot "notes2reply: $handle Erased all notes. $idx" } elseif {($erased == 0)} { putbot $bot "notes2reply: $handle You don't have that many messages. $idx" } elseif {($erased == 1)} { putbot $bot "notes2reply: $handle Erased 1 note, $remaining left. $idx" } else { putbot $bot "notes2reply: $handle Erased $erased notes, $remaining left. $idx" } } } return 1 } ######## proc *bot:notes2 {handle idx arg} { if {(![matchattr $handle ||s])} { return } set nick [lindex $arg 0] set cmd [lindex $arg 1] set num [lindex $arg 2] set idx [lindex $arg 3] if {($num == "") || ($num == "all")} { set num "-" } switch $cmd { "silentindex" { set ret 0; n2_notesindex $handle $nick $idx } "index" { set ret [n2_notesindex $handle $nick $idx] } "read" { set ret [n2_notesread $handle $nick $idx $num] } "erase" { set ret [n2_noteserase $handle $nick $idx $num] } default { set ret 0 } } if {($num == "-")} { set num "" } if {($ret == 1)} { putcmdlog "#$nick@$handle# notes $cmd $num" } } ######## proc *bot:notes2reply {handle idx arg} { # verify that idx is valid (older scripts do not provide idx) set idx [lindex $arg end] if {([valididx $idx]) && ([idx2hand $idx] == [lindex $arg 0])} { set reply [lrange $arg 1 [expr [llength $arg]-2]] } else { set idx [hand2idx [lindex $arg 0]] set reply [lrange $arg 1 end] } if {($idx == -1)} { return } if {([string range $reply 0 0] == "%")} { set reply " [string range $reply 1 end]" } putidx $idx "($handle) $reply" } ######## proc *chon:notes2 {handle idx} { putallbots "notes2: $handle silentindex $idx" return 0 } ######## proc *dcc:notes2 {handle idx arg} { global nick botnet-nick if {$arg == ""} { putidx $idx "Usage: notes \[bot|all\] index" putidx $idx " notes \[bot|all\] read <#|all>" putidx $idx " notes \[bot|all\] erase <#|all>" putidx $idx " # may be numbers and/or intervals separated by ;" putidx $idx " ex: notes erase 2-4;8;16-" putidx $idx " notes ${botnet-nick} read all" } else { set bot [string tolower [lindex $arg 0]] set cmd [string tolower [lindex $arg 1]] set numlog [string tolower [lindex $arg 2]] set num $numlog if {($num == "")} { set num "-" } if {($bot != "all") && ([lsearch [string tolower [bots]] $bot] < 0)} { if {($cmd != "index") && ($cmd != "read") && ($cmd != "erase")} { if {($bot == [string tolower $nick])} { return [*dcc:notes $handle $idx [lrange $arg 1 end]] } else { return [*dcc:notes $handle $idx $arg] } } else { putidx $idx "I don't know any bot by that name." return 0 } } elseif {($cmd != "index") && ($cmd != "read") && ($cmd != "erase")} { putdcc $idx "Function must be one of INDEX, READ, or ERASE." } elseif {$bot == "all"} { #*dcc:notes $handle $idx [lrange $arg 1 end] putallbots "notes2: $handle $cmd $num $idx" } else { putbot $bot "notes2: $handle $cmd $num $idx" } putcmdlog "#$handle# notes@$bot $cmd $numlog" } } ######## putlog "Notes 2.1.0 - Released by MHT " #### eggdrop-1.10.0/scripts/sentinel.tcl0000664000175000017500000014733314703073435015365 0ustar geogeo# sentinel.tcl v2.70 (15 April 2002) # Copyright 1998-2002 by slennox # slennox's eggdrop page - http://www.egghelp.org/ # Flood protection system for eggdrop, with integrated BitchX CTCP # simulation. This script is designed to provide strong protection for your # bot and channels against large floodnets and proxy floods. # # Note that this script was developed on the eggdrop 1.3, 1.4, and 1.6 # series and may not work properly on other versions. # # v2.00 - New standalone release. Contains refinements and features from # the netbots.tcl version of sentinel.tcl. # v2.50 - Locktimes of less than 30 were erroneously allowed. # putquick -next is now supported (eggdrop 1.5+) for faster channel # lock. # - Ban mechanism now checks if flooders are coming from the same # domain or ident and performs wildcard bans instead of banning # each IP/host individually. # - Added tsunami detection to the avalanche flood detection system. # - Variables are now cleared after removing a channel. # - Removed unnecessary botonchan checks throughout components where # botisop already checks for that. # - Removed all unnecessary use of parentheses. # v2.60 - Modified putquick compatibility proc. # - Added sl_wideban option to make domain/ident bans optional. # - Fixed typos in various ban-related functions. # - Unused procs are now unloaded. # - Wildcard bans covering domains/idents were not doing proper # checks on join-part flooders. # v2.70 - Fixed "allbans" error which could occur when sl_wideban is # disabled. # - Added sl_masktype option, currently offering three different # ban/ignore mask types. # - Merged unsets in sl_unsetarray. # - Changed use of "split" in timers to the less ugly "list". # # sentinel.tcl is centered around its channel lock mechanism. It sets the # channel +mi (moderated and invite-only) whenever a substantial flood on # the channel is detected. This ensures channel stability when flooded, # allowing the bots to deal with the flood as smoothly as possible. # sentinel.tcl detects the following types of floods: # # * Channel CTCP floods. This is the most common type of flood, and will # often make users quit from the channel with 'Excess Flood'. A quick # channel lock can prevent this. # * Channel join-part floods. A common type of channel flood in which many # floodbots cycle the channel. # * Channel nick floods. Nick floods are unique in that they can occur even # after a channel is locked. sentinel has special mechanisms to deal with # this as effectively as possible. # * Channel avalanche/tsunami floods. While the avalanche flood is quite # uncommon these days, tsunami floods are often used to seriously lag # mIRC and other clients using control codes (colour, bold, underline, # etc.) # * Channel text floods. Not small text floods - but when hundreds of # messages are sent to the channel within a short period. Detected to # stop really aggressive text floods and reduce the possibility of the # bot crashing or consuming excessive CPU. # # sentinel also has additional protection features for the bot and channel: # # * Bogus username detection. Users with annoying bogus characters in their # ident are banned. A channel lock is applied if multiple join in a short # period. # * Full ban list detection. During a serious flood, the ban list may # become full. If this happens, the bots may start kick flooding since # they cannot ban. If the ban list is full, the channel will be set +i. # * Bot CTCP flood protection. Protects the bot if it is CTCP flooded. # * Bot MSG flood protection. Protects the bot if it's flooded with MSGs or # MSG commands. # * Automatic bans and ignores. During a flood, sentinel will compile a # list of the flooders, then kick-ban them after the channel has been # locked. # * BitchX simulation. This has been built-in mainly because you cannot use # a third-party BitchX simulator with sentinel (only one script at a time # can have control of CTCPs). sentinel provides accurate simulation of # BitchX 75p1+ and 75p3+ CTCP replies and AWAY mode. # * Public commands (lc and uc) and DCC commands (.lock and .unlock) for # locking/unlocking channels. # * DCC command .sentinel displays current settings. # # Important Notes: # - Make sure no bots are enforcing channel mode -i and/or -m. # - Bans are added to the bot's internal ban list, and expire after 24 # hours by default. If you have +dynamicbans set, the bans may be removed # from the channel much sooner than this, but the ban will remain in the # bot's internal ban list until it expires. # - For greater protection against large channel floods, I recommend you # also use a channel limiter script, such as chanlimit.tcl. # - There is a trade-off between convenience and security. The more # automation you enable, the more stress the bot will be under during a # flood and the more stuff it will be sending to the server. # - Where security is paramount, have one or two bots that aren't running # sentinel.tcl. Since sentinel.tcl is a complex script with many # automated and convenience features, there is a potential for # vulnerabilities. # The following flood settings are in number:seconds format, 0:0 to # disable. # Bot CTCP flood. set sl_bcflood 5:30 # Bot MSG flood. set sl_bmflood 6:20 # Channel CTCP flood. set sl_ccflood 5:20 # Channel avalanche/tsunami flood. set sl_avflood 6:20 # Channel text flood. set sl_txflood 80:30 # Channel bogus username join flood. set sl_boflood 4:20 # Channel join-part flood. set sl_jflood 6:20 # Channel nick flood. set sl_nkflood 6:20 # Flood setting notes: # - Don't fiddle too much with the seconds field in the flood settings, as # it can reduce the effectiveness of the script. The seconds field should # set in the 20-60 seconds range. # - Avalanche/tsunmami flood detection may be CPU intensive on a busy # channel, although I don't think it's a big deal on most systems. If # you're concerned about CPU usage you may wish to disable it, perhaps # leaving it enabled on one bot. Disabling text flood protection can # further reduce CPU usage. # - On bots with avalanche/tsunami flood detection enabled, it's # recommended that you also enable text flood detection to cap CPU usage # during a flood. # - If you enable nick flood detection, it's strongly recommended that it # be enabled on all bots that have sentinel.tcl loaded. This is required # for effective nick flood handling. # Specify the number of control characters that must be in a line before # it's counted by the tsunami flood detector. For efficiency reasons, # tsunami detection is implemented with avalanche detection, so sl_avflood # must be enabled for tsunami detection to be active. Setting this to 0 # will disable tsunami detection. set sl_tsunami 10 # Valid settings: 0 to disable, otherwise 1 or higher. # Length of time in minutes to ban channel flooders. This makes the bot # perform kicks and bans on flooders after the channel lock. Because of the # reactive nature of automatic bans, you should disable this on at least # one bot for the most effective protection. set sl_ban 1440 # Valid settings: 0 to disable, otherwise 1 or higher. # Length of time in minutes of on-join bans for bogus usernames. For the # most effective protection, you should disable this on at least one bot. set sl_boban 1440 # Valid settings: 0 to disable, otherwise 1 or higher. # Set global bans on channel flooders and bogus usernames? set sl_globalban 0 # Valid settings: 1 for global bans, 0 for channel-specific bans. # When processing a list of flooders, sentinel.tcl compares the hosts to # see if multiple flooders are coming from a particular domain/IP or using # the same ident (e.g. different vhosts on a single user account). If # multiple flooders come from the same domain/IP, or if multiple flooders # have the same ident, then the whole domain/IP (i.e. *!*@*.domain.com or # *!*@555.555.555.*) or ident (i.e. *!*username@*) is banned. If you # disable this option, all bans will be in *!*@machine.domain.com and # *!*@555.555.555.555 format. set sl_wideban 1 # Valid settings: 1 to enable, 0 to disable. # Maximum number of bans allowed in the bot's ban list before sentinel will # stop adding new bans. This prevents the bot from adding hundreds of bans # on really large floods. Note that this has nothing to do with the channel # ban list. set sl_banmax 100 # Valid settings: 1 or higher. # Length of time in minutes to ignore bot flooders. On bots with sl_ban # active, channel flooders are also added to the ignore list. set sl_igtime 240 # Valid settings: 1 or higher. # Select the type of hostmask to use when banning and/or ignoring flooders. # There are three to choose from: # 0 - *!*@machine.domain.com / *!*@555.555.555.555 # 1 - *!*ident@machine.domain.com / *!*ident@555.555.555.555 # 2 - *!*ident@*.domain.com / *!*ident@555.555.555.* # The default option, 0, is strongly recommended for most situations, and # provides the best level of protection. The other two options are provided # mainly for special cases. set sl_masktype 0 # Valid settings: 0, 1, or 2, depending on the hostmask type you wish to use. # Length of time in seconds to set channel +i if flooded. If set to 0, +i # will not be removed automatically. set sl_ilocktime 120 # Valid settings: 0 to prevent +i being removed automatically, otherwise 30 # or higher. # Length of time in seconds to set channel +m if flooded. If set to 0, +m # will not be removed automatically. set sl_mlocktime 60 # Valid settings: 0 to prevent +m being removed automatically, otherwise 30 # or higher. # On small floods (two flooders or less), remove the +mi shortly after bans # have been set, instead of waiting for the locktimes to expire? This # prevents unnecessary extended locks on small floods. This setting is only # used by bots with sl_ban enabled. set sl_shortlock 0 # Valid settings: 0 to disable, 1 to enable. # Number of bans to allow in the channel ban list before setting the # channel +i. If enabled, this should preferably be set to just below the # maximum number of bans allowed. set sl_bfmaxbans 19 # Valid settings: 0 to disable +i on full ban list, otherwise 1 or higher. # List of users to send a note to when channel is flooded, bot is flooded, # or ban list becomes full. set sl_note "YourNick" # Valid settings: one user like "Tom", a list of users like # "Tom Dick Harry", or "" to specify that no notes are sent. # Notice to send to channel when locked due to flood. set sl_cfnotice "Channel locked temporarily due to flood, sorry for any inconvenience this may cause :-)" # Valid settings: a text string, or set it to "" to disable. # Notice to send to channel when locked due to full ban list. set sl_bfnotice "Channel locked temporarily due to full ban list, sorry for any inconvenience this may cause :-)" # Valid settings: a text string, or set it to "" to disable. # Enable 'lc' and 'uc' public commands for locking/unlocking channel? set sl_lockcmds 2 # Valid settings: 0 to disable, 1 to enable, 2 to require user to be opped # on the channel to use the command. # Users with these flags are allowed to use lc/uc public commands, and # .lock/.unlock DCC commands. set sl_lockflags "o" # Valid settings: one flag like "n", or a list of flags like "fo" (means # 'f OR o'). # Enable BitchX CTCP and AWAY simulation? set sl_bxsimul 0 # Valid settings: 1 to enable, 0 to disable. # Don't edit below unless you know what you're doing. if {$numversion < 1032400} { proc botonchan {chan} { global botnick if {![validchan $chan]} { error "illegal channel: $chan" } elseif {![onchan $botnick $chan]} { return 0 } return 1 } proc putquick {text args} { putserv $text } } proc sl_ctcp {nick uhost hand dest key arg} { global botnet-nick botnick realname sl_ban sl_bflooded sl_bcflood sl_bcqueue sl_bxjointime sl_bxmachine sl_bxonestack sl_bxsimul sl_bxsystem sl_bxversion sl_bxwhoami sl_ccbanhost sl_ccbannick sl_ccflood sl_ccqueue sl_flooded sl_locked sl_note set chan [string tolower $dest] if {[lsearch -exact $sl_ccflood 0] == -1 && [validchan $chan] && ![isop $nick $chan]} { if {$nick == $botnick} {return 0} if {$sl_ban && !$sl_locked($chan) && ![matchattr $hand f|f $chan]} { lappend sl_ccbannick($chan) $nick ; lappend sl_ccbanhost($chan) [string tolower $uhost] utimer [lindex $sl_ccflood 1] [list sl_ccbanqueue $chan] } if {$sl_flooded($chan)} {return 1} incr sl_ccqueue($chan) utimer [lindex $sl_ccflood 1] [list sl_ccqueuereset $chan] if {$sl_ccqueue($chan) >= [lindex $sl_ccflood 0]} { sl_lock $chan "CTCP flood" ${botnet-nick} ; return 1 } if {$sl_bflooded} {return 1} } elseif {[lindex $sl_bcflood 0] && $dest == $botnick} { if {$sl_bflooded} { sl_ignore [string tolower $uhost] $hand "CTCP flooder" ; return 1 } incr sl_bcqueue utimer [lindex $sl_bcflood 1] {incr sl_bcqueue -1} if {$sl_bcqueue >= [lindex $sl_bcflood 0]} { putlog "sentinel: CTCP flood detected on me! Stopped answering CTCPs temporarily." set sl_bflooded 1 utimer [lindex $sl_bcflood 1] {set sl_bflooded 0} if {[info commands sendnote] != ""} { foreach recipient $sl_note { if {[validuser $recipient]} { sendnote SENTINEL $recipient "Bot was CTCP flooded." } } } return 1 } } if {!$sl_bxsimul} {return 0} if {$sl_bxonestack} {return 1} set sl_bxonestack 1 ; utimer 2 {set sl_bxonestack 0} switch -exact -- $key { "CLIENTINFO" { set bxcmd [string toupper $arg] switch -exact -- $bxcmd { "" {putserv "NOTICE $nick :\001CLIENTINFO SED UTC ACTION DCC CDCC BDCC XDCC VERSION CLIENTINFO USERINFO ERRMSG FINGER TIME PING ECHO INVITE WHOAMI OP OPS UNBAN IDENT XLINK UPTIME :Use CLIENTINFO to get more specific information\001"} "SED" {putserv "NOTICE $nick :\001CLIENTINFO SED contains simple_encrypted_data\001"} "UTC" {putserv "NOTICE $nick :\001CLIENTINFO UTC substitutes the local timezone\001"} "ACTION" {putserv "NOTICE $nick :\001CLIENTINFO ACTION contains action descriptions for atmosphere\001"} "DCC" {putserv "NOTICE $nick :\001CLIENTINFO DCC requests a direct_client_connection\001"} "CDCC" {putserv "NOTICE $nick :\001CLIENTINFO CDCC checks cdcc info for you\001"} "BDCC" {putserv "NOTICE $nick :\001CLIENTINFO BDCC checks cdcc info for you\001"} "XDCC" {putserv "NOTICE $nick :\001CLIENTINFO XDCC checks cdcc info for you\001"} "VERSION" {putserv "NOTICE $nick :\001CLIENTINFO VERSION shows client type, version and environment\001"} "CLIENTINFO" {putserv "NOTICE $nick :\001CLIENTINFO CLIENTINFO gives information about available CTCP commands\001"} "USERINFO" {putserv "NOTICE $nick :\001CLIENTINFO USERINFO returns user settable information\001"} "ERRMSG" {putserv "NOTICE $nick :\001CLIENTINFO ERRMSG returns error messages\001"} "FINGER" {putserv "NOTICE $nick :\001CLIENTINFO FINGER shows real name, login name and idle time of user\001"} "TIME" {putserv "NOTICE $nick :\001CLIENTINFO TIME tells you the time on the user's host\001"} "PING" {putserv "NOTICE $nick :\001CLIENTINFO PING returns the arguments it receives\001"} "ECHO" {putserv "NOTICE $nick :\001CLIENTINFO ECHO returns the arguments it receives\001"} "INVITE" {putserv "NOTICE $nick :\001CLIENTINFO INVITE invite to channel specified\001"} "WHOAMI" {putserv "NOTICE $nick :\001CLIENTINFO WHOAMI user list information\001"} "OP" {putserv "NOTICE $nick :\001CLIENTINFO OP ops the person if on userlist\001"} "OPS" {putserv "NOTICE $nick :\001CLIENTINFO OPS ops the person if on userlist\001"} "UNBAN" {putserv "NOTICE $nick :\001CLIENTINFO UNBAN unbans the person from channel\001"} "IDENT" {putserv "NOTICE $nick :\001CLIENTINFO IDENT change userhost of userlist\001"} "XLINK" {putserv "NOTICE $nick :\001CLIENTINFO XLINK x-filez rule\001"} "UPTIME" {putserv "NOTICE $nick :\001CLIENTINFO UPTIME my uptime\001"} "default" {putserv "NOTICE $nick :\001ERRMSG CLIENTINFO: $arg is not a valid function\001"} } return 1 } "VERSION" { putserv "NOTICE $nick :\001VERSION \002BitchX-$sl_bxversion\002 by panasync \002-\002 $sl_bxsystem :\002 Keep it to yourself!\002\001" return 1 } "USERINFO" { putserv "NOTICE $nick :\001USERINFO \001" return 1 } "FINGER" { putserv "NOTICE $nick :\001FINGER $realname ($sl_bxwhoami@$sl_bxmachine) Idle [expr [unixtime] - $sl_bxjointime] seconds\001" return 1 } "PING" { putserv "NOTICE $nick :\001PING $arg\001" return 1 } "ECHO" { if {[validchan $chan]} {return 1} putserv "NOTICE $nick :\001ECHO [string range $arg 0 59]\001" return 1 } "ERRMSG" { if {[validchan $chan]} {return 1} putserv "NOTICE $nick :\001ERRMSG [string range $arg 0 59]\001" return 1 } "INVITE" { if {$arg == "" || [validchan $chan]} {return 1} set chanarg [lindex [split $arg] 0] if {((($sl_bxversion == "75p1+") && ([string trim [string index $chanarg 0] "#+&"] == "")) || (($sl_bxversion == "75p3+") && ([string trim [string index $chanarg 0] "#+&!"] == "")))} { if {[validchan $chanarg]} { putserv "NOTICE $nick :\002BitchX\002: Access Denied" } else { putserv "NOTICE $nick :\002BitchX\002: I'm not on that channel" } } return 1 } "WHOAMI" { if {[validchan $chan]} {return 1} putserv "NOTICE $nick :\002BitchX\002: Access Denied" return 1 } "OP" - "OPS" { if {$arg == "" || [validchan $chan]} {return 1} putserv "NOTICE $nick :\002BitchX\002: I'm not on [lindex [split $arg] 0], or I'm not opped" return 1 } "UNBAN" { if {$arg == "" || [validchan $chan]} {return 1} if {[validchan [lindex [split $arg] 0]]} { putserv "NOTICE $nick :\002BitchX\002: Access Denied" } else { putserv "NOTICE $nick :\002BitchX\002: I'm not on that channel" } return 1 } } return 0 } proc sl_bmflood {nick uhost hand text} { global sl_bmflood sl_bflooded sl_bmqueue sl_note if {[matchattr $hand b] && [string tolower [lindex [split $text] 0]] == "go"} {return 0} if {$sl_bflooded} { sl_ignore [string tolower $uhost] $hand "MSG flooder" ; return 0 } incr sl_bmqueue utimer [lindex $sl_bmflood 1] {incr sl_bmqueue -1} if {$sl_bmqueue >= [lindex $sl_bmflood 0]} { putlog "sentinel: MSG flood detected on me! Stopped answering MSGs temporarily." set sl_bflooded 1 utimer [lindex $sl_bmflood 1] {set sl_bflooded 0} if {[info commands sendnote] != ""} { foreach recipient $sl_note { if {[validuser $recipient]} { sendnote SENTINEL $recipient "Bot was MSG flooded." } } } } return 0 } proc sl_avflood {from keyword arg} { global botnet-nick botnick sl_ban sl_avbanhost sl_avbannick sl_avflood sl_avqueue sl_flooded sl_locked sl_txflood sl_txqueue set arg [split $arg] set chan [string tolower [lindex $arg 0]] if {![validchan $chan]} {return 0} set nick [lindex [split $from !] 0] if {$nick == $botnick || $nick == "" || [string match *.* $nick]} {return 0} if {![onchan $nick $chan] || [isop $nick $chan]} {return 0} if {!$sl_flooded($chan) && [lsearch -exact $sl_txflood 0] == -1} { incr sl_txqueue($chan) if {$sl_txqueue($chan) >= [lindex $sl_txflood 0]} { sl_lock $chan "TEXT flood" ${botnet-nick} } } set text [join [lrange $arg 1 end]] if {[sl_checkaval $text] && [lsearch -exact $sl_avflood 0] == -1} { set uhost [string trimleft [getchanhost $nick $chan] "~+-^="] set hand [nick2hand $nick $chan] if {$sl_ban && !$sl_locked($chan) && $nick != $botnick && ![matchattr $hand f|f $chan]} { lappend sl_avbannick($chan) $nick ; lappend sl_avbanhost($chan) [string tolower $uhost] utimer [lindex $sl_avflood 1] [list sl_avbanqueue $chan] } if {$sl_flooded($chan)} {return 0} incr sl_avqueue($chan) utimer [lindex $sl_avflood 1] [list sl_avqueuereset $chan] if {$sl_avqueue($chan) >= [lindex $sl_avflood 0]} { sl_lock $chan "AVALANCHE/TSUNAMI flood" ${botnet-nick} } } return 0 } proc sl_checkaval {text} { global sl_tsunami if {[regsub -all -- "\001|\007" $text "" temp] >= 3} {return 1} if {$sl_tsunami && [regsub -all -- "\002|\003|\017|\026|\037" $text "" temp] >= $sl_tsunami} {return 1} return 0 } proc sl_nkflood {nick uhost hand chan newnick} { global botnet-nick botnick sl_ban sl_banmax sl_flooded sl_globalban sl_locked sl_nickkick sl_nkbanhost sl_nkflood sl_nkflooding sl_nkqueue set chan [string tolower $chan] if {[isop $newnick $chan]} {return 0} if {$sl_ban && !$sl_locked($chan) && $nick != $botnick && ![matchattr $hand f|f $chan]} { lappend sl_nkbanhost($chan) [string tolower $uhost] utimer [lindex $sl_nkflood 1] [list sl_nkbanqueue $chan] } if {!$sl_nickkick && $sl_flooded($chan) && $sl_locked($chan)} { putserv "KICK $chan $newnick :NICK flooder" set sl_nickkick 1 ; set sl_nkflooding($chan) [unixtime] if {$sl_ban} { set bhost [string tolower [sl_masktype $uhost]] if {$sl_globalban} { if {[llength [banlist]] < $sl_banmax && ![isban $bhost] && ![matchban $bhost]} { newban $bhost sentinel "NICK flooder" $sl_ban } } else { if {[llength [banlist $chan]] < $sl_banmax && ![isban $bhost $chan] && ![matchban $bhost $chan]} { newchanban $chan $bhost sentinel "NICK flooder" $sl_ban } } } utimer [expr [rand 2] + 3] {set sl_nickkick 0} return 0 } if {$sl_flooded($chan)} {return 0} incr sl_nkqueue($chan) utimer [lindex $sl_nkflood 1] [list sl_nkqueuereset $chan] if {$sl_nkqueue($chan) >= [lindex $sl_nkflood 0]} { sl_lock $chan "NICK flood" ${botnet-nick} } return 0 } proc sl_jflood {nick uhost hand chan} { global botnet-nick botnick sl_ban sl_banmax sl_boban sl_bobanhost sl_bobannick sl_boflood sl_boqueue sl_flooded sl_globalban sl_jbanhost sl_jbannick sl_jflood sl_jqueue sl_locked sl_pqueue if {$nick == $botnick} { sl_setarray $chan } else { set ihost [string tolower [sl_masktype $uhost]] if {[isignore $ihost]} { killignore $ihost } set chan [string tolower $chan] if {[lsearch -exact $sl_boflood 0] == -1 && [sl_checkbogus [lindex [split $uhost @] 0]]} { if {!$sl_locked($chan) && ![matchattr $hand f|f $chan]} { set bhost [string tolower [sl_masktype $uhost]] if {$sl_boban && [botisop $chan] && !$sl_flooded($chan)} { putserv "KICK $chan $nick :BOGUS username" if {$sl_globalban} { if {[llength [banlist]] < $sl_banmax && ![isban $bhost] && ![matchban $bhost]} { newban $bhost sentinel "BOGUS username" $sl_boban } } else { if {[llength [banlist $chan]] < $sl_banmax && ![isban $bhost $chan] && ![matchban $bhost $chan]} { newchanban $chan $bhost sentinel "BOGUS username" $sl_boban } } } if {$sl_ban} { lappend sl_bobannick($chan) $nick ; lappend sl_bobanhost($chan) [string tolower $uhost] utimer [lindex $sl_boflood 1] [list sl_bobanqueue $chan] } } if {!$sl_flooded($chan)} { incr sl_boqueue($chan) utimer [lindex $sl_boflood 1] [list sl_boqueuereset $chan] if {$sl_boqueue($chan) >= [lindex $sl_boflood 0]} { sl_lock $chan "BOGUS joins" ${botnet-nick} } } } if {[lsearch -exact $sl_jflood 0] == -1} { if {$sl_ban && !$sl_locked($chan) && ![matchattr $hand f|f $chan]} { lappend sl_jbannick($chan) $nick ; lappend sl_jbanhost($chan) [string tolower $uhost] utimer [lindex $sl_jflood 1] [list sl_jbanqueue $chan] } if {$sl_flooded($chan)} {return 0} incr sl_jqueue($chan) utimer [lindex $sl_jflood 1] [list sl_jqueuereset $chan] if {$sl_jqueue($chan) >= [lindex $sl_jflood 0] && $sl_pqueue($chan) >= [lindex $sl_jflood 0]} { sl_lock $chan "JOIN-PART flood" ${botnet-nick} } } } return 0 } proc sl_checkbogus {ident} { if {[regsub -all -- "\[^\041-\176\]" $ident "" temp] >= 1} {return 1} return 0 } proc sl_pflood {nick uhost hand chan {msg ""}} { global botnick sl_ban sl_flooded sl_jflood sl_locked sl_pbanhost sl_pbannick sl_pqueue if {[lsearch -exact $sl_jflood 0] != -1} {return 0} if {$nick == $botnick} { if {![validchan $chan]} { timer 5 [list sl_unsetarray $chan] } return 0 } set chan [string tolower $chan] if {$sl_ban && !$sl_locked($chan) && ![matchattr $hand f|f $chan]} { lappend sl_pbannick($chan) $nick ; lappend sl_pbanhost($chan) [string tolower $uhost] utimer [lindex $sl_jflood 1] [list sl_pbanqueue $chan] } if {$sl_flooded($chan)} {return 0} incr sl_pqueue($chan) utimer [lindex $sl_jflood 1] [list sl_pqueuereset $chan] return 0 } proc sl_pfloodk {nick uhost hand chan kicked reason} { global botnick sl_flooded sl_jflood sl_pqueue if {[lsearch -exact $sl_jflood 0] != -1} {return 0} if {$kicked == $botnick} {return 0} set chan [string tolower $chan] if {$sl_flooded($chan)} {return 0} incr sl_pqueue($chan) utimer [lindex $sl_jflood 1] [list sl_pqueuereset $chan] return 0 } proc sl_lock {chan flood detected} { global botnet-nick sl_bflooded sl_cfnotice sl_flooded sl_ilocktime sl_mlocktime sl_note if {[string tolower $detected] == [string tolower ${botnet-nick}]} { set sl_flooded($chan) 1 ; set sl_bflooded 1 if {[botisop $chan]} { sl_quicklock $chan sl_killutimer "sl_unlock $chan *" sl_killutimer "set sl_bflooded 0" if {$sl_mlocktime} { utimer $sl_mlocktime [list sl_unlock $chan m] } if {$sl_ilocktime} { utimer $sl_ilocktime [list sl_unlock $chan i] } utimer 120 {set sl_bflooded 0} putlog "sentinel: $flood detected on $chan! Channel locked temporarily." if {$sl_cfnotice != ""} { puthelp "NOTICE $chan :$sl_cfnotice" } } else { putlog "sentinel: $flood detected on $chan! Cannot lock channel because I'm not opped." utimer 120 {set sl_bflooded 0} } } else { putlog "sentinel: $flood detected by $detected on $chan!" } if {[info commands sendnote] != ""} { foreach recipient $sl_note { if {[validuser $recipient]} { if {[string tolower $detected] == [string tolower ${botnet-nick}]} { sendnote SENTINEL $recipient "$flood detected on $chan." } else { sendnote SENTINEL $recipient "$flood detected by $detected on $chan." } } } } return 0 } proc sl_unlock {chan umode} { global sl_bflooded sl_bfmaxbans sl_flooded sl_ilocktime sl_mlocktime sl_nkflooding if {[expr [unixtime] - $sl_nkflooding($chan)] < 12} { putlog "sentinel: nick flooding still in progress on $chan - not removing +mi yet.." set sl_flooded($chan) 1 ; set sl_bflooded 1 sl_killutimer "sl_unlock $chan *" sl_killutimer "set sl_bflooded 0" utimer $sl_mlocktime [list sl_unlock $chan m] ; utimer $sl_ilocktime [list sl_unlock $chan i] utimer 120 {set sl_bflooded 0} } else { set sl_flooded($chan) 0 if {![botisop $chan]} {return 0} if {$umode == "mi"} { putlog "sentinel: flood was small, performing early unlock.." } if {[string match *i* $umode] && [string match *i* [lindex [split [getchanmode $chan]] 0]]} { if {$sl_bfmaxbans && [llength [chanbans $chan]] >= $sl_bfmaxbans} { putlog "sentinel: not removing +i on $chan due to full ban list." } else { pushmode $chan -i putlog "sentinel: removed +i on $chan" } } if {[string match *m* $umode] && [string match *m* [lindex [split [getchanmode $chan]] 0]]} { pushmode $chan -m putlog "sentinel: removed +m on $chan" } } return 0 } proc sl_mode {nick uhost hand chan mode victim} { global botnick sl_ban sl_bfmaxbans sl_bfnotice sl_bfull sl_flooded sl_locked sl_note sl_unlocked set chan [string tolower $chan] if {$mode == "+b" && $sl_bfmaxbans && !$sl_bfull($chan) && ![string match *i* [lindex [split [getchanmode $chan]] 0]] && [botisop $chan] && [llength [chanbans $chan]] >= $sl_bfmaxbans} { putserv "MODE $chan +i" set sl_bfull($chan) 1 utimer 5 [list set sl_bfull($chan) 0] putlog "sentinel: locked $chan due to full ban list!" if {$sl_bfnotice != ""} { puthelp "NOTICE $chan :$sl_bfnotice" } if {[info commands sendnote] != ""} { foreach recipient $sl_note { if {[validuser $recipient]} { sendnote SENTINEL $recipient "Locked $chan due to full ban list." } } } } elseif {$mode == "+i" && $sl_flooded($chan)} { set sl_locked($chan) 1 if {$sl_ban} { sl_killutimer "sl_*banqueue $chan" utimer 7 [list sl_dokicks $chan] ; utimer 16 [list sl_setbans $chan] } } elseif {$mode == "-i" || $mode == "-m"} { set sl_locked($chan) 0 set sl_unlocked($chan) [unixtime] if {$sl_flooded($chan)} { set sl_flooded($chan) 0 if {$mode == "-i"} { sl_killutimer "sl_unlock $chan i" } else { sl_killutimer "sl_unlock $chan m" } sl_killutimer "sl_unlock $chan mi" if {$nick != $botnick} { putlog "sentinel: $chan unlocked by $nick" } } } return 0 } proc sl_dokicks {chan} { global sl_avbannick sl_bobannick sl_ccbannick sl_kflooders sl_jbannick sl_pbannick if {![botisop $chan]} {return 0} set sl_kflooders 0 sl_kick $chan $sl_ccbannick($chan) "CTCP flooder" ; set sl_ccbannick($chan) "" sl_kick $chan $sl_avbannick($chan) "AVALANCHE/TSUNAMI flooder" ; set sl_avbannick($chan) "" sl_kick $chan $sl_bobannick($chan) "BOGUS username" ; set sl_bobannick($chan) "" set jklist $sl_jbannick($chan) ; set pklist $sl_pbannick($chan) if {$jklist != "" && $pklist != ""} { set klist "" foreach nick $jklist { if {[lsearch -exact $pklist $nick] != -1} { lappend klist $nick } } sl_kick $chan $klist "JOIN-PART flooder" } set sl_jbannick($chan) "" ; set sl_pbannick($chan) "" return 0 } proc sl_kick {chan klist reason} { global sl_kflooders sl_kicks if {$klist != ""} { set kicklist "" foreach nick $klist { if {[lsearch -exact $kicklist $nick] == -1} { lappend kicklist $nick } } unset nick incr sl_kflooders [llength $kicklist] foreach nick $kicklist { if {[onchan $nick $chan] && ![onchansplit $nick $chan]} { lappend ksend $nick if {[llength $ksend] >= $sl_kicks} { putserv "KICK $chan [join $ksend ,] :$reason" unset ksend } } } if {[info exists ksend]} { putserv "KICK $chan [join $ksend ,] :$reason" } } return 0 } proc sl_setbans {chan} { global sl_avbanhost sl_bobanhost sl_ccbanhost sl_kflooders sl_jbanhost sl_nkbanhost sl_pbanhost sl_shortlock sl_unlocked sl_wideban if {![botonchan $chan]} {return 0} set sl_ccbanhost($chan) [sl_dfilter $sl_ccbanhost($chan)] set sl_avbanhost($chan) [sl_dfilter $sl_avbanhost($chan)] set sl_nkbanhost($chan) [sl_dfilter $sl_nkbanhost($chan)] set sl_bobanhost($chan) [sl_dfilter $sl_bobanhost($chan)] set sl_jbanhost($chan) [sl_dfilter $sl_jbanhost($chan)] set sl_pbanhost($chan) [sl_dfilter $sl_pbanhost($chan)] set blist "" if {$sl_jbanhost($chan) != "" && $sl_pbanhost($chan) != ""} { foreach bhost $sl_jbanhost($chan) { if {[lsearch -exact $sl_pbanhost($chan) $bhost] != -1} { lappend blist $bhost } } } set allbans [sl_dfilter [concat $sl_ccbanhost($chan) $sl_avbanhost($chan) $sl_nkbanhost($chan) $sl_bobanhost($chan) $blist]] if {$sl_wideban} { sl_ban $chan [sl_dcheck $allbans] "MULTIPLE IDENT/HOST flooders" } sl_ban $chan $sl_ccbanhost($chan) "CTCP flooder" ; set sl_ccbanhost($chan) "" sl_ban $chan $sl_avbanhost($chan) "AVALANCHE/TSUNAMI flooder" ; set sl_avbanhost($chan) "" sl_ban $chan $sl_nkbanhost($chan) "NICK flooder" ; set sl_nkbanhost($chan) "" sl_ban $chan $sl_bobanhost($chan) "BOGUS username" ; set sl_bobanhost($chan) "" sl_ban $chan $blist "JOIN-PART flooder" set sl_jbanhost($chan) "" ; set sl_pbanhost($chan) "" if {$sl_shortlock && $sl_kflooders <= 2 && [llength $allbans] <= 2 && [expr [unixtime] - $sl_unlocked($chan)] > 120} { sl_killutimer "sl_unlock $chan *" utimer 10 [list sl_unlock $chan mi] } return 0 } proc sl_dfilter {list} { set newlist "" foreach item $list { if {[lsearch -exact $newlist $item] == -1} { lappend newlist $item } } return $newlist } proc sl_dcheck {bhosts} { set blist "" foreach bhost $bhosts { set baddr [lindex [split [maskhost $bhost] "@"] 1] set bident [string trimleft [lindex [split $bhost "@"] 0] "~"] if {![info exists baddrs($baddr)]} { set baddrs($baddr) 1 } else { incr baddrs($baddr) } if {![info exists bidents($bident)]} { set bidents($bident) 1 } else { incr bidents($bident) } } foreach baddr [array names baddrs] { if {$baddrs($baddr) >= 2} { lappend blist *!*@$baddr } } foreach bident [array names bidents] { if {$bidents($bident) >= 2} { lappend blist *!*$bident@* } } return $blist } proc sl_ban {chan blist reason} { global sl_ban sl_banmax sl_globalban if {$blist != ""} { if {$sl_globalban} { foreach bhost $blist { if {![string match *!* $bhost]} { if {[matchban *!$bhost]} {continue} set bhost [sl_masktype $bhost] if {[isban $bhost]} {continue} } else { if {[isban $bhost]} {continue} foreach ban [banlist] { if {[lindex $ban 5] == "sentinel" && [string match $bhost [string tolower [lindex $ban 0]]]} { killban $ban } } } if {[llength [banlist]] >= $sl_banmax} {continue} newban $bhost sentinel $reason $sl_ban putlog "sentinel: banned $bhost ($reason)" sl_ignore $bhost * $reason } } else { foreach bhost $blist { if {![string match *!* $bhost]} { if {[matchban *!$bhost $chan]} {continue} set bhost [sl_masktype $bhost] if {[isban $bhost $chan]} {continue} } else { if {[isban $bhost $chan]} {continue} foreach ban [banlist $chan] { if {[lindex $ban 5] == "sentinel" && [string match $bhost [string tolower [lindex $ban 0]]]} { killchanban $chan $ban } } } if {[llength [banlist $chan]] >= $sl_banmax} {continue} newchanban $chan $bhost sentinel $reason $sl_ban putlog "sentinel: banned $bhost on $chan ($reason)" sl_ignore $bhost * $reason } } } return 0 } proc sl_ignore {ihost hand flood} { global sl_igtime if {$hand != "*"} { foreach chan [channels] { if {[matchattr $hand f|f $chan]} {return 0} } } if {![string match *!* $ihost]} { foreach ignore [ignorelist] { if {[string match [string tolower [lindex $ignore 0]] $ihost]} { return 0 } } set ihost [sl_masktype $ihost] if {[isignore $ihost]} {return 0} } else { if {[isignore $ihost]} {return 0} foreach ignore [ignorelist] { if {[lindex $ignore 4] == "sentinel" && [string match $ihost [string tolower [lindex $ignore 0]]]} { killignore $ignore } } } newignore $ihost sentinel $flood $sl_igtime putlog "sentinel: added $ihost to ignore list ($flood)" return 1 } # queuereset procs allow all queue timers to be killed easily proc sl_ccqueuereset {chan} { global sl_ccqueue incr sl_ccqueue($chan) -1 return 0 } proc sl_bcqueuereset {} { global sl_bcqueue incr sl_bcqueue -1 return 0 } proc sl_bmqueuereset {} { global sl_bmqueue incr sl_bmqueue -1 return 0 } proc sl_avqueuereset {chan} { global sl_avqueue incr sl_avqueue($chan) -1 return 0 } proc sl_txqueuereset {} { global sl_txqueue sl_txflood foreach chan [string tolower [channels]] { if {[info exists sl_txqueue($chan)]} { set sl_txqueue($chan) 0 } } utimer [lindex $sl_txflood 1] sl_txqueuereset return 0 } proc sl_nkqueuereset {chan} { global sl_nkqueue incr sl_nkqueue($chan) -1 return 0 } proc sl_boqueuereset {chan} { global sl_boqueue incr sl_boqueue($chan) -1 return 0 } proc sl_jqueuereset {chan} { global sl_jqueue incr sl_jqueue($chan) -1 return 0 } proc sl_pqueuereset {chan} { global sl_pqueue incr sl_pqueue($chan) -1 return 0 } proc sl_ccbanqueue {chan} { global sl_ccbanhost sl_ccbannick set sl_ccbannick($chan) [lrange sl_ccbannick($chan) 1 end] ; set sl_ccbanhost($chan) [lrange sl_ccbanhost($chan) 1 end] return 0 } proc sl_avbanqueue {chan} { global sl_avbanhost sl_avbannick set sl_avbannick($chan) [lrange sl_avbannick($chan) 1 end] ; set sl_avbanhost($chan) [lrange sl_avbanhost($chan) 1 end] return 0 } proc sl_nkbanqueue {chan} { global sl_nkbanhost set sl_nkbanhost($chan) [lrange sl_nkbanhost($chan) 1 end] return 0 } proc sl_bobanqueue {chan} { global sl_bobanhost sl_bobannick set sl_bobannick($chan) [lrange sl_bobannick($chan) 1 end] ; set sl_bobanhost($chan) [lrange sl_bobanhost($chan) 1 end] return 0 } proc sl_jbanqueue {chan} { global sl_jbanhost sl_jbannick set sl_jbannick($chan) [lrange sl_jbannick($chan) 1 end] ; set sl_jbanhost($chan) [lrange sl_jbanhost($chan) 1 end] return 0 } proc sl_pbanqueue {chan} { global sl_pbanhost sl_pbannick set sl_pbannick($chan) [lrange sl_pbannick($chan) 1 end] ; set sl_pbanhost($chan) [lrange sl_pbanhost($chan) 1 end] return 0 } proc sl_flud {nick uhost hand type chan} { global sl_flooded set chan [string tolower $chan] if {[validchan $chan] && $sl_flooded($chan)} {return 1} return 0 } proc sl_lc {nick uhost hand chan arg} { global sl_lockcmds set chan [string tolower $chan] if {![botisop $chan]} {return 0} if {$sl_lockcmds == 2 && ![isop $nick $chan]} {return 0} sl_quicklock $chan putlog "sentinel: channel lock requested by $hand on $chan" return 0 } proc sl_uc {nick uhost hand chan arg} { global sl_lockcmds set chan [string tolower $chan] if {![botisop $chan]} {return 0} if {$sl_lockcmds == 2 && ![isop $nick $chan]} {return 0} putserv "MODE $chan -mi" putlog "sentinel: channel unlock requested by $hand on $chan" return 0 } proc sl_dcclc {hand idx arg} { global sl_lockflags putcmdlog "#$hand# lock $arg" set chan [lindex [split $arg] 0] if {$chan == "-all"} { if {![matchattr $hand $sl_lockflags]} { putidx $idx "You're not global +$sl_lockflags." ; return 0 } set locklist "" foreach chan [channels] { if {[botisop $chan]} { sl_quicklock $chan lappend locklist $chan } } putidx $idx "Locked [join $locklist ", "]" } else { if {$chan == ""} { set chan [lindex [console $idx] 0] } if {![validchan $chan]} { putidx $idx "No such channel." ; return 0 } elseif {![matchattr $hand $sl_lockflags|$sl_lockflags $chan]} { putidx $idx "You're not +$sl_lockflags on $chan." ; return 0 } elseif {![botonchan $chan]} { putidx $idx "I'm not on $chan" ; return 0 } elseif {![botisop $chan]} { putidx $idx "I'm not opped on $chan" ; return 0 } sl_quicklock $chan putidx $idx "Locked $chan" } return 0 } proc sl_dccuc {hand idx arg} { global sl_lockflags putcmdlog "#$hand# unlock $arg" set chan [lindex [split $arg] 0] if {$chan == "-all"} { if {![matchattr $hand $sl_lockflags]} { putidx $idx "You're not global +$sl_lockflags." ; return 0 } set locklist "" foreach chan [channels] { if {[botisop $chan]} { putserv "MODE $chan -mi" lappend locklist $chan } } putidx $idx "Unlocked [join $locklist ", "]" } else { if {$chan == ""} { set chan [lindex [console $idx] 0] } if {![validchan $chan]} { putidx $idx "No such channel." ; return 0 } elseif {![matchattr $hand $sl_lockflags|$sl_lockflags $chan]} { putidx $idx "You're not +$sl_lockflags on $chan." ; return 0 } elseif {![botonchan $chan]} { putidx $idx "I'm not on $chan" ; return 0 } elseif {![botisop $chan]} { putidx $idx "I'm not opped on $chan" ; return 0 } putserv "MODE $chan -mi" putidx $idx "Unlocked $chan" } return 0 } proc sl_quicklock {chan} { global numversion if {$numversion < 1050000} { putquick "MODE $chan +mi" } else { putquick "MODE $chan +mi" -next } } proc sl_dcc {hand idx arg} { global sl_avflood sl_ban sl_banmax sl_bcflood sl_boban sl_boflood sl_bmflood sl_bxsimul sl_bfmaxbans sl_ccflood sl_detectquits sl_globalban sl_igtime sl_jflood sl_kicks sl_lockcmds sl_lockflags sl_ilocktime sl_mlocktime sl_nkflood sl_note sl_shortlock sl_tsunami sl_txflood putcmdlog "#$hand# sentinel $arg" putidx $idx "This bot is protected by sentinel.tcl by slennox" putidx $idx "Current settings" if {[lsearch -exact $sl_bcflood 0] != -1} { putidx $idx "- Bot CTCP flood: Off" } else { putidx $idx "- Bot CTCP flood: [lindex $sl_bcflood 0] in [lindex $sl_bcflood 1] secs" } if {[lsearch -exact $sl_bmflood 0] != -1} { putidx $idx "- Bot MSG flood: Off" } else { putidx $idx "- Bot MSG flood: [lindex $sl_bmflood 0] in [lindex $sl_bmflood 1] secs" } if {[lsearch -exact $sl_ccflood 0] != -1} { putidx $idx "- Channel CTCP flood: Off" } else { putidx $idx "- Channel CTCP flood: [lindex $sl_ccflood 0] in [lindex $sl_ccflood 1] secs" } if {[lsearch -exact $sl_avflood 0] != -1} { putidx $idx "- Channel AVALANCHE flood: Off" } else { putidx $idx "- Channel AVALANCHE flood: [lindex $sl_avflood 0] in [lindex $sl_avflood 1] secs" } if {[lsearch -exact $sl_avflood 0] != -1 || !$sl_tsunami} { putidx $idx "- Channel TSUNAMI flood: Off" } else { putidx $idx "- Channel TSUNAMI flood: [lindex $sl_avflood 0] in [lindex $sl_avflood 1] secs ($sl_tsunami ctrl codes / line)" } if {[lsearch -exact $sl_txflood 0] != -1} { putidx $idx "- Channel TEXT flood: Off" } else { putidx $idx "- Channel TEXT flood: [lindex $sl_txflood 0] in [lindex $sl_txflood 1] secs" } if {[lsearch -exact $sl_boflood 0] != -1} { putidx $idx "- Channel BOGUS flood: Off" } else { putidx $idx "- Channel BOGUS flood: [lindex $sl_boflood 0] in [lindex $sl_boflood 1] secs" } if {$sl_detectquits} { set detectquits "quit detection ON" } else { set detectquits "quit detection OFF" } if {[lsearch -exact $sl_jflood 0] != -1} { putidx $idx "- Channel JOIN-PART flood: Off" } else { putidx $idx "- Channel JOIN-PART flood: [lindex $sl_jflood 0] in [lindex $sl_jflood 1] secs ($detectquits)" } if {[lsearch -exact $sl_nkflood 0] != -1} { putidx $idx "- Channel NICK flood: Off" } else { putidx $idx "- Channel NICK flood: [lindex $sl_nkflood 0] in [lindex $sl_nkflood 1] secs" } if {!$sl_ilocktime} { putidx $idx "- Channel +i locktime: Indefinite" } else { putidx $idx "- Channel +i locktime: $sl_ilocktime secs" } if {!$sl_mlocktime} { putidx $idx "- Channel +m locktime: Indefinite" } else { putidx $idx "- Channel +m locktime: $sl_mlocktime secs" } if {$sl_shortlock && $sl_ban} { putidx $idx "- Small flood short lock: Active" } else { putidx $idx "- Small flood short lock: Inactive" } if {$sl_ban && $sl_ban < 120} { putidx $idx "- Channel flood bans: $sl_ban mins" } elseif {$sl_ban >= 120} { putidx $idx "- Channel flood bans: [expr $sl_ban / 60] hrs" } else { putidx $idx "- Channel flood bans: Disabled" } if {!$sl_boban || [lsearch -exact $sl_boflood 0] != -1} { putidx $idx "- Bogus username bans: Disabled" } elseif {$sl_boban > 0 && $sl_boban < 120} { putidx $idx "- Bogus username bans: $sl_boban mins" } elseif {$sl_boban >= 120} { putidx $idx "- Bogus username bans: [expr $sl_boban / 60] hrs" } if {$sl_ban || [lsearch -exact $sl_boflood 0] == -1} { if {$sl_globalban} { putidx $idx "- Ban type: Global [sl_masktype nick@host.domain]" } else { putidx $idx "- Ban type: Channel-specific [sl_masktype nick@host.domain]" } } if {$sl_ban || [lsearch -exact $sl_boflood 0] == -1} { putidx $idx "- Maximum bans: $sl_banmax" } if {$sl_igtime > 0 && $sl_igtime < 120} { putidx $idx "- Flooder ignores: $sl_igtime mins" } elseif {$sl_igtime >= 120} { putidx $idx "- Flooder ignores: [expr $sl_igtime / 60] hrs" } else { putidx $idx "- Flooder ignores: Permanent" } if {$sl_ban} { putidx $idx "- Kicks per line: $sl_kicks" } if {!$sl_bfmaxbans} { putidx $idx "- Maximum channel bans: Disabled" } else { putidx $idx "- Maximum channel bans: $sl_bfmaxbans" } if {$sl_note != ""} { putidx $idx "- Flood notification: Notifying [join $sl_note ", "]" } else { putidx $idx "- Flood notification: Off" } if {!$sl_lockcmds} { putidx $idx "- Public lc/uc commands: Disabled" } elseif {$sl_lockcmds == 1} { putidx $idx "- Public lc/uc commands: Enabled (+$sl_lockflags users, ops not required)" } elseif {$sl_lockcmds == 2} { putidx $idx "- Public lc/uc commands: Enabled (+$sl_lockflags users, ops required)" } if {$sl_bxsimul} { putidx $idx "- BitchX simulation: On" } elseif {!$sl_bxsimul} { putidx $idx "- BitchX simulation: Off" } return 0 } if {$sl_bxsimul} { bind raw - 001 sl_bxserverjoin if {![info exists sl_bxonestack]} { set sl_bxonestack 0 } if {![info exists sl_bxversion]} { set sl_bxversion [lindex {75p1+ 75p3+} [rand 2]] } set sl_bxsystem "*IX" ; set sl_bxwhoami $username ; set sl_bxmachine "" catch {set sl_bxsystem [exec uname -s -r]} catch {set sl_bxwhoami [exec id -un]} catch {set sl_bxmachine [exec uname -n]} set sl_bxjointime [unixtime] proc sl_bxserverjoin {from keyword arg} { global sl_bxjointime sl_bxisaway set sl_bxjointime [unixtime] ; set sl_bxisaway 0 return 0 } proc sl_bxaway {} { global sl_bxjointime sl_bxisaway if {!$sl_bxisaway} { puthelp "AWAY :is away: (Auto-Away after 10 mins) \[\002BX\002-MsgLog [lindex {On Off} [rand 2]]\]" set sl_bxisaway 1 } else { puthelp "AWAY" set sl_bxisaway 0 ; set sl_bxjointime [unixtime] } if {![string match *sl_bxaway* [timers]]} { timer [expr [rand 300] + 10] sl_bxaway } return 0 } if {![info exists sl_bxisaway]} { set sl_bxisaway 0 } if {![string match *sl_bxaway* [timers]]} { timer [expr [rand 300] + 10] sl_bxaway } } proc sl_setarray {chan} { global sl_avbanhost sl_avbannick sl_avqueue sl_bfull sl_bobanhost sl_bobannick sl_boqueue sl_ccbanhost sl_ccbannick sl_ccqueue sl_flooded sl_jbanhost sl_jbannick sl_jqueue sl_locked sl_nkbanhost sl_nkflooding sl_nkqueue sl_pbanhost sl_pbannick sl_pqueue sl_txqueue sl_unlocked set chan [string tolower $chan] sl_killutimer "incr sl_*queue($chan) -1" sl_killutimer "sl_*banqueue $chan" sl_killutimer "sl_*queuereset $chan" set sl_flooded($chan) 0 ; set sl_locked($chan) 0 ; set sl_unlocked($chan) [unixtime] set sl_nkflooding($chan) [unixtime] set sl_ccqueue($chan) 0 ; set sl_ccbanhost($chan) "" ; set sl_ccbannick($chan) "" set sl_avqueue($chan) 0 ; set sl_avbanhost($chan) "" ; set sl_avbannick($chan) "" set sl_txqueue($chan) 0 set sl_nkqueue($chan) 0 ; set sl_nkbanhost($chan) "" set sl_boqueue($chan) 0 ; set sl_bobanhost($chan) "" ; set sl_bobannick($chan) "" set sl_jqueue($chan) 0 ; set sl_jbanhost($chan) "" ; set sl_jbannick($chan) "" set sl_pqueue($chan) 0 ; set sl_pbanhost($chan) "" ; set sl_pbannick($chan) "" set sl_bfull($chan) 0 return 0 } proc sl_unsetarray {chan} { global sl_avbanhost sl_avbannick sl_avqueue sl_bfull sl_bobanhost sl_bobannick sl_boqueue sl_ccbanhost sl_ccbannick sl_ccqueue sl_flooded sl_jbanhost sl_jbannick sl_jqueue sl_locked sl_nkbanhost sl_nkflooding sl_nkqueue sl_pbanhost sl_pbannick sl_pqueue sl_txqueue sl_unlocked set chan [string tolower $chan] if {![validchan $chan] && [info exists sl_flooded($chan)]} { unset sl_flooded($chan) sl_locked($chan) sl_unlocked($chan) sl_nkflooding($chan) sl_ccqueue($chan) sl_ccbanhost($chan) sl_ccbannick($chan) sl_avqueue($chan) sl_avbanhost($chan) sl_avbannick($chan) sl_txqueue($chan) sl_nkqueue($chan) sl_nkbanhost($chan) sl_boqueue($chan) sl_bobanhost($chan) sl_bobannick($chan) sl_jqueue($chan) sl_jbanhost($chan) sl_jbannick($chan) sl_pqueue($chan) sl_pbanhost($chan) sl_pbannick($chan) sl_bfull($chan) } return 0 } proc sl_settimer {} { foreach chan [channels] { sl_setarray $chan } return 0 } proc sl_killutimer {cmd} { set n 0 regsub -all -- {\[} $cmd {\[} cmd ; regsub -all -- {\]} $cmd {\]} cmd foreach tmr [utimers] { if {[string match $cmd [join [lindex $tmr 1]]]} { killutimer [lindex $tmr 2] incr n } } return $n } proc sl_masktype {uhost} { global sl_masktype switch -exact -- $sl_masktype { 0 {return *!*[string range $uhost [string first @ $uhost] end]} 1 {return *!*$uhost} 2 {return *!*[lindex [split [maskhost $uhost] "!"] 1]} } return } if {![info exists sl_unlocked] && ![string match *sl_settimer* [utimers]]} { utimer 3 sl_settimer } if {![info exists sl_bflooded]} { set sl_bflooded 0 } if {![info exists sl_bcqueue]} { set sl_bcqueue 0 } if {![info exists sl_bmqueue]} { set sl_bmqueue 0 } if {![info exists sl_nickkick]} { set sl_nickkick 0 } set sl_bcflood [split $sl_bcflood :] ; set sl_bmflood [split $sl_bmflood :] set sl_ccflood [split $sl_ccflood :] ; set sl_avflood [split $sl_avflood :] set sl_txflood [split $sl_txflood :] ; set sl_boflood [split $sl_boflood :] set sl_jflood [split $sl_jflood :] ; set sl_nkflood [split $sl_nkflood :] set sl_note [split $sl_note] if {$sl_ilocktime > 0 && $sl_ilocktime < 30} { set sl_ilocktime 30 } if {$sl_mlocktime > 0 && $sl_mlocktime < 30} { set sl_mlocktime 30 } set trigger-on-ignore 0 if {!${kick-method}} { set sl_kicks 8 } else { set sl_kicks ${kick-method} } if {$numversion <= 1040400} { if {$numversion >= 1032100} { set kick-bogus 0 } if {$numversion >= 1032400} { set ban-bogus 0 } } if {$numversion >= 1032400} { set kick-fun 0 ; set ban-fun 0 } if {$numversion >= 1032500} { set ctcp-mode 0 } if {![string match *sl_txqueuereset* [utimers]] && [lsearch -exact $sl_txflood 0] == -1} { utimer [lindex $sl_txflood 1] sl_txqueuereset } bind pub $sl_lockflags|$sl_lockflags lc sl_lc bind pub $sl_lockflags|$sl_lockflags uc sl_uc bind dcc $sl_lockflags|$sl_lockflags lock sl_dcclc bind dcc $sl_lockflags|$sl_lockflags unlock sl_dccuc if {!$sl_lockcmds} { unbind pub $sl_lockflags|$sl_lockflags lc sl_lc unbind pub $sl_lockflags|$sl_lockflags uc sl_uc rename sl_lc "" rename sl_uc "" } bind dcc m|m sentinel sl_dcc bind raw - NOTICE sl_avflood bind raw - PRIVMSG sl_avflood if {[lsearch -exact $sl_avflood 0] != -1 && [lsearch -exact $sl_txflood 0] != -1} { unbind raw - NOTICE sl_avflood unbind raw - PRIVMSG sl_avflood rename sl_avflood "" } bind ctcp - CLIENTINFO sl_ctcp bind ctcp - USERINFO sl_ctcp bind ctcp - VERSION sl_ctcp bind ctcp - FINGER sl_ctcp bind ctcp - ERRMSG sl_ctcp bind ctcp - ECHO sl_ctcp bind ctcp - INVITE sl_ctcp bind ctcp - WHOAMI sl_ctcp bind ctcp - OP sl_ctcp bind ctcp - OPS sl_ctcp bind ctcp - UNBAN sl_ctcp bind ctcp - PING sl_ctcp bind ctcp - TIME sl_ctcp bind msgm - * sl_bmflood if {[lsearch -exact $sl_bmflood 0] != -1} { unbind msgm - * sl_bmflood rename sl_bmflood "" } bind nick - * sl_nkflood if {[lsearch -exact $sl_nkflood 0] != -1} { unbind nick - * sl_nkflood rename sl_nkflood "" } bind join - * sl_jflood bind part - * sl_pflood bind sign - * sl_pflood if {![info exists sl_detectquits]} { set sl_detectquits 0 } if {!$sl_detectquits} { unbind sign - * sl_pflood } bind kick - * sl_pfloodk bind flud - * sl_flud bind mode - * sl_mode putlog "Loaded sentinel.tcl v2.70 by slennox" return eggdrop-1.10.0/scripts/weed0000775000175000017500000005347414703073435013714 0ustar geogeo#! /bin/sh # This trick is borrowed from Tothwolf's Wolfpack \ # Check for working 'grep -E' before using 'egrep' \ if echo a | (grep -E '(a|b)') >/dev/null 2>&1; \ then \ egrep="grep -E"; \ else \ egrep=egrep; \ fi; \ # Search for tclsh[0-9].[0-9] in each valid dir in PATH \ for dir in $(echo $PATH | sed 's/:/ /g'); \ do \ if test -d $dir; \ then \ files=$(/bin/ls $dir | $egrep '^tclsh[0-9]\.[0-9]$'); \ if test "$files" != ""; \ then \ versions="${versions:+$versions }$(echo $files | sed 's/tclsh//g')"; \ fi; \ fi; \ done; \ for ver in $versions; \ do \ tmpver=$(echo $ver | sed 's/\.//g'); \ if test "$lasttmpver" != ""; \ then \ if test "$tmpver" -gt "$lasttmpver"; \ then \ lastver=$ver; \ lasttmpver=$tmpver; \ fi; \ else \ lastver=$ver; \ lasttmpver=$tmpver; \ fi; \ done; \ exec tclsh$lastver "$0" ${1+"$@"} # # weed out certain undesirables from an eggdrop userlist # try just typing 'tclsh weed' to find out the options # Robey Pointer, November 1994 # # : # I did a few bug fixes to the original weed script, things changed... # # when specifying other weed options they would unset the User() field and # a maxlast weed would try and weed again and cause the script to stop due # to User() being already unset (array nonexistent) # # when loadUserFile encountered an xtra field it would try and use the $info # variable, which was supposed to be $xtra (something overlooked when the # line was cut and pasted -- I hate it when that happens) # # changed the formatting of the saved weed file to match more closely to # eggdrop 0.9tp (so this may cause incompatibilities), but when a hostmask # field exactly matched 40 characters it would save it with no spaces after # it and eggdrop would reject the user record. I know I could have easily # changed one character, but I couldn't help myself. # 5 march 1996 # # : # upgrade for v2 userfiles # : # fixed xtra field from getting truncated # : # stopped it from mangling channel ban lists # : # upgrade for v3 userfiles # : # added an option to remove users from unwanted channels # : # upgrade for v4 userfiles, with v3 converter # : # fixed bug "list element in braces followed by X instead of space" # (the use of "lrange" where you aren't sure if it's a list is bad) # fixed --CONSOLE item not being included, creating "user" --CONSOLE # : # two more improper occurrences of "lrange" removed # : # removed ancient way of determining the current time. # : # [clock] isn't in all versions of Tcl... # : # borrowed code from Tothwolf's Wolfpack to find tclsh better # set exempt {*ban *ignore} set exemptops 0 ; set exemptmasters 0 ; set exemptfriends 0 set exemptparty 0 ; set exemptfile 0 ; set exemptchanm 0 set exemptbotm 0 ; set exemptchann 0 ; set exemptchanf 0 set exemptchano 0 set maxlast 0 ; set maxban 0 ; set maxignore 0 set weedops 0 ; set weedmasters 0 ; set weednopw 0 set stripops 0 ; set stripmasters 0 ; set weedlurkers 0 set chanrem {} set convert 0 if {![string compare "" [info commands clock]]} then { set fd [open "/tmp/egg.timer." w] close $fd set CURRENT [file atime "/tmp/egg.timer."] exec rm -f /tmp/egg.timer. } else { set CURRENT [clock seconds] } if {$argc < 1} { puts stdout "\nUsage: weed \[options\]" puts stdout " (weeds out users from an eggdrop userlist)" puts stdout "Output goes to .weed" puts stdout "Possible options:" puts stdout " - exempt this user from weeding" puts stdout " ^o ^m ^f exempt ops or masters or friends" puts stdout " ^co ^cm ^cf exempt chanops or chanmasters or chanfriends" puts stdout " ^cn exempt chanowner" puts stdout " ^p ^x exempt party-line or file-area users" puts stdout " ^b exempt botnet master" puts stdout " + weed: haven't been seen in N days" puts stdout " :n weed: haven't EVER been seen" puts stdout " :o :m weed: ops or masters with no password set" puts stdout " :a weed: anyone with no password set" puts stdout " o m unop/unmaster: ops or masters with no pass." puts stdout " b weed: bans not used in N days" puts stdout " i weed: ignores created over N days ago" puts stdout " = weed: channels no longer supported" puts stdout " c convert v3 eggdrop userfile" puts stdout "" exit } puts stdout "\nWEED 18jun97, robey\n" set filename [lindex $argv 0] for {set i 1} {$i < $argc} {incr i} { set carg [lindex $argv $i] if {$carg == ":n"} { set weedlurkers 1 } elseif {$carg == ":o"} { set weedops 1 ; set stripops 0 ; set weednopw 0 } elseif {$carg == ":m"} { set weedmasters 1 ; set stripmasters 0 ; set weednopw 0 } elseif {$carg == ":a"} { set weednopw 1 ; set weedops 0 ; set weedmasters 0 set stripops 0 ; set stripmasters 0 } elseif {$carg == "o"} { set stripops 1 ; set weedops 0 ; set weednopw 0 } elseif {$carg == "m"} { set stripmasters 1 ; set weedmasters 0 ; set weednopw 0 } elseif {$carg == "^m"} { set exemptmasters 1 } elseif {$carg == "^o"} { set exemptops 1 } elseif {$carg == "^f"} { set exemptfriends 1 } elseif {$carg == "^p"} { set exemptparty 1 } elseif {$carg == "^x"} { set exemptfile 1 } elseif {$carg == "^cf"} { set exemptchanf 1 } elseif {$carg == "^cm"} { set exemptchanm 1 } elseif {$carg == "^cn"} { set exemptchann 1 } elseif {$carg == "^b"} { set exemptbotm 1 } elseif {$carg == "^co"} { set exemptchano 1 } elseif {$carg == "c"} { set convert 1 } elseif {[string index $carg 0] == "-"} { lappend exempt [string range $carg 1 end] } elseif {[string index $carg 0] == "+"} { set maxlast [expr 60*60*24* [string range $carg 1 end]] } elseif {[string index $carg 0] == "b"} { set maxban [expr 60*60*24* [string range $carg 1 end]] } elseif {[string index $carg 0] == "i"} { set maxignore [expr 60*60*24* [string range $carg 1 end]] } elseif {[string index $carg 0] == "="} { lappend chanrem [string tolower [string range $carg 1 end]] } else { puts stderr "UNKNOWN OPTION: '$carg'\n" exit } } if {(!$weedlurkers) && (!$weedops) && (!$weedmasters) && (!$weednopw) && (!$stripops) && (!$stripmasters) && ($maxlast == 0) && ($convert == 0) && ($maxban == 0) && ($maxignore == 0) && ($chanrem == {})} { puts stderr "PROBLEM: You didn't specify anything to weed out.\n" exit } set weeding { } ; set strip { } ; set exempting { } if {$weedlurkers} { lappend weeding "lurkers" } if {$weedops} { lappend weeding "pwdless-ops" } if {$weedmasters} { lappend weeding "pwdless-masters" } if {$weednopw} { lappend weeding "pwdless-users" } if {$chanrem != {}} { lappend weeding "unwanted-channel" } if {$maxlast > 0} { lappend weeding ">[expr $maxlast /(60*60*24)]-days" } if {$maxban > 0} { lappend weeding "bans>[expr $maxban /(60*60*24)]-days" } if {$maxignore > 0} { lappend weeding "ign>[expr $maxignore /(60*60*24)]-days" } if {$weeding != { }} { puts stdout "Weeding:$weeding" } if {$stripops} { lappend strip "pwdless-ops" } if {$stripmasters} { lappend strip "pwdless-masters" } if {$strip != { }} { puts stdout "Stripping:$strip" } if {$exemptops} { lappend exempting "(ops)" } if {$exemptmasters} { lappend exempting "(masters)" } if {$exemptfriends} { lappend exempting "(friends)" } if {$exemptparty} { lappend exempting "(party-line)" } if {$exemptfile} { lappend exempting "(file-area)" } if {$exemptchann} { lappend exempting "(channel-owners)" } if {$exemptchanm} { lappend exempting "(channel-masters)" } if {$exemptchano} { lappend exempting "(channel-ops)" } if {$exemptchanf} { lappend exempting "(channel-friends)" } if {$exemptbotm} { lappend exempting "(botnet masters)" } if {[llength $exempt]>2} { lappend exempting "[lrange $exempt 2 end]" } if {$exempting != { }} { puts stdout "Exempt:$exempting" } puts stdout "\nReading $filename ..." proc convertUserFile {fname} { global User Hostmask Channel Botflag LastOn BotAddr Xtra convert puts stdout "\nRunning Converter on $fname" set oldhandle {} if {[catch {set fd [open $fname r]}] != 0} { return 0 } set line [string trim [gets $fd]] if {[string range $line 1 2] == "3v"} { set convert 1 } elseif {[string range $line 1 2] == "4v"} { return 0 } while {![eof $fd]} { set line [string trim [gets $fd]] if {([string index $line 0] != "#") && ([string length $line] > 0)} { scan $line "%s" handle if {$handle == "-"} { # hostmask set hmList [split [string range $line 2 end] ,] for {set i 0} {$i < [llength $hmList]} {incr i} { lappend Hostmask($oldhandle) [string trim [lindex $hmList $i]] } } elseif {$handle == "!"} { # channel set chList [string trim [string range $line 1 end]] lappend Channel($oldhandle) "[lrange $chList 0 1] [string trim [lindex $chList end] 0123456789]" } elseif {$handle == "*"} { # dccdir set dccdir [string trim [string range $line 2 end]] set User($oldhandle) [lreplace $User($oldhandle) 2 2 $dccdir] } elseif {$handle == "+"} { # email set email [string trim [string range $line 2 end]] set User($oldhandle) [lreplace $User($oldhandle) 3 3 $email] } elseif {$handle == "="} { # comment set comment [string trim [string range $line 2 end]] set User($oldhandle) [lreplace $User($oldhandle) 4 4 $comment] } elseif {$handle == ":"} { # user info line / bot addresses if {[lsearch [split [lindex $User($oldhandle) 0] ""] b] == -1} { set info [string trim [string range $line 1 end]] set User($oldhandle) [lreplace $User($oldhandle) 5 5 $info] } else { set BotAddr($oldhandle) [string trim [string range $line 1 end]] } } elseif {$handle == "."} { # xtra field start if {![info exists xtraList($oldhandle)]} { set xtraList($oldhandle) [string trim [string range $line 1 end]] } { set xtraList($oldhandle) "$xtraList($oldhandle) [string trim [string range $line 1 end]]" } } elseif {$handle == "!!"} { # laston set LastOn($oldhandle) [lindex $line 1] } else { # finish up xtra field first if {[info exists xtraList($oldhandle)]} { for {set i 0} {$i < [llength $xtraList($oldhandle)]} {incr i} { lappend Xtra($oldhandle) [string trim [lindex $xtraList($oldhandle) $i] \{] } } # begin of new user scan $line "%s %s %s %s" handle pass attr ts if {$convert == 1 && $attr != ""} { regsub -all {B} $attr {t} attr set botflags "s h a l r" ; set Botflag($handle) "" set nattr [split [string trim $attr 0123456789] ""] ; set attr "" foreach flag $botflags { if {[lsearch -exact $nattr $flag] != -1} {append Botflag($handle) $flag} } foreach flag $nattr { if {[lsearch -exact $botflags $flag] == -1} {append attr $flag} } } set User($handle) [list $attr $pass {} {} {} {}] set Hostmask($handle) {} set Channel($handle) {} set oldhandle $handle } } } return 1 } proc loadUserFile {fname} { global User Hostmask Channel Botflag LastOn BotAddr Xtra set oldhandle {} if {[catch {set fd [open $fname r]}] != 0} { return 0 } set line [string trim [gets $fd]] if {[string range $line 1 2] != "4v"} { if {[string range $line 1 2] == "3v"} { convertUserFile $fname return 1 } else { puts stderr "Unknown userfile version! (not v4)\n" exit } } while {![eof $fd]} { set line [string trim [gets $fd]] if {([string index $line 0] != "#") && ([string length $line] > 0)} { scan $line "%s" handle if {$handle == "--HOSTS"} { # hostmask set hmList [lindex $line 1] lappend Hostmask($oldhandle) [string trim $hmList] } elseif {$handle == "-"} { # hostmask set hmList [join [lrange $line 1 end]] lappend Hostmask($oldhandle) [string trim $hmList] } elseif {$handle == "!"} { # channel set chList [string trim [string range $line 1 end]] lappend Channel($oldhandle) $chList } elseif {$handle == "--BOTADDR"} { # botaddr set BotAddr($oldhandle) [lindex $line 1] } elseif {$handle == "--PASS"} { # pass set pass [string trim [string range $line [expr [string first " " $line] + 1] end]] set User($oldhandle) [lreplace $User($oldhandle) 1 1 $pass] } elseif {$handle == "--DCCDIR"} { # dccdir set first [string first " " $line] if {$first != -1} { set dccdir [string trim [string range $line [expr $first + 1] end]] } { set dccdir "" } set User($oldhandle) [lreplace $User($oldhandle) 2 2 $dccdir] } elseif {$handle == "--COMMENT"} { # comment set first [string first " " $line] if {$first != -1} { set comment [string trim [string range $line [expr $first + 1] end]] } { set comment "" } set User($oldhandle) [lreplace $User($oldhandle) 4 4 $comment] } elseif {$handle == "--INFO"} { # user info line set first [string first " " $line] if {$first != -1} { set info [string trim [string range $line [expr $first + 1] end]] } { set info "" } set User($oldhandle) [lreplace $User($oldhandle) 5 5 $info] } elseif {$handle == "--CONSOLE"} { # console set first [string first " " $line] if {$first != -1} { set console [string trim [string range $line [expr $first + 1] end]] } { set console "" } set User($oldhandle) [lreplace $User($oldhandle) 6 6 $console] } elseif {$handle == "--XTRA"} { # xtra field set first [string first " " $line] if {$first != -1} { set xtraList [string trim [string range $line [expr $first + 1] end]] } { set xtraList "" } lappend Xtra($oldhandle) $xtraList } elseif {$handle == "--LASTON"} { # laston set LastOn($oldhandle) [lindex $line 1] } elseif {$handle == "--BOTFL"} { # botflags set Botflag($oldhandle) [string trim [string range $line 1 end]] } else { # begin of new user scan $line "%s %s %s" handle dash attr set User($handle) [list $attr {} {} {} {} {} {}] set Hostmask($handle) {} set Channel($handle) {} set oldhandle $handle } } } return 1 } proc saveUserFile fname { global User Hostmask Channel Botflag LastOn BotAddr Xtra if {[catch {set fd [open $fname w]}] != 0} { return 0 } puts $fd "#4v: weed! now go away." foreach i [array names User] { set hmask "none" set hmloop 0 ; set chloop 0 ; set loloop 0 ; set xloop 0 ; set aloop 0 if {[lindex $User($i) 1] == "bans"} {set plug "bans"} {set plug "-"} set attr [lindex $User($i) 0] set ts [lindex $User($i) 2] puts $fd [format "%-9s %-20s %-24s" $i $plug $attr] for {} {$hmloop < [llength $Hostmask($i)]} {incr hmloop} { if {[string index $i 0] == "*" || [string range $i 0 1] == "::"} { set hmask [lindex $Hostmask($i) $hmloop] regsub -all {~} $hmask { } hmask puts $fd "- $hmask" } else { puts $fd "--HOSTS [lindex $Hostmask($i) $hmloop]" } } if {[info exists BotAddr($i)]} { puts $fd "--BOTADDR [lindex $BotAddr($i) 0]" } if {[info exists Xtra($i)]} { for {} {$xloop < [llength $Xtra($i)]} {incr xloop} { puts $fd "--XTRA [lindex $Xtra($i) $xloop]" } } if {[info exists Channel($i)]} { for {} {$chloop < [llength $Channel($i)]} {incr chloop} { puts $fd "! [lindex $Channel($i) $chloop]" } } if {[info exists Botflag($i)]} { if {$Botflag($i) != ""} { puts $fd "--BOTFL [lindex $Botflag($i) 0]" } } if {[string index $i 0] == "*" || [string range $i 0 1] == "::"} { set User($i) [lreplace $User($i) 1 1 {}] } if {[lindex $User($i) 1] != {}} { puts $fd "--PASS [lindex $User($i) 1]" } if {[lindex $User($i) 2] != {}} { puts $fd "--DCCDIR [lindex $User($i) 2]" } if {[lindex $User($i) 3] != {}} { puts $fd "--XTRA EMAIL [lindex $User($i) 3]" } if {[lindex $User($i) 4] != {}} { puts $fd "--COMMENT [lindex $User($i) 4]" } if {[lindex $User($i) 5] != {}} { puts $fd "--INFO [lindex $User($i) 5]" } if {[lindex $User($i) 6] != {}} { puts $fd "--CONSOLE [lindex $User($i) 6]" } if {[info exists LastOn($i)]} { puts $fd "--LASTON [lindex $LastOn($i) 0]" } } close $fd return 1 } if {![loadUserFile $filename]} { puts stdout "* Couldn't load userfile!\n" exit } if {$convert == 0} { puts stdout "Loaded. Weeding..." puts stdout "(pwd = no pass, -o/-m = removed op/master, lrk = never seen, exp = expired)" puts stdout "(uwc = unwanted channel)\n" } else { puts stdout "Loaded. Converting..." } set total 0 set weeded 0 foreach i [array names User] { incr total set attr [lindex $User($i) 0] set chanattr [lindex [lindex $Channel($i) 0] 2] if {([lsearch -exact $exempt $i] == -1) && ([string range $i 0 1] != "::") && ([string range $i 0 1] != "--") && (([string first o $attr] == -1) || (!$exemptops)) && (([string first m $attr] == -1) || (!$exemptmasters)) && (([string first f $attr] == -1) || (!$exemptfriends)) && (([string first p $attr] == -1) || (!$exemptparty)) && (([string first x $attr] == -1) || (!$exemptfile)) && (([string first t $attr] == -1) || (!$exemptbotm)) && (([string first f $chanattr] == -1) || (!$exemptchanf)) && (([string first m $chanattr] == -1) || (!$exemptchanm)) && (([string first n $chanattr] == -1) || (!$exemptchann)) && (([string first o $chanattr] == -1) || (!$exemptchano))} { set pass [lindex $User($i) 1] if {[info exists LastOn($i)]} { set ts [lindex $LastOn($i) 0] } { set ts 0 } if {([string compare $pass "-"] == 0) && ([string first b $attr] == -1)} { if {$weednopw == 1} { unset User($i) ; incr weeded puts -nonewline stdout "[format "pwd: %-10s " $i]" } elseif {([string first o $attr] != -1) && ($weedops == 1)} { unset User($i) ; incr weeded puts -nonewline stdout "[format "pwd: %-10s " $i]" } elseif {([string first m $attr] != -1) && ($weedmasters == 1)} { unset User($i) ; incr weeded puts -nonewline stdout "[format "pwd: %-10s " $i]" } if {([string first o $attr] != -1) && ($stripops == 1)} { set nattr {} for {set x 0} {$x < [string length $attr]} {incr x} { if {[string index $attr $x] != "o"} { set nattr [format "%s%s" $nattr [string index $attr $x]] } } if {$nattr == {}} { set nattr "-" } set User($i) [lreplace $User($i) 0 0 $nattr] puts -nonewline stdout "[format " -o: %-10s " $i]" } if {([string first m $attr] != -1) && ($stripmasters == 1)} { set nattr {} for {set x 0} {$x < [string length $attr]} {incr x} { if {[string index $attr $x] != "m"} { set nattr [format "%s%s" $nattr [string index $attr $x]] } } if {$nattr == {}} { set nattr "-" } set User($i) [lreplace $User($i) 0 0 $nattr] puts -nonewline stdout "[format " -m: %-10s " $i]" } } if {($ts==0) && ($weedlurkers==1) && ([string first b $attr] == -1) && [info exists User($i)]} { unset User($i) ; incr weeded puts -nonewline stdout "[format "lrk: %-10s " $i]" } if {($ts > 0) && ($maxlast > 0) && ($CURRENT-$ts > $maxlast && [info exists User($i)])} { unset User($i) ; incr weeded puts -nonewline stdout "[format "exp: %-10s " $i]" } if {$chanrem != {} && [info exists Channel($i)]} { foreach unchan $chanrem { set id [lsearch [string tolower $Channel($i)] *$unchan*] if {$id != -1} { set Channel($i) [lreplace $Channel($i) $id $id] ; incr weeded puts -nonewline stdout "[format "uwc: %-10s " $i]" } } } } flush stdout } if {$weeded == 0 && $convert == 0} { puts -nonewline stdout "uNF... Nothing to weed!" } puts stdout "\n" foreach i [array names User] { if {([string range $i 0 1] == "::") || ($i == "*ban")} { for {set j 0} {$j < [llength $Hostmask($i)]} {incr j} { set ban [split [lindex $Hostmask($i) $j] :] if {[string range [lindex $ban 2] 0 0] == "+"} { set lastused [lindex $ban 3] if {($maxban > 0) && ($CURRENT-$lastused > $maxban)} { if {$i == "*ban"} { puts stdout "Expired ban: [lindex $ban 0]" } { puts stdout "Expired ban on [string range $i 2 end]: [lindex $ban 0]" } set Hostmask($i) [lreplace $Hostmask($i) $j $j] incr j -1 } } } } if {$i == "*ignore"} { for {set j 0} {$j < [llength $Hostmask($i)]} {incr j} { set ign [split [lindex $Hostmask($i) $j] :] set lastused [lindex $ign 3] if {($maxignore > 0) && ($CURRENT-$lastused > $maxignore)} { puts stdout "Expired ignore: [lindex $ign 0]" set Hostmask($i) [lreplace $Hostmask($i) $j $j] incr j -1 } } } } puts stdout "\nFinished scan." puts stdout "Original total ($total), new total ([expr $total-$weeded]), zapped ($weeded)" if {![saveUserFile $filename.weed]} { puts stdout "* uNF... Couldn't save new userfile!\n" exit } puts stdout "Wrote $filename.weed" eggdrop-1.10.0/scripts/dccwhois.tcl0000664000175000017500000001152414703073435015337 0ustar geogeo############################################################################### ## ## dccwhois.tcl - Enhanced '.whois' dcc command for Eggdrop ## Copyright (C) 2009 Tothwolf ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ############################################################################### ## ## Description: ## ## This script enhances Eggdrop's built-in dcc '.whois' command to allow all ## users to '.whois' their own handle. ## ## Users without the correct flags who attempt to '.whois' other users will ## instead see the message: "You do not have access to whois handles other ## than your own." ## ## To load this script, add a source command to your bot's config file: ## ## source scripts/dccwhois.tcl ## ## This script stores and checks against the flags that are used for ## Eggdrop's built-in dcc '.whois' command at load time. If you wish to use ## flags other than the default "to|o", etc, you should unbind and rebind ## the built-in '.whois' command in your bot's config file before loading ## this script. ## ## Example of how to rebind Eggdrop's built-in '.whois' command: ## ## unbind dcc to|o whois *dcc:whois ## bind dcc to|m whois *dcc:whois ## ## Note: if you modify the default flags for '.whois' you may also wish to ## modify the defaults for '.match'. ## ############################################################################### ## ## This script has no settings and does not require any configuration. ## You should not need to edit anything below. ## ############################################################################### # This script should not be used with Eggdrop versions 1.6.16 - 1.6.19. catch {set numversion} if {([info exists numversion]) && ($numversion >= 1061600) && ($numversion <= 1061900)} then { putlog "Error: dccwhois.tcl is not compatible with Eggdrop version [lindex $version 0]. Please upgrade to 1.6.20 or later." return } # # dcc:whois -- # # Wrapper proc command for Eggdrop's built-in *dcc:whois # # Arguments: # hand - handle of user who used this command # idx - dcc idx of user who used this command # arg - arguments passed to this command # # Results: # Calls Eggdrop's built-in *dcc:whois with the given arguments if user has # access, otherwise tells the user they don't have access. # proc dcc:whois {hand idx arg} { global dccwhois_flags set who [lindex [split $arg] 0] # Did user gave a handle other than their own? if {([string compare "" $who]) && ([string compare [string toupper $hand] [string toupper $who]])} then { # Get user's current .console channel; check the same way Eggdrop does. set chan [lindex [console $idx] 0] # User isn't allowed to '.whois' handles other than their own. if {![matchattr $hand $dccwhois_flags $chan]} then { putdcc $idx "You do not have access to whois handles other than your own." return 0 } } # Call built-in whois command. *dcc:whois $hand $idx $arg # Return 0 so we don't log command twice. return 0 } # # init_dccwhois -- # # Initialize dccwhois script-specific code when script is loaded # # Arguments: # (none) # # Results: # Set up command bindings and store command access flags. # proc init_dccwhois {} { global dccwhois_flags putlog "Loading dccwhois.tcl..." # Sanity check... if {[array exists dccwhois_flags]} then { array unset dccwhois_flags } # Search binds for built-in '*dcc:whois' and loop over each bind in list foreach bind [binds "\\*dcc:whois"] { # dcc to|o whois 0 *dcc:whois foreach {type flags name count command} $bind {break} # We only want to unbind dcc '.whois' if {[string compare $name "whois"]} then { continue } # Store $flags so we can reuse them later set dccwhois_flags $flags # Unbind built-in *dcc:whois unbind $type $flags $name $command } # Make sure $dccwhois_flags exists and isn't empty, # otherwise set to Eggdrop's default "to|o" if {(![info exists dccwhois_flags]) || (![string compare "" $dccwhois_flags])} then { set dccwhois_flags "to|o" } # Add bind for dcc:whois wrapper proc bind dcc -|- whois dcc:whois putlog "Loaded dccwhois.tcl" return } init_dccwhois eggdrop-1.10.0/scripts/alltools.tcl0000664000175000017500000002104014703073435015357 0ustar geogeo# # All-Tools TCL, includes toolbox.tcl, toolkit.tcl and moretools.tcl # toolbox was originally authored by cmwagner # toolkit was originally authored by Robey Pointer # moretools was originally authored by David Sesno # modified for 1.3.0 bots by TG # # Copyright (C) 1999, 2003 - 2010 Eggheads Development Team # # Tothwolf 02May1999: rewritten and updated # guppy 02May1999: updated even more # Tothwolf 02May1999: fixed what guppy broke and updated again # Tothwolf 24/25May1999: more changes # rtc 20Sep1999: added isnumber, changes # dw 20Sep1999: use regexp for isnumber checking # Tothwolf 06Oct1999: optimized completely # krbb 09Jun2000: added missing return to randstring # Tothwolf 18Jun2000: added ispermowner # Sup 02Apr2001: added matchbotattr # Tothwolf 13Jun2001: updated/modified several commands # Hanno 28Sep2001: fixed testip # guppy 03Mar2002: optimized # Souperman 05Nov2002: added ordnumber # Tothwolf 27Dec2003: added matchbotattrany, optimized ordnumber, # more minor changes # ######################################## # # Descriptions of available commands: # ## ## (toolkit): ## # # putmsg # send a privmsg to the given nick or channel # # putchan # send a privmsg to the given nick or channel # (for compat only, this is the same as 'putmsg' above) # # putnotc # send a notice to the given nick or channel # # putact # send an action to the given nick or channel # # ## ## (toolbox): ## # # strlwr # string tolower # # strupr # string toupper # # strcmp # string compare # # stricmp # string compare (case insensitive) # # strlen # string length # # stridx # string index # # iscommand # if the given command exists, return 1 # else return 0 # # timerexists # if the given command is scheduled by a timer, return its timer id # else return empty string # # utimerexists # if the given command is scheduled by a utimer, return its utimer id # else return empty string # # inchain # if the given bot is connected to the botnet, return 1 # else return 0 # (for compat only, same as 'islinked') # # randstring # returns a random string of the given length # # putdccall # send the given text to all dcc users # # putdccbut # send the given text to all dcc users except for the given idx # # killdccall # kill all dcc user connections # # killdccbut # kill all dcc user connections except for the given idx # # ## ## (moretools): ## # # iso # if the given nick has +o access on the given channel, return 1 # else return 0 # # realtime [format] # 'time' returns the current time in 24 hour format '14:15' # 'date' returns the current date in the format '21 Dec 1994' # not specifying any format will return the current time in # 12 hour format '1:15 am' # # testip # if the given ip is valid, return 1 # else return 0 # # number_to_number # if the given number is between 1 and 15, return its text representation # else return the number given # # ## ## (other commands): ## # # isnumber # if the given string is a valid number, return 1 # else return 0 # # ispermowner # if the given handle is a permanent owner, return 1 # else return 0 # # matchbotattr # if the given bot has all the given flags, return 1 # else return 0 # # matchbotattrany # if the given bot has any the given flags, return 1 # else return 0 # # ordnumber # if the given string is a number, returns the # "ordinal" version of that number, i.e. 1 -> "1st", # 2 -> "2nd", 3 -> "3rd", 4 -> "4th", etc. # else return # ######################################## # So scripts can see if allt is loaded. set alltools_loaded 1 set allt_version 206 # For backward compatibility. set toolbox_revision 1007 set toolbox_loaded 1 set toolkit_loaded 1 # # toolbox: # proc putmsg {dest text} { puthelp "PRIVMSG $dest :$text" } proc putchan {dest text} { puthelp "PRIVMSG $dest :$text" } proc putnotc {dest text} { puthelp "NOTICE $dest :$text" } proc putact {dest text} { puthelp "PRIVMSG $dest :\001ACTION $text\001" } # # toolkit: # proc strlwr {string} { string tolower $string } proc strupr {string} { string toupper $string } proc strcmp {string1 string2} { string compare $string1 $string2 } proc stricmp {string1 string2} { string compare [string tolower $string1] [string tolower $string2] } proc strlen {string} { string length $string } proc stridx {string index} { string index $string $index } proc iscommand {command} { if {[string compare "" [info commands $command]]} then { return 1 } return 0 } proc timerexists {command} { foreach i [timers] { if {![string compare $command [lindex $i 1]]} then { return [lindex $i 2] } } return } proc utimerexists {command} { foreach i [utimers] { if {![string compare $command [lindex $i 1]]} then { return [lindex $i 2] } } return } proc inchain {bot} { islinked $bot } proc randstring {length {chars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789}} { if {([string compare "" $length]) && \ (![regexp \[^0-9\] $length])} then { set count [string length $chars] if {$count} then { for {set index 0} {$index < $length} {incr index} { append result [string index $chars [rand $count]] } } else { error "empty character string" } } else { error "invalid random string length" } return $result } proc putdccall {text} { foreach i [dcclist CHAT] { putdcc [lindex $i 0] $text } } proc putdccbut {idx text} { foreach i [dcclist CHAT] { set j [lindex $i 0] if {$j != $idx} then { putdcc $j $text } } } proc killdccall {} { foreach i [dcclist CHAT] { killdcc [lindex $i 0] } } proc killdccbut {idx} { foreach i [dcclist CHAT] { set j [lindex $i 0] if {$j != $idx} then { killdcc $j } } } # # moretools: # proc iso {nick chan} { matchattr [nick2hand $nick $chan] o|o $chan } proc realtime {args} { switch -exact -- [lindex $args 0] { time { return [strftime %H:%M] } date { return [strftime "%d %b %Y"] } default { return [strftime "%I:%M %P"] } } } proc testip {ip} { set tmp [split $ip .] if {[llength $tmp] != 4} then { return 0 } set index 0 foreach i $tmp { if {(([regexp \[^0-9\] $i]) || ([string length $i] > 3) || \ (($index == 3) && (($i > 254) || ($i < 1))) || \ (($index <= 2) && (($i > 255) || ($i < 0))))} then { return 0 } incr index } return 1 } proc number_to_number {number} { switch -exact -- $number { 0 { return Zero } 1 { return One } 2 { return Two } 3 { return Three } 4 { return Four } 5 { return Five } 6 { return Six } 7 { return Seven } 8 { return Eight } 9 { return Nine } 10 { return Ten } 11 { return Eleven } 12 { return Twelve } 13 { return Thirteen } 14 { return Fourteen } 15 { return Fifteen } default { return $number } } } # # other commands: # proc isnumber {string} { if {([string compare "" $string]) && \ (![regexp \[^0-9\] $string])} then { return 1 } return 0 } proc ispermowner {hand} { global owner if {([matchattr $hand n]) && \ ([lsearch -exact [split [string tolower $owner] ", "] \ [string tolower $hand]] != -1)} then { return 1 } return 0 } proc matchbotattr {bot flags} { foreach flag [split $flags ""] { if {[lsearch -exact [split [botattr $bot] ""] $flag] == -1} then { return 0 } } return 1 } proc matchbotattrany {bot flags} { foreach flag [split $flags ""] { if {[string first $flag [botattr $bot]] != -1} then { return 1 } } return 0 } proc ordnumber {string} { if {[isnumber $string]} then { set last [string index $string end] if {[string index $string [expr [string length $string] - 2]] != 1} then { if {$last == 1} then { return ${string}st } elseif {$last == 2} then { return ${string}nd } elseif {$last == 3} then { return ${string}rd } } return ${string}th } return $string } eggdrop-1.10.0/scripts/Makefile.in0000664000175000017500000000416314703073435015076 0ustar geogeo# Makefile for scripts/ SHELL = @SHELL@ top_srcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ @SET_MAKE@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ DOCS = CONTENTS SCRIPTS = action.fix.tcl alltools.tcl compat.tcl dccwhois.tcl getops.tcl \ klined.tcl notes2.tcl ques5.tcl sentinel.tcl userinfo.tcl cmd_resolve.tcl \ quotepong.tcl autoscripts.tcl EXESCRIPTS = autobotchk botchk weed doofus: @echo "" @echo "Let's try this from the right directory..." @echo "" @cd .. && $(MAKE) all: $(DOCS) $(SCRIPTS) $(EXESCRIPTS) clean: @rm -f *~ install: @if test ! -d $(DEST)/scripts; then \ echo "Creating 'scripts' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/scripts >/dev/null; \ echo "Copying scripts."; \ for i in $(DOCS); do \ $(INSTALL_DATA) $(srcdir)/$$i $(DEST)/scripts/; \ done; \ for i in $(SCRIPTS); do \ $(INSTALL_DATA) $(srcdir)/$$i $(DEST)/scripts/; \ done; \ for i in $(EXESCRIPTS); do \ $(INSTALL_SCRIPT) $(srcdir)/$$i $(DEST)/scripts/; \ done; \ if test ! "x`echo $(srcdir)/help/*.help`" = "x$(srcdir)/help/*.help"; then \ if test ! -d $(DEST)/help; then \ echo "Creating 'help' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/help >/dev/null; \ fi; \ for i in $(srcdir)/help/*.help; do \ $(INSTALL_DATA) $$i $(DEST)/help/; \ done; \ fi; \ if test ! "x`echo $(srcdir)/help/msg/*.help`" = "x$(srcdir)/help/msg/*.help"; then \ if test ! -d $(DEST)/help/msg; then \ echo "Creating 'help/msg' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/help/msg >/dev/null; \ fi; \ for i in $(srcdir)/help/msg/*.help; do \ $(INSTALL_DATA) $$i $(DEST)/help/msg/; \ done; \ fi; \ if test ! "x`echo $(srcdir)/help/set/*.help`" = "x$(srcdir)/help/set/*.help"; then \ if test ! -d $(DEST)/help/set; then \ echo "Creating 'help/set' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/help/set >/dev/null; \ fi; \ for i in $(srcdir)/help/set/*.help; do \ $(INSTALL_DATA) $$i $(DEST)/help/set/; \ done; \ fi; \ fi #safety hash eggdrop-1.10.0/scripts/autoscripts.tcl0000664000175000017500000005126414703073435016121 0ustar geogeoset pkgs {"json" "json::write" "http" "tls"} foreach pkg $pkgs { if {[catch {package require $pkg}]} { putlog "$pkg is not installed. Autoscripts cannot load" putlog "$pkg can be installed via your host's command line package manager" return 1 } } set asidx 0 set eggdir "autoscripts" set cmdtxt "\nEnter your command ('done' to return to partyline):" set jsondict [dict create] set asmajor 1 set asminor 0 bind DCC n autoscript asconsole proc asconsole {hand idx arg} { global echostatus global oldchan global asidx set oldchan [getchan $idx] set echostatus [echo $idx] set asidx $idx setchan $idx 469 echo $idx 0 bind FILT n * parse_egg bind evnt n prerehash {egg_done $asidx} putdcc $idx " _ _ _ _ " putdcc $idx " /_\\ _ _| |_ ___ ___ ___ _ __(_)_ __ | |_ " putdcc $idx " //_\\\\| | | | __/ _ \\/ __|/ __| '__| | '_ \\| __|" putdcc $idx "/ _ \\ |_| | || (_) \\__ \\ (__| | | | |_) | |_ " putdcc $idx "\\_/ \\_/\\__,_|\\__\\___/|___/\\___|_| |_| .__/ \\__|" putdcc $idx " |_| " putdcc $idx "=======================================================\n" putdcc $idx "Welcome to the autoscript console. Enter your command: " } #Read all JSON script files proc readjsonfile {} { global jsondict global eggdir set jsonlist {} ### How to get filepath properly foreach dirname [glob -nocomplain -type d -directory $eggdir *] { if {![file exists $dirname/manifest.json]} { file delete -force $dirname putlog "$dirname missing manifest.json, deleting" } else { set fs [open $dirname/manifest.json r] set contents [read $fs] set jcontents [json::json2dict $contents] if {[dict exists $jcontents schema]} { if {![string equal [dict get $jcontents schema] "1"]} { putlog "$dirname contains invalid manifest.json format, skipping..." continue } } lappend jsonlist $contents close $fs } } set jsondict [json::json2dict "\[[join $jsonlist {,}]\]"] } # Write a script's JSON content to file proc write_json {script jstring} { global eggdir set fs [open $eggdir/${script}/manifest.json w] puts $fs $jstring close $fs } # Send an HTTP request. Type 0 for text, 1 for binary proc send_http {url type} { global eggdir http::register https 443 [list ::tls::socket -autoservername true] set req [http::config -useragent "eggdrop"] if {$type} { set fs [open $eggdir/[lindex [split $url /] end] w] catch {set req [http::geturl $url -binary 1 -channel $fs]} error close $fs } else { catch {set req [http::geturl $url -headers [dict create "User-Agent" "Mozilla/5.0"] -timeout 10000]} error } set status [http::status $req] if {$status != "ok"} { putlog "HTTP request error: $error" return } set data [http::data $req] ::http::cleanup $req return $data } proc createvarns {varname} { for {set i 0} {$i < [llength [split $varname ::]] - 1} {incr i} { namespace eval [join [lrange [split $varname ::] 0 $i] ::] {} } } # Read all manifest files proc loadscripts {} { global jsondict global eggdir foreach scriptentry $jsondict { if [dict get $scriptentry config loaded] { if {[dict exists $scriptentry config vars]} { foreach configvar [dict keys [dict get $scriptentry config vars] *] { uplevel #0 [list createvarns $configvar] set ::$configvar [dict get $scriptentry config vars $configvar value] } } if {[catch {uplevel #0 [list source $eggdir/[dict get $scriptentry name]/[dict get $scriptentry name].tcl]} err]} { putlog "Error loading [dict get $scriptentry name]: $err" return } } } } # Initial function called from autoscript console, sends to proper proc based on args proc parse_egg {idx text} { global echostatus global oldchan global asidx # Check if this is the user who triggered the console if {$idx != $asidx} { return $text } set args [split $text] set args [lassign $args subcmd arg1 arg2] if {$subcmd in {done}} { egg_done $idx "parse" } elseif {$subcmd in {remote list help}} { egg_$subcmd $idx } elseif {$subcmd in {update}} { egg_$subcmd $idx $arg1 } elseif {$subcmd in {config fetch clean}} { if {$arg1 eq ""} { putdcc $idx "Missing parameter, must be $::lastbind $subcmd scriptName" } else { egg_$subcmd $idx $arg1 } } elseif {$subcmd in {load unload}} { if {$arg1 eq ""} { putdcc $idx "Missing parameter, must be $::lastbind $subcmd scriptName" } else { egg_load $idx $arg1 [expr {$subcmd eq "load"}] } } elseif {$subcmd in {set}} { if {![llength $args]} { putdcc $idx "Missing parameter, must be $::lastbind $subcmd scriptName settingName newSettingValue" } else { egg_$subcmd $idx $arg1 $arg2 [join $args] } } elseif {$subcmd in {loaded unloaded all help}} { egg_$subcmd } else { putdcc $idx "Missing or unknown subcommand" egg_help $idx } return } # List scripts that are locally present in .egg proc egg_list {idx} { global jsondict global cmdtxt readjsonfile putdcc $idx "\nThe following scripts are available for configuration:" putdcc $idx "-------------------------------------------------------" if {[llength $jsondict] == 0} { putdcc $idx "* No scripts have been downloaded" } foreach script $jsondict { set loaded [expr {[dict get $script config loaded] == 1 ? "\[X\]" : "\[ \]"}] putdcc $idx "* $loaded [dict get $script name] (v[dict get $script version_major].[dict get $script version_minor]) - [dict get $script description]" if {[dict exists $script config requires] && [string length [dict get $script config requires]]} { foreach pkg [dict get $script config requires] { if {![string equal $pkg "null"]} { if {[lsearch -exact [package names] $pkg] == -1} { putdcc $idx " ( ^ Must install Tcl $pkg package on host before loading)" } } } } } putidx $idx "Additional scripts available for download can be viewed with the 'remote' command" putidx $idx "$cmdtxt" } # Load or unload a script and update JSON field # loadme is 0 to unload a script, 1 to load a script proc egg_load {idx script loadme} { global jsondict global eggdir set found 0 readjsonfile foreach scriptentry $jsondict { if [string match $script [dict get $scriptentry name]] { set found 1 if {$loadme} { if {[dict exists $scriptentry config vars]} { foreach configvar [dict keys [dict get $scriptentry config vars] *] { uplevel #0 [list createvarns $configvar] set ::$configvar [dict get $scriptentry config vars $configvar value] } } if {[catch {uplevel #0 [list source $eggdir/${script}/${script}.tcl]} err]} { putdcc $idx "Error loading ${script}: $err" return } dict set scriptentry config loaded 1 putdcc $idx "* Loaded $script." } else { dict set scriptentry config loaded 0 putdcc $idx "* Removed $script from being loaded. Restart Eggdrop to complete." set found 1 } write_json $script [compile_json {dict config {dict vars {dict * dict}}} $scriptentry] readjsonfile break } } if {!$found} { putdcc $idx "* $script not found." } return $found } # List variables available for a script proc egg_config {idx script} { global cmdtxt global jsondict set found 0 foreach scriptentry $jsondict { if {[string match $script [dict get $scriptentry name]]} { set found 1 if {[dict exists $scriptentry long_description]} { putdcc $idx "\n* [dict get $scriptentry long_description]\n\n" } if {![dict exists $scriptentry config vars]} { putdcc $idx "* No variables are available to configure for $script" } else { putdcc $idx "* The following config options are available for $script:" putdcc $idx "---------------------------------------------------------" putdcc $idx "Variables available for configuration via the set command: " foreach configvar [dict keys [dict get $scriptentry config vars] *] { set printstr "* $configvar - [dict get $scriptentry config vars $configvar description]" if {([string length $printstr] > 110) || ([string first "\n" $printstr] ne -1)} { if {[string first "\n" [string range $printstr 0 110]] ne -1} { set index [string first "\n" [string range $printstr 0 110]] } else { set index [string last { } $printstr 109] } putdcc $idx "[string range $printstr 0 $index]" set printstr [string range $printstr $index+1 end] while {[string length $printstr] > 0} { if {([string length $printstr] > 102) || ([string first "\n" $printstr] ne -1)} { if {[string first "\n" [string range $printstr 0 102]] ne -1} { set index [string first "\n" [string range $printstr 0 102]] } else { set printstr [string trimleft $printstr] set index [string last { } $printstr 101] } putdcc $idx " [string range $printstr 0 $index]" set printstr [string range $printstr $index+1 end] } else { putdcc $idx " [string trimleft $printstr]" putdcc $idx " (current value: [dict get $scriptentry config vars $configvar value])" putdcc $idx "\n" break } } } else { putdcc $idx "$printstr" putdcc $idx " (current value: [dict get $scriptentry config vars $configvar value])" putdcc $idx "\n" } } # treats udef putdcc $idx "\nChannel settings available for configuration via .chanset: " if {[dict exists $scriptentry config udef]} { foreach udef [dict keys [dict get $scriptentry config udef]] { set utype [dict get $scriptentry config udef $udef type] set uval null if {[dict exists $scriptentry config udef $udef value]} { set uval [dict get $scriptentry config udef $udef value] } switch -nocase -- $utype { "flag" { putdcc $idx "* $udef ($utype) : [dict get $scriptentry config udef $udef description] .chanset +$udef" } "str" - "int" { putdcc $idx "* $udef ($utype) : [dict get $scriptentry config udef $udef description] .chanset $udef $uval" } default { putdcc $idx "* $udef seems to exist but is not well defined" } } } putdcc $idx "" } } } } if {!$found} { putdcc $idx "Script $script not found." } putidx $idx "$cmdtxt" } # Set a variable for a script proc egg_set {idx script setting value} { global cmdtxt global jsondict set noscript 1 set noset 1 foreach scriptentry $jsondict { if {[string match $script [dict get $scriptentry name]]} { set noscript 0 if [dict exists $scriptentry config vars $setting] { set noset 0 dict set scriptentry config vars $setting value $value write_json $script [compile_json {dict config {dict vars {dict * dict}}} $scriptentry] putdcc $idx "* ${script}: Variable \"$setting\" set to \"${value}\"" putdcc $idx "* Use \"load $script\" to enable this change" readjsonfile } } } if $noscript { putdcc $idx "ERROR: Script \"${script}\" not found." } elseif $noset { putdcc $idx "* ${script}: Setting \"$setting\" not found." } putidx $idx "$cmdtxt" } # Pull down remote Tcl file listing # For future eggheads- 100 is the maximum WP supports without doing pagination proc egg_remote {idx} { global cmdtxt global eggdir putdcc $idx "* Retrieving script list, please wait..." send_http "https://raw.githubusercontent.com/eggheads/autoscripts/master/manifest" 1 set fp [open $eggdir/manifest r] set jsondata [read $fp] close $fp set datadict [json::json2dict $jsondata] putdcc $idx "Scripts available for download:" putdcc $idx "-------------------------------" foreach scriptentry $datadict { # regsub -all {<[^>]+>} [dict get $scriptentry caption rendered] "" scriptcap if {![string equal -nocase [dict get $scriptentry name] "autoscripts"]} { putdcc $idx "* [format "%-16s %s" [dict get $scriptentry name] [dict get $scriptentry description]]" } } putdcc $idx "\n" putdcc $idx "* Type 'fetch ' to download a script" putidx $idx "$cmdtxt" } # Helper command for scripts- return a Tcl list of scripts that are loaded proc egg_loaded {} { global jsondict list scriptlist foreach scriptentry $jsondict { if {[dict get $scriptentry config loaded]} { lappend scriptlist [dict get $scriptentry name] } } return $scriptlist } proc egg_update {idx tgtscript} { global cmdtxt global jsondict global version global asminor global asmajor set found 0 readjsonfile set jsondata [send_http "https://raw.githubusercontent.com/eggheads/autoscripts/master/manifest" 0] set datadict [json::json2dict $jsondata] foreach localscript $jsondict { foreach remotescript $datadict { if {[string equal -nocase [dict get $remotescript name] [dict get $localscript name]]} { if { ([dict get $remotescript version_minor] > [dict get $localscript version_minor] && [dict get $remotescript version_major] >= [dict get $localscript version_major]) || ([dict get $remotescript version_major] > [dict get $localscript version_major]) } { ## If we're looking for a specific script, suppress other found messages if {[string equal -nocase $tgtscript ""]} { putdcc $idx "* [dict get $localscript name] has an update available." } set found 1 if {[string equal -nocase $tgtscript [dict get $localscript name]]} { putdcc $idx "* Script update feature goes here- coming soon!" } } } } } if {!$found} { putdcc $idx "* No updates available." } } foreach script $jsondict { set loaded [expr {[dict get $script config loaded] == 1 ? "\[X\]" : "\[ \]"}] putdcc $idx "* $loaded [dict get $script name] (v[dict get $script version_major].[dict get $script version_minor]) - [dict get $script description]" set asversion [send_http "https://www.eggheads.org/wp-content/uploads/simple-file-list/autoscript.txt" 0] lassign [split $asversion .] major minor if { ($minor > $asminor && $major >= $asmajor) || ($major > $asmajor)} { putdcc $idx "* New version of autoscript found!" } else { putdcc $idx "* autoscript is up to date." } } # Helper command for scripts- return a Tcl list of scripts that are loaded proc egg_unloaded {} { global jsondict list scriptlist foreach scriptentry $jsondict { if {![dict get $scriptentry config loaded]} { lappend scriptlist [dict get $scriptentry name] } } return $scriptlist } # Helper command for scripts- return a Tcl list of scripts that are loaded proc egg_all {} { global jsondict list scriptlist foreach scriptentry $jsondict { lappend scriptlist [dict get $scriptentry name] } return $scriptlist } # Download a script from the eggheads repository proc egg_fetch {idx script} { global cmdtxt global eggdir try { set results [exec which tar] set status 0 } trap CHILDSTATUS {results options} { if {lindex [dict get $options -errorcode] 2} { putdcc $idx "* ERROR: This feature is not available (tar not detected on this system, cannot extract a downloaded file)." putidx $idx "$cmdtxt" return } } if {[file isdirectory $eggdir/$script]} { putdcc $idx "* Script directory already exists. Not downloading again!" putdcc $idx "* Use \"update $script\" if you're trying to update the script" putidx $idx "$cmdtxt" return } putdcc $idx "* Downloading, please wait..." set jsondata [send_http "https://api.github.com/repos/eggheads/autoscripts/contents/packages" 0] set datadict [json::json2dict $jsondata] foreach scriptentry $datadict { if {[string match ${script}.tgz [dict get $scriptentry name]]} { send_http "[dict get $scriptentry download_url]" 1 putdcc $idx "* [dict get $scriptentry name] downloaded." exec tar -zxf $eggdir/[dict get $scriptentry name] -C $eggdir if {[file exists $eggdir/$script]} { file delete $eggdir/[dict get $scriptentry name] putdcc $idx "* [dict get $scriptentry name] extracted." putdcc $idx "* Use 'config $script' to configure and then 'load $script' to load." putidx $idx "$cmdtxt" readjsonfile } else { putdcc $idx "* ERROR: [dict get $scriptentry name] not found. Cannot continue." } } } } proc egg_clean {idx script} { global cmdtxt global eggdir if {![egg_load $idx $script 0]} { putdcc $idx "* Cannot remove $script" return } if {[file isdirectory $eggdir/$script]} { file delete -force $eggdir/$script putdcc $idx "* $script deleted" } else { putdcc $idx "* $script not found" } putidx $idx "$cmdtxt" } proc egg_done {idx arg} { global oldchan global echostatus putdcc $idx "Returning to partyline..." unbind FILT n * parse_egg unbind EVNT n prerehash {egg_done $asidx} echo $idx $echostatus setchan $idx $oldchan } proc egg_help {idx} { global cmdtxt putidx $idx "* The following commands are available for use with $::lastbind:" putidx $idx " remote, fetch, list, config, set, load, unload, clean, done" putidx $idx "" putidx $idx "* remote : List scripts available for download" putidx $idx "* fetch

README¶

Please, at least SKIM this document before asking questions. In fact, READ IT if you’ve never successfully set up an Eggdrop bot before.

Notice¶

Make SURE that you select your +n (owner) users wisely. They have 100% access to your bot and account. ONLY GIVE THIS POWER TO SOMEONE YOU TRUST COMPLETELY!

What is Eggdrop?¶

Eggdrop is the world’s most popular Internet Relay Chat (IRC) bot; it is freely distributable under the GNU General Public License (GPL). Eggdrop is a feature-rich program designed to be easily used and expanded upon by both novice and advanced IRC users on a variety of hardware and software platforms.

An IRC bot is a program that sits on an IRC channel and performs automated tasks while looking just like a normal user on the channel. Some of these functions include protecting the channel from abuse, allowing privileged users to gain op or voice status, logging channel events, providing information, hosting games, etc.

One of the features that makes Eggdrop stand out from other bots is module and Tcl and Python scripting support. With scripts and modules you can make the bot perform almost any task you want. They can do anything: from preventing floods to greeting users and banning advertisers from channels.

You can also link multiple Eggdrop bots together to form a botnet. This can allow bots to op each other securely, control floods efficiently and even link channels across multiple IRC networks. It also allows the Eggdrops share user lists, ban/exempt/invite lists, and ignore lists with other bots if userfile sharing is enabled. This allows users to have the same access on every bot on your botnet. It also allows the bots to distribute tasks such as opping and banning users. See doc/BOTNET for information on setting up a botnet.

Eggdrop is always being improved and adjusted because there are bugs to be fixed and features to be added (if the users demand them and they make actually sense). In fact, it existed for several years as v0.7 - v0.9 before finally going 1.0. This version of Eggdrop is part of the 1.9 tree. A valiant effort has been made to chase down and destroy bugs.

This README file contains information about how to get Eggdrop, command line options for Eggdrop, what you may need to do when upgrading from older versions, a list of frequently asked questions, how to set up a crontab, some boring legal stuff, some basics about git usage and some channels where you might get help with Eggdrop.

How to Get Eggdrop¶

There are two official methods to download Eggdrop source code. Alternately, Eggdrop also comes as a docker image.

FTP¶

The latest Eggdrop stable source code is always located at https://geteggdrop.com. You can also download the current stable, previous stable, and development snapshot at https://ftp.eggheads.org/pub/eggdrop/source

Git Development Snapshot¶

Eggdrop developers use git to manage the Eggdrop codebase for development. If you are interested in trying out the VERY LATEST updates to Eggdrop, you can use git to obtain most recent code from the Eggheads repository. BE WARNED, the development branch of Eggdrop is not to be considered stable and may (haha) contain significant bugs still being worked on.

To obtain Eggdrop via the git repository (hosted by GitHub), you can either clone the repository via git or download a development snapshot.

To clone the repository, simply type:

git clone https://github.com/eggheads/eggdrop.git

Otherwise, you can download the development snapshot as a tar archive from:

Docker¶

You can pull the official Eggdrop Docker image via:

docker pull eggdrop:latest

Additional Eggdrop Docker documentation can be found at https://hub.docker.com/_/eggdrop

System Pre-Requisites¶

Before you can compile Eggdrop, Tcl must be installed on your system. Many systems have Tcl installed on them by default (you can check by trying the command “tclshâ€; if you are given a ‘%’ for a prompt, it is, and you can type ‘exit’ to exit the Tcl shell. However, Eggdrop also requires the Tcl development header files to be installed. They can often be installed via an OS package manager, usually called something similar to ‘tcl-dev’ for the package name. You can also download Tcl source from https://www.tcl.tk/software/tcltk/download.html.

Eggdrop also requires openssl (and its development headers) in order to enable SSL/TLS protection of network data. The header files are often called something similar to ‘libssl-dev’. While not advised, this requirement can be removed by compiling using ./configure --disable-tls, but you will not be able to connect to TLS-protected IRC servers nor utilize secure botnet communication.

Minimum Requirements¶

Some components of Eggdrop relies on a variety of third-party libraries, documented here.

Functionality

Package

Minimum Version

Tcl interpreter (required)

Tcl Dev Library

8.5.0

Secure communication

OpenSSL

0.9.8

Python module

Python

3.8.0

Compression module

zlib

Any

Quick Startup¶

Please see the Install file after you finish reading this file.

Upgrading¶

The upgrade process for Eggdrop is very simple, simply download the new source code and repeat the compile process. You will want to read the NEWS for any new configuration file settings you want to add. Please see Upgrading for full details.

Command Line¶

Eggdrop has some command line options - not many, because most things should be defined through the config file. However, sometimes you may want to start up the bot in a different mode and the command line options let you do that. Basically, the command line for Eggdrop is:

./eggdrop [options] [config-file]

The options available are:

-t: Don’t background, use terminal. Your console will drop into an

interactive partyline session, similar to a DCC chat with the bot. This is useful for troubleshooting connection issues with the bot.

-c: Don’t background, show channel info. Every 10 seconds your screen

will clear and you will see the current channel status, sort of like “topâ€.

-m: Create userfile. If you don’t have a userfile, this will make Eggdrop

create one and give owner status to the first person that introduces himself or herself to it. You’ll need to do this when you first set up your bot.

-h: Show help, then quit.

-v: Show version info, then quit.

Most people never use any of the options except -m and you usually only need to use that once.

Auto-starting Eggdrop¶

Systems go down from time to time, taking your Eggdrop along with it. You may not be not around to restart it manually, so you can instead use features of the operating system to automatically restart Eggdrop should it quit for any reason. Eggdrop comes with an autobotchk shell script that can create either a systemd or crontab entry. The systemd option will monitor your Eggdrop and a) start it when the machine boots and b) restart the Eggdrop if it crashes for any reason. The (older) crontab option will check (by default) every 10 minutes to see if your Eggdrop is still running, and attempt to restart it if it is not.

To auto-generate a systemd job, from the Eggdrop install directory, simply run:

./scripts/autobotchk <Eggdrop config file> -systemd

To auto-geneerate a script to check Eggdrop’s status and run it via a crontab entry, simply run:

./scripts/autobotchk <Eggdrop config file>

This will crontab your bot using the default setup. If you want a list of autobotchk options, type ‘./autobotchk’. A crontab example with options would be:

./scripts/autobotchk <Eggdrop config file> -noemail -5

This would setup crontab to run the botchk every 5 minutes and not send you an email saying that it restarted your bot.

Documentation¶

We’re trying to keep the documentation up to date. If you feel that anything is missing here or that anything should be added, etc, please create an issue, or better yet a pull request, at https://www.github.com/eggheads/eggdrop Thank you!

Obtaining Help¶

You can obtain help with Eggdrop in the following IRC channels:

  • Libera Chat - #eggdrop (official channel), #eggheads (development discussion)

  • DALnet - #eggdrop

  • EFnet - #egghelp

  • IRCnet - #eggdrop

  • QuakeNet - #eggdrop.support

  • Undernet - #eggdrop

If you plan to ask questions in any of the above channels, you should be familiar with and follow IRC etiquette:

  • Don’t type using CAPITAL letters, colors or bold.

  • Don’t use “!†and “?†excessively.

  • Don’t /msg people without their permission.

  • Don’t repeat or paste more than 4 lines of text to the channel.

  • Don’t ask to ask- just state your question, along with any relevant details and error messages

Copyright (C) 1997 Robey Pointer Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/install/install.html0000664000175000017500000004327314703073435017062 0ustar geogeo Installing Eggdrop — Eggdrop 1.10.0 documentation

Installing Eggdrop¶

This is the quick install guide; if you have had little or no experience with UNIX or Eggdrop, READ THE README FILE NOW! This file is best for experienced users.

For more information on compiling Eggdrop, see the Compile Guide in doc/COMPILE-GUIDE (and of course, the README FILE).

Quick Startup¶

Eggdrop uses the GNU autoconfigure scripts to make things easier.

  1. Type ‘./configure’ from the Eggdrop directory. The configure script

    will determine how your system is set up and figure out how to correctly compile Eggdrop. It will also try to find Tcl, which is required to compile.

  2. Type either ‘make config’ or ‘make iconfig’ to determine which

    modules will be compiled. ‘make config’ compiles the default modules (everything but woobie.mod). If you want to choose which modules to compile, use ‘make iconfig’.

  3. Type ‘make’ from the Eggdrop directory, or to force a statically

    linked module bot, type ‘make static’. Otherwise, the Makefile will compile whatever type of bot the configure script determined your system will support. Dynamic is always the better way to go if possible. There are also the ‘debug’ and ‘sdebug’ (static-debug) options, which will give more detailed output on a (highly unlikely :) crash. This will help the development team track down the crash and fix the bug. Debug and sdebug will take a little longer to compile and will enlarge the binary a bit, but it’s worth it if you want to support Eggdrop development.

  4. Eggdrop must be installed in a directory somewhere. This is

    accomplished by entering the UNIX command:

    make install
    

    This will install the Eggdrop in your home directory in a directory called ‘eggdrop’ (i.e. /home/user/eggdrop).

    If you want to install to a different directory, use:

    make install DEST=<directory>
    

    For example:

    make install DEST=/home/user/otherdir
    

    Note that you must use full path for every file to be correctly installed.

  5. Since version 1.8, Eggdrop can use SSL to protect botnet links. If you intend on protecting botnet traffic between Eggdrops, you must generate SSL certificates by running:

        make sslcert
    
     Or, if you installed your eggdrop to a different directory in step 4, you
     will want to run:
    
       make sslcert DEST=<directory>
    
    For those using scripts to install Eggdrop, you can non-interactively
    generate a key and certificate by running:
    
       make sslsilent
    
     Read docs/TLS for more info on this process.
    

[The following steps are performed in the directory you just installed Eggdrop into from the previous step]

  1. Edit your config file completely.

  2. Start the bot with the “-m†option to create a user file, i.e.

    ./eggdrop -m LamestBot.conf
    
  3. When starting the bot in the future, drop the “-mâ€. If you have edited

    your config file correctly, you can type:

    chmod u+x <my-config-file-name>
    

    For example:

    chmod u+x LamestBot.conf
    

    From then on, you will be able to use your config file as a shell script. You can just type “./LamestBot.conf†from your shell prompt to start up your bot. For this to work, the top line of your script MUST contain the correct path to the Eggdrop executable.

  4. It’s advisable to run your bot via crontab, so that it will

    automatically restart if the machine goes down or (heaven forbid) the bot should crash. Eggdrop includes a helper script to auto-generate either a systemd or crontab entry. To add a systemd job, run:

    ./scripts/autobotchk [yourconfig.conf] -systemd
    

    or to add a crontab job, run:

    ./scripts/autobotchk [yourconfig.conf]
    
  5. Smile. You have an Eggdrop!

Cygwin Requirements (Windows)¶

Eggdrop requires the following packages to be added from the Cygwin installation tool prior to compiling:

Interpreters: tcl, tcl-devel
Net:          openssl-devel
Devel:        autoconf, gcc-core, git, make
Utils:        diffutils

Modules¶

Modules are small pieces of code that can either be compiled into the binary or can be compiled separately into a file. This allows for a much smaller binary.

If there are any modules that you have made or downloaded, you can add them to the bot by placing them in the /src/mod directory with a mod extension. They will be automatically compiled during make for you. They must have a valid Makefile and, of course, be compatible with the rest of the Eggdrop source.

If you wish to add a module at a later time, follow the same steps in paragraph 2. After you have moved the appropriate files, you will only need to type ‘make modules’ to compile only the modules portion of the bot.

This is the end. If you read to this point, hopefully you have also read the README file. If not, then READ IT!&@#%@!

Have fun with Eggdrop!

Copyright (C) 1997 Robey Pointer Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/install/upgrading.html0000664000175000017500000003137314703073435017372 0ustar geogeo Upgrading Eggdrop — Eggdrop 1.10.0 documentation

Upgrading Eggdrop¶

It is easy to upgrade Eggdrop to a new version! To have a full picture of the changes made since your last upgrade, we recommend reading the NEWS file. Upgrades from the 1.8 and 1.9 lines of Eggdrop should take place with little to no issues. While the config file, user files, and channel files can all be reused, it is recommended to review the NEWS files for each release to identify new configuration settings that have been added.

For support, feel free to visit us on Libera #eggdrop.

How to Upgrade¶

To upgrade to a newer version of Eggdrop, first backup your .config file, .user file, and .chan file. While they are saved and should not be overwritten by the upgrade process, it never hurts to make anothere copy :)

Next, view the NEWS file to see what changes have been made, paying particular attention to the config file section to see what new/different commands have been added. Update your config file appropriately.

Then, simply follow the same steps you followed to install Eggdrop previously. Download the source, unzip/untar it, and run the ‘./configure’, ‘make config’, ‘make’, and ‘make install’ commands. Restart your Eggdrop and you will be up and running with the latest version of Eggdrop.

Must-read changes for Eggdrop v1.10¶

These are NOT all the changes or new settings; rather just the “killer†changes that may directly affect Eggdrop’s previous performance without modification.

Config file changes¶

To migrate from a 1.8 to a 1.10 Eggdrop, some changes are suggested to be made in your configuration file:

  • Eggdrop has deprecated the blowfish module for password hashing in favor of the PBKDF2 module. This is a BIG change which, if done carelessly, has the potential to render stored passwords useless. Please see doc/PBKDF2 for information on how to properly migrate your userfiles and passwords to the new module.

  • Eggdrop 1.9 switched from the “set servers {}†syntax to the “server add†command. For example, if your configuration file previously had:

    set servers {
      my.server.com:6667
    }
    

    you should now instead use:

    server add my.server.com 6667
    

    Please read the config file for additional examples

  • Eggdrop no longer requires the ‘-n’ flag to start Eggdrop in terminal mode.

Modules¶

While most 3rd party modules that worked on older Eggdrop versions should still work with Eggdrop 1.10, many of them contain a version check that only allows them to run on 1.6.x bots. We have removed the version check from some of the more popular modules provide them at https://ftp.eggheads.org/pub/eggdrop/modules/1.10/

Scripts¶

All 3rd party Tcl scripts that worked with Eggdrop versions as early as v1.6 should still fully work with Eggdrop 1.10.

Botnet¶

In Eggdrop v1.8, Eggdrop bots would automatically attempt to upgrade any botnet link to an SSL/TLS connection. Since v1.9, the user is required to explicitly request an SSL/TLS connection by prefixing the port with a ‘+’. If you wish your botnet to take advantage of encryption, use the .chaddr command to update your ports to start with a ‘+’.

Tcl Commands¶

A lot of backwards-compatible additions and changes have been made to Tcl commands. Please look at doc/tcl-commands.doc to see them.

Documentation¶

Documentation has been updated to reflect new and removed commands and variables.

eggdrop-1.10.0/doc/html/search.html0000664000175000017500000001642314703073435015210 0ustar geogeo Search — Eggdrop 1.10.0 documentation eggdrop-1.10.0/doc/html/about/0000775000175000017500000000000014703073435014161 5ustar geogeoeggdrop-1.10.0/doc/html/about/about.html0000664000175000017500000002413414703073435016165 0ustar geogeo About Eggdrop — Eggdrop 1.10.0 documentation

About Eggdrop Last revised: July 27, 2010

About Eggdrop¶

Eggdrop was created around December 1993 to help stop the incessant wars on #gayteen. It spawned from another bot that was in the process of being written at the time called “Unrestâ€. The purpose of Unrest was to answer help requests from other bots. The first public release of Eggdrop was version 0.6, and since then, it has grown into what you have before you.

Eggdrop is the World’s most popular Internet Relay Chat (IRC) bot; it is freely distributable under the GNU General Public License (GPL). Eggdrop is a feature rich program designed to be easily used and expanded upon by both novice and advanced IRC users on a variety of hardware and software platforms.

An IRC bot is a program that sits on an IRC channel and performs automated tasks while looking just like a normal user on the channel. Some of these functions include protecting the channel from abuse, allowing privileged users to gain op or voice status, logging channel events, providing information, hosting games, etc.

One of the features that makes Eggdrop stand out from other bots is module and Tcl scripting support. With scripts and modules, you can make the bot perform almost any task you want. They can do anything from preventing floods to greeting users and banning advertisers from channels.

You can also link multiple Eggdrop bots together to form a botnet. This can allow bots to op each other securely, control floods efficiently, and even link channels across multiple IRC networks. It also allows the Eggdrops share user lists, ban lists, exempt/invite lists, and ignore lists with other bots if userfile sharing is enabled. This allows users to have the same access on every bot on your botnet. It also allows the bots to distribute tasks such as opping and banning users. See doc/BOTNET for information on setting up a botnet.

Eggdrop is always being improved and adjusted because there are bugs to be fixed and features to be added (if the users demand them, and they make actually sense). In fact, it existed for several years as v0.7 - v0.9 before finally going 1.0. This version of Eggdrop is part of the 1.9 tree. A valiant effort has been made to chase down and destroy bugs.

To use Eggdrop, you need:

  • Some sort of Unix account

  • A pretty good knowledge of IRC and Unix, including how to compile programs, how to read, and what DCC chat is, at absolute minimum.

  • About 5-7 MB of disk space. The Eggdrop tarball is about 5.4 MB unpacked.

  • Tcl – Eggdrop cannot compile without Tcl installed on your shell.

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/about/legal.html0000664000175000017500000002114414703073435016135 0ustar geogeo Boring legal stuff — Eggdrop 1.10.0 documentation
eggdrop-1.10.0/doc/html/objects.inv0000664000175000017500000000325514703073435015223 0ustar geogeo# Sphinx inventory version 2 # Project: Eggdrop # Version: 1.10.0 # The remainder of this file is compressed using zlib. xÚ•XËnÛ:Ýë+$˪Áíî¢ 8i‚M‹ vÑEQEÛDdJ ©8þû;|‰¤D¹î&±9s_3s†ÆUÛ«+¬ÿ"©êuKPùÂaøýNí´0wÛm-Ú®°æ†nq3E™a‹ºiã[äûͦÀR‚³5¸¢†íÛºo¨¼‚ÿWÆlÀ—ha|¿sQQ©6‚Q^¿ïކ@Q±×ø^Â$WÝQíZn¡ÚR^¢²¨¯‘ÂUCóS2®7Òâ´{iÝu­—ŽÑ7z@7šfuì(R-R;ê´£™b­À&Ó)ìªiJÒî÷˜×ÉÆ •EÕ´‡ “»ù“ñþpn<ÂA›žÅZ~ÖVI9¸»­šÕÜ»AÜ0u,ÈsN9¿*ïáWuë~Uí¾TžbpƒG \¶s÷g ŒCÀ[W¤;ë\Ý>{TÍO¬ŒóùÛÒC6 ìÇ0çà¡÷ÎßÁ·”ÃùÓ·ïGm:=êÅVPªþ"vj-&/ggÁN•°>éøÑÃj½\-n¿,nžî VS®æ·lÌ~ÃÆ×m—íëê/öŽÆ•šèT\Qz‡0GmG!üÛ^Š¿ß¢ªU€…Ý4Í•ûŸ²$&Êæ‹N _? ¸ÞÓƒµX‚ïw‹Ï_ïPßm6–Á F ý1øŽ¦†¡5µCéqç¶p@¥åv%Nb0é®­aR)ˆ“óonÔ¥ÄyÕñÀ5Ô’º¡ŸÐõ¦Á[ù ýrÕæw+ÌdKw,½Á§]µË›í¤ékZÇ×1¶Åp‰Ä©Ýp|3ŠÍÄÄhXЦ°Q(´Å$ óTq†t¦d?z[1ÒUª²©ÆæôfŽ#Ñ£‰å4bŽ)щ‚ä´b–)Ö’‰’dDcž(hÊXQÆú1Ëáµ%Q–‘̽ÆÄ ““9x¬5c¥™è9’P½ÓÚ=*³pWAâúÛy«èìŒÑ¿¿ AW½Ô›s Öj)žo¾|¾ÿå05k–#T4ôl=3’ÒYm³ø¥öÊ¢Å+óxmõ Æ3DZÃb6–Ñ1¿ ˜ËÍü2¼ÝÒ¬¼wŽ j$™-ÖêX¬g†£ïÛÏîÇZ½^Ï Ç¡m+6Ëa­–ã§õqS#Í™,ú¡=èGÁO£ºI+}‚<«²!ÌAù’@‚;‹ŒÂ i€w½ª 9Wp÷5«ß@j}S ´¥À‡ßE$¨PÚ$;œàF¹•ßBÔ/\ŽòKR,Èè5dÇ|.û3Þj_zb–!aŽ8£¼›Á ™gqî…|ËC‡ŒÓÈ8çàü×úxæ[QX÷{è€ÐW,_d‘äjvþ$[a ã|U‚m·T?ÍטÍ‚Îz\ 8³2àöcýGÓ‘ªWððèJÁºDe².]ÞE©´4æ «¢€•¡ûÑ eðƒû‹·º^ÃëL3­ž–ÀJzXçµ Modules included with Eggdrop — Eggdrop 1.10.0 documentation

Modules included with Eggdrop¶

Assoc Module

This module provides assoc support, i.e. naming channels on the botnet.

Blowfish Module

This module has been deprecated in favor of the pbkdf2 module for hashing purposes, such as passwords in the userfile. However, it is still required for encrypting/decrypting strings.

Channels Module

This module provides channel related support for the bot. Without it, you won’t be able to make the bot join a channel or save channel specific userfile information.

Compress Module

This module provides support for file compression. This allows the bot to transfer compressed user files and, therefore, save a significant amount of bandwidth.

Console Module

This module provides storage of console settings when you exit the bot or type .store on the partyline.

CTCP Module

This module provides the normal ctcp replies that you’d expect. Without it loaded, CTCP CHAT will not work.

DNS Module

This module provides asynchronous dns support. This will avoid long periods where the bot just hangs there, waiting for a hostname to resolve, which will often let it timeout on all other connections.

Filesys Module

This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server.

Ident Module

This module adds Eggdrop support for the externally-provided oident service, or alternatively the ability for Eggdrop to act as its own ident daemon.

IRC Module

This module provides basic IRC support for your bot. You have to load this if you want your bot to come on IRC.

Notes Module

This module provides support for storing of notes for users from each other. Note sending between currently online users is supported in the core, this is only for storing the notes for later retrieval.

PBKDF2 Module

This modules updates Eggdrop to use PBKDF2 for hashing purposes, such as for userfile passwords. It was specifically designed to work with the blowfish module to make the transition from blowfish to pbkdf2 password hashing as easy as possible. If you are transitioning a userfile from 1.8 or earlier, you should load this AND the blowfish module. By doing so, Eggdrop will seamlessly update the old blowfish hashes to the new PBKDF2 hashes once a user logs in for the first time, and allow you to (eventually) remove the blowfish module altogether. For new bots, you should load this module by itself and not use the blowfish module. The blowfish module is still required if you use Tcl to encrypt/decrypt strings in Tcl (ie, some scripts). Eggdrop will not start without a password-hashing module loaded.

Python Module

This module adds a python interpreter to Eggdrop, enabling you to run python scripts on your Eggdrop!

Seen Module

This module provides very basic seen commands via msg, on channel or via dcc. This module works only for users in the bot’s userlist. If you are looking for a better and more advanced seen module, try the gseen module, originally written by G’Quann and forked/updated for modern Eggdrop by mortmann. You can find it at https://github.com/michaelortmann/gseen.mod

Server Module

This module provides the core server support. You have to load this if you want your bot to come on IRC. Not loading this is equivalent to the old NO_IRC define.

Share Module

This module provides userfile sharing support between two directly linked bots.

Transfer Module

The transfer module provides DCC SEND/GET support and userfile transfer support for userfile sharing.

Twitch Module

The Twitch module modifies Eggdrop to interact with the Twitch service. Twitch uses a modified implementation of IRC so not all functionality will be present. Please read doc/TWITCH for specifics on how to best use the Tiwtch module.

Uptime Module

This module reports uptime statistics to the uptime contest web site at https://www.eggheads.org/uptime. Go look and see what your uptime is! It takes about 9 hours to show up, so if your bot isn’t listed, try again later. See doc/settings/mod.uptime for more information, including details on what information is sent to the uptime server.

Woobie Module

This is for demonstrative purposes only. If you are looking for starting point in writing modules, woobie is the right thing.

eggdrop-1.10.0/doc/html/modules/blowfish.html0000664000175000017500000002175314703073435017232 0ustar geogeo Blowfish Module — Eggdrop 1.9.2 documentation

Last revised: January 28, 2003

Blowfish Module¶

Eggdrop can encrypt your userfile, so users can have secure passwords. Please note that when you change your encryption method later (i.e. using other modules like a md5 module), you can’t use your current userfile anymore. Eggdrop will not start without an encryption module.

This module requires: none

Put this line into your Eggdrop configuration file to load the blowfish module:

loadmodule blowfish

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/uptime.html0000664000175000017500000002247114703073435016716 0ustar geogeo Uptime Module — Eggdrop 1.9.2 documentation

Last revised: January 1, 2002

Uptime Module¶

This module reports uptime statistics to http://uptime.eggheads.org. Go look and see what your uptime is! It takes about 9 hours to show up, so if your bot isn’t listed, try again later.

Information sent to the server includes the bot’s uptime, botnet-nick, server, version, and IP address. This information is stored in a temporary logfile for debugging purposes only. The only publicly available information will be the bot’s botnet-nick, version and uptime. If you do not wish for this information to be sent, comment out the ‘loadmodule uptime’ line in your bot’s config file.

This module requires: server

Put this line into your Eggdrop configuration file to load the uptime module:

loadmodule uptime

Copyright (C) 2001 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/ident.html0000664000175000017500000003200014703073435016503 0ustar geogeo Ident Module — Eggdrop 1.9.2 documentation

Last revised: June 27, 2019

Ident Module¶

This module adds Eggdrop support for the externally-provided oident service, or alternatively the ability for Eggdrop to act as its own ident daemon.

Traditionally, an IRC server queries port 113 on an irc client’s host to determine the ident for the client. The client’s host normally replies with the username of the account. If the host machine is running oident as its ident service, Eggdrop can now interact with oident to instead reply with a custom ident specified by Eggdrop (oidentd is an external service not specific to Eggdrop nor maintained by Eggheads developers, thus no support for it can be given).

Alternatively, this module can also allow Eggdrop to act as its own ident daemon, answering queries from the IRC server directly. While this option may be of use to a very specific group of people, it requires additional external configuration via root access. Because most modern OSs do not allow user-level programs to bind to port 113, required by this option, a user must either:

  • Allow Eggdrop to bind to ports <1024 via the command:

    sudo setcap "cap_net_bind_service=+ep" /path/to/eggdrop
    

    Warning: this will allow Eggdrop to any port below 1024, potentially allowing a user to impersonate a standard system service with Eggdrop

  • Use iptables to re-route ident queries destined for port 113 to a >1024 port that Eggdrop can bind to, for example by running:

    sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport \
    113 -j REDIRECT --to-port <ident port in config>'
    

Additionally, using Eggdrop as a built-in ident daemon can cause issues when running multiple bots from the same account. The ident server is only activated and bound to the configured ident port while Eggdrop is connecting to an IRC server, but only one Eggdrop can bind to port 113 at a time. If multiple bots were to start at the same time, such as after a netsplit or host reboot, only one bot can bind to port 113 at a time, creating ident conflicts. Thus, this option is best suited for single-bot environments.

This module requires:
  • oident to be running on your shell host, configured to allow user spoofing, for the oidentd method.

Put this line into your Eggdrop configuration file to load the ident module:

loadmodule ident

There are also some variables you can set in your config file:

set ident-method 0
This sets which ident method you wish to use:
0 = oidentd / Your bot will overwrite $HOME/.oidentd.conf right before
opening the socket to the IRC server with the global reply.
1 = Builtin / Your bot will automatically turn its builtin identd on and
off when needed so it shouldn’t conflict with other identds that do the same. Ident port 113 is normally restricted to privileged processes on UNIX systems.
set ident-port 113
This sets the port which port Eggdrop will attempt to bind to for option 1 of ident-method. Most OSs do not allow non-privileged programs such as Eggdrop to bind to ports <1024; please read the beginning of this document for potential ways to implement this setting.

Copyright (C) 2019 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/writing.html0000664000175000017500000014204514703073435017076 0ustar geogeo How to Write an Eggdrop Module — Eggdrop 1.10.0 documentation

How to Write an Eggdrop Module¶

Note: This is for a simple module of 1 source file.

  1. Create a src/mod/MODULE.mod directory in your Eggdrop directory (where MODULE is the module name) and cd to it.

  2. Copy the file ‘Makefile’ from src/mod/woobie.mod and replace all occurrences of ‘woobie’ with your module name. This should ensure that your module gets compiled.

  3. Next, you want to create a file called MODULE.c (MODULE is the module name again).

  4. You MUST include the following in your source code:

    #define MODULE_NAME "module-name"
    

This should be defined to the same name you will be using when you load your module.

#define MAKING_MODULENAME

MODULENAME is the name of your module (MODULE_NAME), but in all caps.

#include "../module.h"

This provides access to Eggdrop’s global function table. Examine src/mod/module.h closely to find a list of functions available.

#include any other standard c header files you might need.

Note that stdio.h, string.h, stdlib.h, and sys/types.h are already included.

Note that stdio.h, string.h, stdlib.h, and sys/types.h are already included.

Function *global;

This variable provides access to all the Eggdrop functions; without it, you can’t call any Eggdrop functions (the module won’t even load).

Module requirements¶

In most modules, all functions/variables (except global and MODULE_start) should be static. This will drastically reduce the size of modules on decent systems.

Throughout this step, MODULE refers to the module name. Note that

“MODULE_NAME†should literally be “MODULE_NAMEâ€.

MODULE_start¶

char *MODULE_start(Function *func_table)

This function is called when the module is first loaded. There are
several things that need to be done in this function
global = func_table;

This allows you to make calls to the global function table.
module_register(MODULE_NAME, MODULE_table, MAJOR, MINOR);

This records details about the module for other modules and Eggdrop
itself to access. MAJOR and MINOR are ints, where MAJOR is the
module's major version number and MINOR is a minor version number.
MODULE_table is a function table (see below).
module_depend(MODULE_NAME, "another-module", MAJOR, MINOR);

This lets Eggdrop know that your module NEEDS "another-module" of
major version 'MAJOR' and at least minor version 'MINOR' to run,
and hence should try to load it if it's not already loaded. This
will return 1 on success, or 0 if it can't be done (at which stage
you should return an error).

Any other initialization stuff you desire should also be included in this function. See below for various things you can do.

You also will need to return a value. Returning NULL implies the module loaded successfully. Returning a non-NULL STRING is an error message. The module (and any other dependent modules) will stop loading and an error will be returned.

MODULE_table¶

static Function *MODULE_table = {
       MODULE_start,
       MODULE_close,
       MODULE_expmem,
       MODULE_report,
       any_other_functions,
       you_want_to_export
};

This is a table of functions which any other module can access. The
first 4 functions are FIXED. You MUST have them; they provide important
module information.

MODULE_close ()¶

static char *MODULE_close ()

This is called when the module is unloaded. Apart from tidying any
relevant data (I suggest you be thorough, we don't want any trailing
garbage from modules), you MUST do the following:
module_undepend(MODULE_NAME);

This lets Eggdrop know your module no longer depends on any other
modules.

Return a value. NULL implies success; any non-NULL STRING implies
that the module cannot be unloaded for some reason, and hence the
bot should not unload it (see the blowfish module for an example).

MODULE_expmem¶

static int MODULE_expmem ()

This should tally all memory you allocate/deallocate within the module
(using nmalloc, nfree, etc) in bytes. It's used by memory debugging to
track memory faults, and it is used by .status to total up memory usage.

MODULE_report¶

static void MODULE_report (int idx)

This should provide a relatively short report of the module's status
(for the module and status commands).

These functions are available to modules. MANY more available functions can be found in src/mod/module.h.

Additional functions¶

void *nmalloc(int j);

This allocates j bytes of memory.
void nfree(void *a);

This frees an nmalloc'd block of memory.
Context;

Actually a macro -- records the current position in execution (for
debugging). Using Context is no longer recommended, because it uses
too many resources and a core file provides much more information.
void dprintf(int idx, char *format, ...)

This acts like a normal printf() function, but it outputs to
log/socket/idx.

idx is a normal dcc idx, or if < 0 is a sock number.

Other destinations:
  DP_LOG    - send to log file
  DP_STDOUT - send to stdout
  DP_MODE   - send via mode queue to the server
  DP_SERVER - send via normal queue to the server
  DP_HELP   - send via help queue to server
const module_entry *module_find(char *module_name, int major, int minor);

  Searches for a loaded module (matching major, >= minor), and returns
  info about it.

  Members of module_entry:
    char *name;      - module name
    int major;       - real major version
    int minor;       - real minor version
    Function *funcs; - function table (see above)

void module_rename(char *old_module_name, char *new_module_name)

  This renames a module frim old_module_name to new_module_name.

void add_hook(int hook_num, Function *funcs)
void del_hook(int hook_num, Function *funcs)

 These are used for adding or removing hooks to/from Eggdrop code that
 are triggered on various events. Valid hooks are:
   HOOK_SECONDLY   - called every second
   HOOK_MINUTELY   - called every minute
   HOOK_5MINUTELY  - called every 5 minutes
   HOOK_HOURLY     - called every hour (hourly-updates minutes past)
   HOOK_DAILY      - called when the logfiles are switched

   HOOK_READ_USERFILE - called when the userfile is read
   HOOK_USERFILE      - called when the userfile is written
   HOOK_PRE_REHASH    - called just before a rehash
   HOOK_REHASH        - called just after a rehash
   HOOK_IDLE          - called whenever the dcc connections have been
                        idle for a whole second
   HOOK_BACKUP        - called when a user/channel file backup is done
   HOOK_LOADED        - called when Eggdrop is first loaded
   HOOK_DIE           - called when Eggdrop is about to die

char *module_unload (char *module_name);
char *module_load (char *module_name);

  Tries to load or unload the specified module; returns 0 on success, or
  an error message.

void add_tcl_commands(tcl_cmds *tab);
void rem_tcl_commands(tcl_cmds *tab);

  Provides a quick way to create and remove a table of Tcl commands. The
  table is in the form of:

    {char *func_name, Function *function_to_call}

  Use { NULL, NULL } to indicate the end of the list.

void add_tcl_ints(tcl_ints *);
void rem_tcl_ints(tcl_ints *);

  Provides a quick way to create and remove a table of links from C
  int variables to Tcl variables (add_tcl_ints checks to see if the Tcl
  variable exists and copies it over the C one). The format of table is:

    {char *variable_name, int *variable, int readonly}

  Use {NULL, NULL, 0} to indicate the end of the list.

void add_tcl_strings(tcl_strings *);
void rem_tcl_strings(tcl_strings *);

  Provides a quick way to create and remove a table of links from C
  string variables to Tcl variables (add_tcl_ints checks to see if the
  Tcl variable exists and copies it over the C one). The format of table
  is:

    {char *variable_name, char *string, int length, int flags}

  Use {NULL, NULL, 0, 0} to indicate the end of the list. Use 0 for
  length if you want a const string. Use STR_DIR for flags if you want a
  '/' constantly appended; use STR_PROTECT if you want the variable set
  in the config file, but not during normal usage.

void add_builtins(p_tcl_hash_list table, cmd_t *cc);
void rem_builtins(p_tcl_hash_list table, cmd_t *cc);

  This adds binds to one of Eggdrop's bind tables. The format of the
  table is:

    {char *command, char *flags, Function *function, char *displayname}

  Use {NULL, NULL, NULL, NULL} to indicate the end of the list.

  This works EXACTLY like the Tcl 'bind' command. displayname is what Tcl
  sees this function's proc name as (in .binds all).

  function is called with exactly the same args as a Tcl binding is with
  type conversion taken into account (e.g. idx's are ints). Return values
  are much the same as Tcl bindings. Use int 0/1 for those which require
  0/1, or char * for those which require a string (auch as filt). Return
  nothing if no return value is required.

void putlog (int logmode, char *channel, char *format, ...)

  Adds text to a logfile (determined by logmode and channel). This text
  will also output to any users' consoles if they have the specified
  console mode enabled.

What to do with a module?¶

If you have written a module and feel that you wish to share it with the rest of the Eggdrop community, find us in #eggdrop on Libera. Make sure you have a nice descriptive text (modulename.desc) to describe it, and make sure to mention in your text file which version Eggdrop the module is written for.

eggdrop-1.10.0/doc/html/modules/pbkdf2.html0000664000175000017500000002402314703073435016556 0ustar geogeo PBKDF2 Module — Eggdrop 1.9.2 documentation

Last revised: October 28, 2020

PBKDF2 Module¶

Eggdrop encrypts its userfile, so users can have secure passwords. Eggdrop will not start without an encryption module.

As of Eggdrop 1.9.0, a new encryption module was added, the PBKDF2 module. The PBKDF2 module was designed to work with the previous encryption module (blowfish) to make the transition easier. If this is a new bot, you can safely load just the PBKDF2 module. If you are transitioning a userfile from 1.8 or earlier, you should load this AND the blowfish module. By doing so, Eggdrop will seamlessly update the old blowfish hashes to the new PBKDF2 hashes once a user logs in for the first time, and allow you to (eventually) remove the blowfish module altogether.

Outside of the specific case noted above, please note that if you change your encryption method later (i.e. using other modules like a rijndael module), you can’t use your current userfile anymore.

Put this line into your Eggdrop configuration file to load the server module::
loadmodule pbkdf2

There are also some variables you can set in your config file:

set pbkdf2-method “SHA256â€
Cryptographic hash function used. Use openssl list -digest-algorithms to view all available options
set pbkdf2-rounds 1600
Number of rounds. The higher the number, the longer hashing takes; but also generally the higher the protection against brute force attacks.

This module requires: none

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/twitch.html0000664000175000017500000002702114703073435016711 0ustar geogeo Twitch Module — Eggdrop 1.9.2 documentation

Last revised: April 20, 2020

Twitch Module¶

This module attempts to provide connectivity with the Twitch gaming platform. While Twitch provides an IRC gateway to connect with it’s streaming service, it does not claim to (and certainly does not) follow the IRC RFC in any meaningful way. The intent of this module is not to provide the full spectrum of management functions typically associated with Eggdrop; instead it focuses around the following key functions:

  • Logging of general and Twitch-specific events (raids, blocks, bit donations)
  • Tracking userstate and roomstate values
  • Adding Tcl event binds for a number of Twitch events

This module requires: irc.mod

Put this line into your Eggdrop configuration file to load the twitch module:

loadmodule twitch

and set net-type “Twitch†in your config file.

Limitations¶

There are a few things you should know about how Twitch provides service through the IRC gateway that affects how well Eggdrop can function: * Twitch does not broadcast JOINs or PARTs for channels over 1,000 users. This renders tracking users on a channel unreliable. * Twitch does not broadcast MODE changes for moderator status. This (mostly) renders tracking the status of users infeasible. (See Tcl below section for workaround) * Twitch stores bans on its servers (and does not accept MODE +b), making the Eggdrop ban list (and exempts/invites) mostly useless * Twitch does not allow clients to issue MODE +o/-o commands, preventing Eggdrop from op’ing users through the traditional method

… but the good news is, we have extended much of the Twitch functionality to Tcl!

Tcl API¶

That last section was a little bit of a downer, but don’t worry, we added a TON of functionality to the Tcl API. This module adds binds for the following Twitch events:

  • CLEARCHAT
  • CLEARMSG
  • HOSTTARGET
  • WHISPER
  • ROOMSTATE
  • USERSTATE
  • USERNOTICE

Partyline commands¶

This module adds the following commands to the partyline: * userstate - Lists current userstate on a channel * roomsstate - Lists current roomstate for a channel * twcmd - Issues a traditional Twitch web interface command to the Twitch server (/ban, /block, /host, etc)

Copyright (C) 2020 - 2024 Eggheads Development Team
eggdrop-1.10.0/doc/html/modules/assoc.html0000664000175000017500000001517614703073435016527 0ustar geogeo Assoc Module — Eggdrop 1.9.2 documentation

Last revised: January 1, 2002

Assoc Module¶

This module provides assoc support, i.e. naming channels on the botnet.

This module requires: none

Put this line into your Eggdrop configuration file to load the assoc module:

loadmodule assoc

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/0000775000175000017500000000000014703073435015276 5ustar geogeoeggdrop-1.10.0/doc/html/modules/mod/blowfish.html0000664000175000017500000002373314703073435020011 0ustar geogeo Blowfish Module — Eggdrop 1.10.0 documentation

Last revised: January 28, 2003

Blowfish Module¶

Eggdrop can encrypt your userfile, so users can have secure passwords. Please note that when you change your encryption method later (i.e. using other modules like a md5 module), you can’t use your current userfile anymore. Eggdrop will not start without an encryption module.

This module requires: none

Put this line into your Eggdrop configuration file to load the blowfish module:

loadmodule blowfish

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/uptime.html0000664000175000017500000002461614703073435017500 0ustar geogeo Uptime Module — Eggdrop 1.10.0 documentation

Last revised: Mar 14, 2023

Uptime Module¶

This module reports uptime statistics to the uptime contest web site at https://www.eggheads.org/uptime. Go look and see what your uptime is! It takes about 9 hours to show up, so if your bot isn’t listed, try again later.

Information sent to the server includes the bot’s uptime, botnet-nick, server, version, and IP address. This information is stored in a temporary logfile for debugging purposes only. The only publicly available information will be the bot’s botnet-nick, version and uptime. If you do not wish for this information to be sent, comment out the ‘loadmodule uptime’ line in your bot’s config file.

This module requires: server

Put this line into your Eggdrop configuration file to load the uptime module:

loadmodule uptime

Copyright (C) 2001 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/ident.html0000664000175000017500000003370414703073435017276 0ustar geogeo Ident Module — Eggdrop 1.10.0 documentation

Last revised: June 27, 2019

Ident Module¶

This module adds Eggdrop support for the externally-provided oident service, or alternatively the ability for Eggdrop to act as its own ident daemon.

Traditionally, an IRC server queries port 113 on an irc client’s host to determine the ident for the client. The client’s host normally replies with the username of the account. If the host machine is running oident as its ident service, Eggdrop can now interact with oident to instead reply with a custom ident specified by Eggdrop (oidentd is an external service not specific to Eggdrop nor maintained by Eggheads developers, thus no support for it can be given).

Alternatively, this module can also allow Eggdrop to act as its own ident daemon, answering queries from the IRC server directly. While this option may be of use to a very specific group of people, it requires additional external configuration via root access. Because most modern OSs do not allow user-level programs to bind to port 113, required by this option, a user must either:

  • Allow Eggdrop to bind to ports <1024 via the command:

    sudo setcap "cap_net_bind_service=+ep" /path/to/eggdrop
    

    Warning: this will allow Eggdrop to any port below 1024, potentially allowing a user to impersonate a standard system service with Eggdrop

  • Use iptables to re-route ident queries destined for port 113 to a >1024 port that Eggdrop can bind to, for example by running:

    sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport \
    113 -j REDIRECT --to-port <ident port in config>'
    

Additionally, using Eggdrop as a built-in ident daemon can cause issues when running multiple bots from the same account. The ident server is only activated and bound to the configured ident port while Eggdrop is connecting to an IRC server, but only one Eggdrop can bind to port 113 at a time. If multiple bots were to start at the same time, such as after a netsplit or host reboot, only one bot can bind to port 113 at a time, creating ident conflicts. Thus, this option is best suited for single-bot environments.

This module requires:
  • oident to be running on your shell host, configured to allow user spoofing, for the oidentd method.

Put this line into your Eggdrop configuration file to load the ident module:

loadmodule ident

There are also some variables you can set in your config file:

set ident-method 0
This sets which ident method you wish to use:
0 = oidentd / Your bot will overwrite $HOME/.oidentd.conf right before

opening the socket to the IRC server with the global reply.

1 = Builtin / Your bot will automatically turn its builtin identd on and

off when needed so it shouldn’t conflict with other identds that do the same. Ident port 113 is normally restricted to privileged processes on UNIX systems.

set ident-port 113

This sets the port which port Eggdrop will attempt to bind to for option 1 of ident-method. Most OSs do not allow non-privileged programs such as Eggdrop to bind to ports <1024; please read the beginning of this document for potential ways to implement this setting.

Copyright (C) 2019 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/pbkdf2.html0000664000175000017500000002604014703073435017336 0ustar geogeo PBKDF2 Module — Eggdrop 1.10.0 documentation

Last revised: October 28, 2020

PBKDF2 Module¶

Eggdrop encrypts its userfile, so users can have secure passwords. Eggdrop will not start without an encryption module.

As of Eggdrop 1.9.0, a new encryption module was added, the PBKDF2 module. The PBKDF2 module was designed to work with the previous encryption module (blowfish) to make the transition easier. If this is a new bot, you can safely load just the PBKDF2 module. If you are transitioning a userfile from 1.8 or earlier, you should load this AND the blowfish module. By doing so, Eggdrop will seamlessly update the old blowfish hashes to the new PBKDF2 hashes once a user logs in for the first time, and allow you to (eventually) remove the blowfish module altogether.

Outside of the specific case noted above, please note that if you change your encryption method later (i.e. using other modules like a rijndael module), you can’t use your current userfile anymore.

Put this line into your Eggdrop configuration file to load the server module::

loadmodule pbkdf2

There are also some variables you can set in your config file:

set pbkdf2-method “SHA256â€

Cryptographic hash function used. Use openssl list -digest-algorithms to view all available options

set pbkdf2-rounds 1600

Number of rounds. The higher the number, the longer hashing takes; but also generally the higher the protection against brute force attacks.

This module requires: none

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/twitch.html0000664000175000017500000003037214703073435017473 0ustar geogeo Twitch Module — Eggdrop 1.10.0 documentation

Last revised: April 20, 2020

Twitch Module¶

This module attempts to provide connectivity with the Twitch gaming platform. While Twitch provides an IRC gateway to connect with it’s streaming service, it does not claim to (and certainly does not) follow the IRC RFC in any meaningful way. The intent of this module is not to provide the full spectrum of management functions typically associated with Eggdrop; instead it focuses around the following key functions:

  • Logging of general and Twitch-specific events (raids, blocks, bit donations)

  • Tracking userstate and roomstate values

  • Adding Tcl event binds for a number of Twitch events

This module requires: irc.mod

Put this line into your Eggdrop configuration file to load the twitch module:

loadmodule twitch

and set net-type “Twitch†in your config file.

Limitations¶

There are a few things you should know about how Twitch provides service through the IRC gateway that affects how well Eggdrop can function: * Twitch does not broadcast JOINs or PARTs for channels over 1,000 users. This renders tracking users on a channel unreliable. * Twitch does not broadcast MODE changes for moderator status. This (mostly) renders tracking the status of users infeasible. (See Tcl below section for workaround) * Twitch stores bans on its servers (and does not accept MODE +b), making the Eggdrop ban list (and exempts/invites) mostly useless * Twitch does not allow clients to issue MODE +o/-o commands, preventing Eggdrop from op’ing users through the traditional method

… but the good news is, we have extended much of the Twitch functionality to Tcl!

Tcl API¶

That last section was a little bit of a downer, but don’t worry, we added a TON of functionality to the Tcl API. This module adds binds for the following Twitch events:

  • CLEARCHAT

  • CLEARMSG

  • HOSTTARGET

  • WHISPER

  • ROOMSTATE

  • USERSTATE

  • USERNOTICE

Partyline commands¶

This module adds the following commands to the partyline: * userstate - Lists current userstate on a channel * roomsstate - Lists current roomstate for a channel * twcmd - Issues a traditional Twitch web interface command to the Twitch server (/ban, /block, /host, etc)

Copyright (C) 2020 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/assoc.html0000664000175000017500000002343014703073435017276 0ustar geogeo Assoc Module — Eggdrop 1.10.0 documentation eggdrop-1.10.0/doc/html/modules/mod/seen.html0000664000175000017500000002411114703073435017115 0ustar geogeo Seen Module — Eggdrop 1.10.0 documentation

Last revised: Mar 14, 2023

Seen Module¶

This module provides very basic seen commands via msg, on channel or via dcc. This module works only for users in the bot’s userlist. If you are looking for a better and more advanced seen module, try the gseen module originally written by G’Quann and forked/updated to work with modern Eggdrop by mortmann. You can find it at https://github.com/michaelortmann/gseen.mod.

This module requires: none

Put this line into your Eggdrop configuration file to load the seen module:

loadmodule seen

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/index.html0000664000175000017500000001460214703073435017276 0ustar geogeo <no title> — Eggdrop 1.9.2 documentation eggdrop-1.10.0/doc/html/modules/mod/woobie.html0000664000175000017500000002341314703073435017453 0ustar geogeo Woobie Module — Eggdrop 1.10.0 documentation eggdrop-1.10.0/doc/html/modules/mod/ctcp.html0000664000175000017500000002517414703073435017126 0ustar geogeo CTCP Module — Eggdrop 1.10.0 documentation

Last revised: February 12, 2002

CTCP Module¶

This module provides the normal ctcp replies that you would expect. Without it loaded, CTCP CHAT will not work.

This module requires: server

Put this line into your Eggdrop configuration file to load the ctcp module:

loadmodule ctcp

There are also some variables you can set in your config file:

set ctcp-mode 0

Set here how the ctcp module should answer ctcps. There are 3 possible operating modes:

0

Normal behavior is used.

1

The bot ignores all ctcps, except for CHAT and PING requests by users with the +o flag.

2

Normal behavior is used, however the bot will not answer more than X ctcps in Y seconds (defined by ‘set flood-ctcp’).

There are also several variables to help make your bot less noticeable. They are: ctcp-version, ctcp-finger, and ctcp-userinfo. You can use set to set them to values you’d like.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/filesys.html0000664000175000017500000004745614703073435017662 0ustar geogeo Filesys Module — Eggdrop 1.10.0 documentation

Last revised: Dec 30, 2017

Filesys Module¶

This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server.

This module requires: transfer

Config file setup¶

Put this line into your Eggdrop configuration file to load the filesys module:

loadmodule filesys

There are also some variables you can set in your config file:

set files-path “/home/mydir/eggdrop/filesysâ€

Set here the ‘root’ directory for the file system.

set incoming-path “/home/mydir/eggdrop/filesys/incomingâ€

If you want to allow uploads, set this to the directory uploads should be put into. Set this to “†if you don’t want people to upload files to your bot.

set upload-to-pwd 0

If you don’t want to have a central incoming directory, but instead want uploads to go to the current directory that a user is in, set this setting to 1.

set filedb-path “â€

Eggdrop creates a ‘.filedb’ file in each subdirectory of your file area to keep track of its own file system information. If you can’t do that (for example, if the dcc path isn’t owned by you, or you just don’t want it to do that) specify a path here where you’d like all of the database files to be stored instead.

set max-file-users 20

Set here the maximum number of people that can be in the file area at once. Setting this to 0 makes it effectively infinite.

set max-filesize 1024

Set here the maximum allowable file size that will be received (in KB). Setting this to 0 makes it effectively infinite.

Partyline usage¶

.files¶

Moves you into the file transfer sub-system, if it has been enabled on this bot. From there you can browse through the files online and use dcc file transfers to download and upload.

.cancel <file> [file] …¶

Tells the bot to stop sending a file that is pending (either queued, waiting, or in the process of being transferred).

.cd <directory>¶

Changes your current directory if possible. this works exactly like the unix command.

.cp <source> <dst>¶

Copies a file or group of files from one place to another.

.desc <file> <description>¶

Changes the description for a file. if you are a master or file janitor, you can change the description for any file. otherwise you can only change the descriptions for files you have uploaded.

The description is restricted to 3 lines of 60 characters each, and is broken up between words. you can force a line break by putting a ‘|’ in the comment.

.filestats <user> [clear]¶

Reports on the users upload & download statistics. Optional argument ‘clear’ clears a users upload and download statistics.

.stats¶

Clears a users upload & download statistics.

.get <filename> [nickname]¶

Sends you the file(s) requested, over IRC. you should get a DCC SEND notice on IRC, and have your client accept it. if your nickname on IRC is different than the one you use on the bot, you should specify a nickname too. you can also use that to send files to other people. if a file you want is actually on another bot, it may take a little bit longer so be patient. if that bot isn’t on the botnet right now, it will say the file isn’t available.

There is a limit to the number of transfers you can have going simultaneously, so if you go over this limit, the remainder of your file requests will be queued. As the first files finish transferring, the queued files will be sent.

.hide <file> [files] …¶

Marks a file as hidden, so that normal users can’t see it. Only a master or file janitor using %b’lsa’%b can see hidden files.

.ln <bot:filepath> <localfile>¶

Creates a link to a file on another bot. The filepath has to be complete, like ‘/gifs/uglyman.gif’. If the bot is not connected to the botnet, nobody will be able to download the file until that bot connects again. The local filename can be anything you want.

Example: ln Snowbot:/gifs/uglyman.gif ugly.gif

.ls [filemask]¶

Displays the files in the current directory. Subdirectories are shown with “<DIR>†next to them, and other files will display their size (typically in kilobytes), who uploaded them (and when), and how many times each file has been downloaded. If a description of the file exists, it is displayed below the filename. You can restrict the file listing by specifying a mask, just like in unix.

.mkdir <dir> [flags [channel]]¶

Creates a subdirectory from this one, with the given name. If flags are specified, then those flags are required to enter or even see the directory. You can even specify a channel that the flags are matched against. You can use the %b’mkdir’%b command again to alter or remove those flags.

.mv <source> <dest>¶

Moves a file or group of files from one place to another (it can also be used to rename files).

.pending¶

Gives you a listing of every file you’ve requested which is still waiting, queued, or in the process of transferring. It shows you the nickname on IRC that the file is being sent to, and, if the transfer is in progress, tells you how far along the transfer is.

.pwd¶

Tells you what your current directory is.

.quit¶

Exits the file system.

rm <file> [files] …¶

Erase a file for good.

.rmdir <dir>¶

Removes an existing directory, if there are no files in it.

.share <file> [files] …¶

Marks a file as shared. This means that other bots can get the file remotely for users on their file systems. By default, files are marked as unshared.

.optimize¶

Cleans up the current directory’s database. If you have a large directory with many files you may want to use this command if you experience slow-downs/delays over time. Normally, the db should clean up itself though.

.unhide¶

Makes a file be not hidden any more.

.unshare <file> [file] …¶

Removes the shared tag from a file.

.filesys module¶

This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server.

The following commands are provided by the filesys module:

For filesystem users:

files

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/dns.html0000664000175000017500000002577114703073435016764 0ustar geogeo DNS Module — Eggdrop 1.10.0 documentation

Last revised: September 26, 2010

DNS Module¶

This module provides asynchronous dns support. This will avoid long periods where the bot just hangs there, waiting for a hostname to resolve, which will often let it timeout on all other connections.

This module requires: none

Put this line into your Eggdrop configuration file to load the dns module:

loadmodule dns

There are also some variables you can set in your config file:

set dns-servers “8.8.8.8 8.8.4.4â€

In case your bot has trouble finding dns servers or you want to use specific ones, you can set them here. The value is a list of dns servers. The relative order doesn’t matter. You can also specify a non-standard port. The default is to use the system specified dns servers. You don’t need to modify this normally.

set dns-cache 86400

Specify how long should the DNS module cache replies at maximum. The value must be in seconds. Note that it will respect the TTL of the reply and this is just an upper boundary.

set dns-negcache 600

Specify how long should the DNS module cache negative replies (NXDOMAIN, DNS Lookup failed). The value must be in seconds.

set dns-maxsends 4

How many times should the DNS module resend the query for a given domain if it receives no reply?

set dns-retrydelay 3

Specify how long should the DNS module wait for a reply before resending the query. The value must be in seconds.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/compress.html0000664000175000017500000002443514703073435020027 0ustar geogeo Compress Module — Eggdrop 1.10.0 documentation

Last revised: May 27, 2004

Compress Module¶

This module provides support for file compression. It can be used to compress files via Tcl or to transfer the userfile compressed during the share process, saving bandwidth.

This module requires: share

Put this line into your Eggdrop configuration file to load the compress module:

loadmodule compress

There are also some variables you can set in your config file:

set share-compressed 1

Allow compressed sending of user files? The user files are compressed with the compression level defined in ‘compress-level’.

set compress-level 9

This is the default compression level used. These levels are the same as those used by GNU gzip.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/server.html0000664000175000017500000005263514703073435017505 0ustar geogeo Server Module — Eggdrop 1.10.0 documentation

Last revised: October 25, 2010

Server Module¶

This module provides the core server support. You have to load this if you want your bot to come on IRC. Not loading this is equivalent to the old NO_IRC define.

This module requires: none

Put this line into your Eggdrop configuration file to load the server module:

loadmodule server

There are also some variables you can set in your config file:

set net-type Efnet

What is your network? Possible allowed values are Efnet, IRCnet, Undernet, DALnet, Libera, freenode, Quakenet, Rizon, Other. If the network you use is not listed, using “Other†is a good sane choice and can be customized with settings both here and in the IRC module sections of the config file.

set nick “LamestBotâ€

Set the nick the bot uses on IRC, and on the botnet unless you specify a separate botnet-nick, here.

set altnick “L?m?stB?tâ€

Set the alternative nick which the bot uses on IRC if the nick specified by ‘set nick’ is unavailable. All ‘?’ characters will be replaced by random numbers.

set keep-nick 1

This setting makes the bot try to get his original nickname back if its primary nickname is already in use.

set realname “/msg LamestBot helloâ€

Set here what to display in the real-name field for the bot.

bind evnt - init-server evnt:init_server
proc evnt:init_server {type} {
  global botnick
  putquick "MODE $botnick +i-ws"
}

… is Tcl scripting that is run immediately after connecting to a server.

set init-server { putquick "MODE $botnick +i-ws" }

… is Tcl scripting that is run immediately after connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc).

set connect-server { putlog "Connecting to server." }

… is Tcl scripting that is run immediately before connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc).

set disconnect-server { putlog "Disconnected from server." }

… is a Tcl script that is run immediately after disconnecting from a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc).

set servers {
  you.need.to.change.this:6667
  another.example.com:7000:password
  [2001:db8:618:5c0:263::]:6669:password
  ssl.example.net:+6697
}

… is the bot’s server list. The bot will start at the first server listed, and cycle through them whenever it gets disconnected. You need to change these servers to YOUR network’s servers.

The format is:

server[:port[:password]]

Prefix the port with a plus sign to attempt a SSL connection:

server:+port[:password]

Both the port and password fields are optional; however, if you want to set a password or use SSL you must also set a port. If a port isn’t specified it will default to your default-port setting.

set default-port 6667

Set the default port which should be used if none is specified with ‘.jump’ or in ‘set servers’.

set msg-rate 2

Number of seconds to wait between transmitting queued lines to the server. Lower this value at your own risk. ircd is known to start flood control at 512 bytes/2 seconds.

set ssl-verify-servers 0

Control certificate verification for servers. You can set this by adding together the numbers for all exceptions you want to enable. By default certificate verification is disabled and all certificates are assumed to be valid. The numbers are the following:

The numbers are the following:

0

disable verification

1

enable certificate verification

2

allow self-signed certificates

4

don’t check peer common or alt names

8

allow expired certificates

16

allow certificates which are not valid yet

32

allow revoked certificates

set server-cycle-wait 60

This setting defines how long Eggdrop should wait before moving from one server to another on disconnect. If you set 0 here, Eggdrop will not wait at all and will connect instantly. Setting this too low could result in your bot being K:Lined.

set server-timeout 60

Set here how long Eggdrop should wait for a response when connecting to a server before giving up and moving on to next server.

set check-stoned 1

Set this to 1 if Eggdrop should check for stoned servers? (where the server connection has died, but Eggdrop hasn’t been notified yet).

set serverror-quit 1

If you want your bot to exit the server if it receives an ERROR message, set this to 1.

set max-queue-msg 300

Set here the maximum number of lines to queue to the server. If you’re going to dump large chunks of text to people over IRC, you will probably want to raise this. 300 is fine for most people though.

set quiet-reject 1

This setting makes the bot squelch the error message when rejecting a DCC CHAT, SEND or message command. Normally, Eggdrop notifies the user that the command has been rejected because they don’t have access. Note that sometimes IRC server operators detect bots that way.

set flood-msg 5:60

Set here how many msgs in how many seconds from one host constitutes a flood. If you set this to 0:0, msg flood protection will be disabled.

set flood-ctcp 3:60

Set here how many ctcps in how many seconds from one host are recognized as a flood. Not specifying or using number = 0 will not check against ctcp floods.

set answer-ctcp 3

Set how many ctcps should be answered at once here.

set lowercase-ctcp 0

If you want your bot to answer lower case ctcp requests (non rfc- compliant), set this setting to 1. mIRC will do this, most other clients will not.

set trigger-on-ignore 0

If you want Eggdrop to trigger binds for ignored users, set this to 1.

set exclusive-binds 0

This setting configures PUBM and MSGM binds to be exclusive of PUB and MSG binds. This means if a MSGM bind with the mask “help†exists and is triggered, any MSG bindings with “help†in their mask will not be triggered. Don’t enable this unless you know what you are doing!

set double-mode 0

Allow identical messages in the mode queue?

set double-server 0

Allow identical messages in the server queue?

set double-help 0

Allow identical messages in the help queue?

set use-penalties 1 (default on net-type IRCnet)

This enables Eggdrop’s penalty calculation. Every command Eggdrop sends to the IRC server raises its penalty points. If Eggdrop reaches a server limit, it gets disconnected with “excess flood†message. Eggdrop is able to count internal those penalty points, too and take measures against excess flooding. Note: it’s highly advised to turn this on!

set optimize-kicks 1

This optimizes the kick queue. It also traces nick changes and parts in the channel and changes the kick queue accordingly. There are three different options for this setting:

0

Turn it off.

1

Optimize the kick queue by summarizing kicks.

2

Trace nick changes and parts on the channel and change the queue accordingly. For example, bot will not try to kick users who have already parted the channel.

ATTENTION: Setting 2 is very CPU intensive.

There are additional settings for ‘net-type’ Efnet.

net-type 5 specific features:

Attention: Use this settings only if you set ‘net-type’ to Efnet!

set check-mode-r 1

This settings defines how umode +r is understood by Eggdrop. Some networks use +r to indicate a restricted connection. If this is your case, and you want your bot to leave restricted servers and jump to the next server on its list, then set it to 1. Please note, this setting is automatically set to 0 for net-type of Efnet, Undernet, and DALnet, and set to 1 for net-type IRCNet.

set nick-len 9

This setting allows you to specify the maximum nick-length supported by your network. The default setting is 9. The maximum supported length by Eggdrop is 32.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/notes.html0000664000175000017500000002534514703073435017325 0ustar geogeo Notes Module — Eggdrop 1.10.0 documentation

Last revised: January 1, 2002

Notes Module¶

This module provides support for storing of notes for users from each other. Note sending between currently online users is supported in the core, this is only for storing the notes for later retrieval.

This module requires: none

Put this line into your Eggdrop configuration file to load the notes module:

loadmodule notes

There are also some variables you can set in your config file:

set notefile “LamestBot.notesâ€

Set here the filename where private notes between users are stored.

set max-notes 50

Set here the maximum number of notes to allow to be stored for each user (to prevent flooding).

set note-life 60

Set here how long (in days) to store notes before expiring them.

set allow-fwd 0

Set this to 1 if you want to allow users to specify a forwarding address for forwarding notes to another account on another bot.

set notify-users 1

Set this to 1 if you want the bot to let people know hourly if they have any notes.

set notify-onjoin 1

Set this to 1 if you want the bot to let people know on join if they have any notes.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/share.html0000664000175000017500000002647414703073435017303 0ustar geogeo Share Module — Eggdrop 1.10.0 documentation

Last revised: November 27, 2003

Share Module¶

This module provides userfile sharing support between two directly linked bots.

This module requires: transfer, channels

Put this line into your Eggdrop configuration file to load the share module:

loadmodule share

There are also some variables you can set in your config file:

set allow-resync 0

When two bots get disconnected, this setting allows them to create a resync buffer which saves all changes done to the userfile during the disconnect. When they reconnect, they will not have to transfer the complete user file, but, instead, just send the resync buffer.

set resync-time 900

This setting specifies how long to hold another bots resync data before flushing it. This is a setting for allow-resync.

set private-global 0

When sharing user lists, DON’T ACCEPT global flag changes from other bots? NOTE: The bot will still send changes made on the bot, it just won’t accept any global flag changes from other bots. This overrides the private-globals setting (below).

set private-globals “mnotâ€

When sharing user lists, if private-global isn’t set, which global flag changes from other bots should be ignored?

set private-user 0

When sharing user lists, don’t accept ANY userfile changes from other bots? Paranoid people should use this feature on their hub bot. This will force all userlist changes to be made via the hub.

set override-bots 0

This setting makes the bot discard its own bot records in favor of the ones sent by the hub. NOTE: No passwords or botflags are shared, only ports and address are added to sharing procedure. This only works with hubs that are v1.5.1 or higher.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/transfer.html0000664000175000017500000002515614703073435020021 0ustar geogeo Transfer Module — Eggdrop 1.10.0 documentation

Last revised: November 29, 2023

Transfer Module¶

The transfer module provides DCC SEND/GET support and userfile transfer support for userfile sharing.

This module requires: none

Put this line into your Eggdrop configuration file to load the transfer module:

loadmodule transfer

There are also some variables you can set in your config file:

set max-dloads 3

Set here the maximum number of simultaneous downloads to allow for each user.

set dcc-block 0

Set here the block size for dcc transfers. ircII uses 512 bytes, but admits that may be too small. 1024 is standard these days. Set this to 0 to use turbo-dcc (recommended).

set xfer-timeout 30

Set here the time (in seconds) to wait before an inactive transfer times out.

set sharefail-unlink 1

By default, Eggdrop will abort the linking process if userfile sharing is enabled but the userfile transfer fails. Set this to 0 to keep the bots linked if the userfile transfer fails and retry every minute (both bots must be v1.9.0 or higher).

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/channels.html0000664000175000017500000006546014703073435017772 0ustar geogeo Channels Module — Eggdrop 1.10.0 documentation

Last revised: October 25, 2010

Channels Module¶

This module provides channel related support for the bot. Without it, you won’t be able to make the bot join a channel or save channel specific userfile information.

This module requires: none

Put this line into your Eggdrop configuration file to load the channels module:

loadmodule channels

There are also some variables you can set in your config file:

set chanfile “LamestBot.chanâ€

Enter here the filename where dynamic channel settings are stored.

set force-expire 0

Set this setting to 1 if you want your bot to expire bans/exempts/invites set by other opped bots on the channel.

set share-greet 0

Set this setting to 1 if you want your bot to share user greets with other bots on the channel if sharing user data.

set use-info 1

Set this setting to 1 if you want to allow users to store an info line.

set allow-ps 0

Set this setting to 1 if you want to allow both +p and +s channel modes to be enforced at the same time by the chanmode channel setting. Make sure your server supports +ps mixing or you may get endless mode floods.

channel add #channel { SETTINGS }

This command adds a static channel to your bot (it cannot be removed via the partyline- we recommend using the .+chan command on the partyline instead). This command will add the channel preconfigured with the specified settings. A full list of settings is defined in Channel Settings.

Channel Settings¶

There are two types of channel settings: value-based settings (where you configure a setting with a number or string), and enable/disable-based settings (where you turn a setting on or off). These settings can be configured via Tcl using the ‘channel set’ command:

channel set <chan> <setting>

This command modifies a specific channel setting for a channel. There are many different options for channels which you can define. Some settings are enabled or disabled by a plus or minus in front of them, and others directly take text or integer values.

Value-based Channel Settings¶

chanmode +/-<modes>

This setting makes the bot enforce channel modes. It will always enforce the +<modes> and remove the -<modes> modes.

idle-kick 0

This setting will make the bot check every minute for idle users. Set this to 0 to disable idle check.

stopnethack-mode 0

This setting will make the bot de-op anyone who enters the channel with serverops. There are seven different modes for this settings:

0

turn off

1

isoptest (allow serverop if registered op)

2

wasoptest (allow serverop if user had op before split)

3

allow serverop if isop or wasop

4

allow serverop if isop and wasop.

5

If the channel is -bitch, see stopnethack-mode 3

If the channel is +bitch, see stopnethack-mode 1

6

If the channel is -bitch, see stopnethack-mode 2

If the channel is +bitch, see stopnethack-mode 4

revenge-mode 0

This settings defines how the bot should punish bad users when revenging. There are four possible settings:

0

Deop the user.

1

Deop the user and give them the +d flag for the channel.

2

Deop the user, give them the +d flag for the channel, and kick them.

3

Deop the user, give them the +d flag for the channel, kick, and ban them.

ban-type 3

This setting defines what type of bans should eggdrop place for +k users or when revenge-mode is 3. Available types are:

0 *!user@host

1 *!*user@host

2 *!*@host

3 *!*user@*.host

4 *!*@*.host

5 nick!user@host

6 nick!*user@host

7 nick!*@host

8 nick!*user@*.host

9 nick!*@*.host

You can also specify types from 10 to 19 which correspond to types 0 to 9, but instead of using a * wildcard to replace portions of the host, only numbers in hostnames are replaced with the ‘?’ wildcard. Same is valid for types 20-29, but instead of ‘?’, the ‘*’ wildcard will be used. Types 30-39 set the host to ‘*’.

ban-time 120

Set here how long temporary bans will last (in minutes). If you set this setting to 0, the bot will never remove them.

exempt-time 60

Set here how long temporary exempts will last (in minutes). If you set this setting to 0, the bot will never remove them. The bot will check the exempts every X minutes, but will not remove the exempt if a ban is set on the channel that matches that exempt. Once the ban is removed, then the exempt will be removed the next time the bot checks. Please note that this is an IRCnet feature.

invite-time 60

Set here how long temporary invites will last (in minutes). If you set this setting to 0, the bot will never remove them. The bot will check the invites every X minutes, but will not remove the invite if a channel is set to +i. Once the channel is -i then the invite will be removed the next time the bot checks. Please note that this is an IRCnet feature.

aop-delay (minimum:maximum)

This is used for autoop, autohalfop, autovoice. If an op or voice joins a channel while another op or voice is pending, the bot will attempt to put both modes on one line.

aop-delay 0

No delay is used.

aop-delay X

An X second delay is used.

aop-delay X:Y

A random delay between X and Y is used.

need-op { putserv “PRIVMSG #lamest :op me cos i’m lame!†}

This setting will make the bot run the script enclosed in braces if it does not have ops. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.

need-invite { putserv “PRIVMSG #lamest :let me in!†}

This setting will make the bot run the script enclosed in braces if it needs an invite to the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.

need-key { putserv “PRIVMSG #lamest :let me in!†}

This setting will make the bot run the script enclosed in braces if it needs the key to the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.

need-unban { putserv “PRIVMSG #lamest :let me in!†}

This setting will make the bot run the script enclosed in braces if it needs to be unbanned on the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.

need-limit { putserv “PRIVMSG #lamest :let me in!†}

This setting will make the bot run the script enclosed in braces if it needs the limit to be raised on the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.

flood-chan 15:60

Set here how many channel messages in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables text flood protection for the channel, where X is an integer >= 0.

flood-deop 3:10

Set here how many deops in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables deop flood protection for the channel, where X is an integer >= 0.

flood-kick 3:10

Set here how many kicks in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables kick flood protection for the channel, where X is an integer >= 0.

flood-join 5:60

Set here how many joins in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables join flood protection for the channel, where X is an integer >= 0.

flood-ctcp 3:60

Set here how many channel ctcps in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables ctcp flood protection for the channel, where X is an integer >= 0.

flood-nick 5:60

Set here how many nick changes in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables nick flood protection for the channel, where X is an integer >= 0.

Enable/Disable Channel Settings¶

These settings should be preceded by a + or - to enable or disable the setting, respctively.

enforcebans

When a ban is set, kick people who are on the channel and match the ban

dynamicbans

Only activate bans on the channel when necessary? This keeps the channel’s ban list from getting excessively long. The bot still remembers every ban, but it only activates a ban on the channel when it sees someone join who matches that ban.

userbans

Allow bans to be made by users directly? If turned off, the bot will require all bans to be made through the bot’s console.

dynamicexempts

Only activate exempts on the channel when necessary? This keeps the channel’s exempt list from getting excessively long. The bot still remembers every exempt, but it only activates a exempt on the channel when it sees a ban set that matches the exempt. The exempt remains active on the channel for as long as the ban is still active.

userexempts

Allow exempts to be made by users directly? If turned off, the bot will require all exempts to be made through the bot’s console.

dynamicinvites

Only activate invites on the channel when necessary? This keeps the channel’s invite list from getting excessively long. The bot still remembers every invite, but the invites are only activated when the channel is set to invite only and a user joins after requesting an invite. Once set, the invite remains until the channel goes to -i.

userinvites

Allow invites to be made by users directly? If turned off, the bot will require all invites to be made through the bot’s console.

autoop

Op users with the +o flag as soon as they join the channel This is insecure and not recommended.

autohalfop

Halfop users with the +l flag as soon as they join the channel? This is insecure and not recommended.

bitch

Only let users with the +o flag have op on the channel

greet

Say a user’s info line when they join the channel

protectops

Re-op a user with the +o flag if they get deopped?

protecthalfops

Re-halfop a user with the +l flag if they get dehalfopped

protectfriends

Re-op a user with the +f flag if they get deopped

statuslog

Log the channel status line every 5 minutes? This shows the bot’s status on the channel (op, voice, etc.), the channel’s modes, and the total number of members, ops, voices, regular users, and +b, +e, and +I modes on the channel. A sample status line follows:

[01:40] @#lamest (+istn) : [m/1 o/1 v/4 n/7 b/1 e/5 I/7]

revenge

Remember people who deop/kick/ban the bot, valid ops, or friends and punish them? Users with the +f flag are exempt from revenge.

revengebot

This is similar to to the ‘revenge’ option, but it only triggers if a bot gets deopped, kicked or banned.

autovoice

Voice users with the +v flag when they join the channel?

secret

Prevent this channel from being listed on the botnet?

shared

Share channel-related user info for this channel?

cycle

Cycle the channel when it has no ops?

dontkickops

Do you want the bot not to be able to kick users who have the +o flag, letting them kick-flood for instance to protect the channel against clone attacks?

inactive

This prevents the bot from joining the channel (or makes it leave the channel if it is already there). It can be useful to make the bot leave a channel without losing its settings, channel-specific user flags, channel bans, and without affecting sharing.

seen

Respond to seen requests in the channel? The seen module must be loaded for this to work.

nodesynch

Allow non-ops to perform channel modes? This can stop the bot from fighting with services such as ChanServ, or from kicking IRCops when setting channel modes without having ops.

static

Allow only permanent owners to remove the channel

Default Channel Values¶

The following settings are used as default values when you .+chan #chan or .tcl channel add #chan. You can modify these default values by adding the below values to your config fil. Look in the Channel Settings for an explanation of each option.

set default-flood-chan 15:60

set default-flood-deop 3:10

set default-flood-kick 3:10

set default-flood-join 5:60

set default-flood-ctcp 3:60

set default-flood-nick 5:60

set default-aop-delay 5:30

set default-idle-kick 0

set default-chanmode “ntâ€

set default-stopnethack-mode 0

set default-revenge-mode 0

set default-ban-type 3

set default-ban-time 120

set default-exempt-time 60

set default-invite-time 60

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

}

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/console.html0000664000175000017500000002446314703073435017637 0ustar geogeo Console Module — Eggdrop 1.10.0 documentation

Last revised: January 1, 2002

Console Module¶

This module provides storage of console settings when you exit the bot or type .store on the partyline.

This module requires: none

Put this line into your Eggdrop configuration file to load the console module:

loadmodule console

There are also some variables you can set in your config file:

set console-autosave 1

Save users console settings automatically? Otherwise, they have to use the .store command.

set force-channel 0

If a user doesn’t have any console settings saved, which channel do you want them automatically put on?

set info-party 0

Enable this setting if a user’s global info line should be displayed when they join a botnet channel.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/irc.html0000664000175000017500000003764414703073435016757 0ustar geogeo IRC Module — Eggdrop 1.10.0 documentation

Last revised: August 21, 2004

IRC Module¶

This module controls the bots interaction on IRC. It allows the bot to join channels, etc. You have to load this if you want your bot to come on irc.

This module requires: server, channels

Put this line into your Eggdrop configuration file to load the irc module:

loadmodule irc

There are also some variables you can set in your config file:

set bounce-bans 1

Set this to 1 if you want to bounce all server bans.

set bounce-exempts 0

Set this to 1 if you want to bounce all server exemptions (+e modes). This is disabled if use-exempts is disabled.

set bounce-invites 0

Set this to 1 if you want to bounce all server invitations (+I modes). This is disabled if use-invites is disabled.

set bounce-modes 0

Set this to 1 if you want to bounce all server modes.

set max-modes 30

There is a global limit for +b/+e/+I modes. This limit should be set to the same value as max-bans for networks that do not support +e/+I.

set max-bans 30

Set here the maximum number of bans you want the bot to set on a channel. Eggdrop will not place any more bans if this limit is reached. Undernet currently allows 45 bans, IRCnet allows 30, EFnet allows 100, and DALnet allows 100.

set max-exempts 20

Set here the maximum number of exempts you want Eggdrop to set on a channel. Eggdrop will not place any more exempts if this limit is reached.

set max-invites 20

Set here the maximum number of invites you want Eggdrop to set on a channel. Eggdrop will not place any more invites if this limit is reached.

set use-exempts 0
set use-invites 0

These settings should be left commented unless the default values are being overridden. By default, exempts and invites are on for EFnet and IRCnet, but off for all other large networks. This behavior can be modified with the following 2 flags. If your network doesn’t support +e/+I modes then you will be unable to use these features.

set learn-users 0

If you want people to be able to add themselves to the bot’s userlist with the default userflags (defined above in the config file) via the ‘hello’ msg command, set this to 1.

set wait-split 600

Set here the time (in seconds) to wait for someone to return from a netsplit (i.e. wasop will expire afterwards). Set this to 1500 on IRCnet since its nick delay stops after 30 minutes.

set wait-info 180

Set here the time (in seconds) that someone must have been off-channel before re-displaying their info line.

set mode-buf-length 200

Set this to the maximum number of bytes to send in the arguments of modes sent to the server. Most servers default this to 200.

unbind msg - hello *msg:hello
bind msg - myword *msg:hello

Many IRCops find bots by seeing if they reply to ‘hello’ in a msg. You can change this to another word by un-commenting these two lines and changing “myword†to the word wish to use instead of’hello’. It must be a single word.

unbind msg - ident *msg:ident
unbind msg - addhost *msg:addhost Many takeover attempts occur due to lame users blindly /msg ident’ing to

the bot and attempting to guess passwords. We now unbind this command by default to discourage them. You can enable this command by un-commenting these two lines.

set opchars “@â€
#set opchars “@&~â€

Some IRC servers are using some non-standard op-like channel prefixes/modes. Define them here so the bot can recognize them. Just “@†should be fine for most networks. Un-comment the second line for some UnrealIRCds.

set no-chanrec-info 0

If you are so lame you want the bot to display peoples info lines, even when you are too lazy to add their chanrecs to a channel, set this to 1. NOTE This means every user with an info line will have their info line displayed on EVERY channel they join (provided they have been gone longer than wait-info).

These were the core irc module settings. There are more settings for ‘net-type’ IRCnet and Efnet. net-type has to be set in the server module config section.

Use the following settings only if you set ‘net-type’ to IRCnet!

set prevent-mixing 1

At the moment, the current IRCnet IRCd version (2.10) doesn’t support the mixing of b, o and v modes with e and I modes. This might be changed in the future, so use 1 at the moment for this setting.

Use the following settings only if you set ‘net-type’ to Efnet!

set kick-method 1

If your network supports more users per kick command then 1, you can change this behavior here. Set this to the number of users to kick at once, or set this to 0 for all at once.

set modes-per-line 3

Some networks allow you to stack lots of channel modes into one line. They’re all guaranteed to support at least 3, so that’s the default. If you know your network supports more, you may want to adjust this. This setting is limited to 6, although if you want to use a higher value, you can modify this by changing the value of MODES_PER_LINE_MAX in src/chan.h and recompiling the bot.

set include-lk 1

Some networks don’t include the +l limit and +k or -k key modes in the modes-per-line (see above) limitation. Set include-lk to 0 for these networks.

set use-354 0

Set this to 1 if your network uses IRCu2.10.01 specific /who requests. Eggdrop can, therefore, ask only for exactly what’s needed.

set rfc-compliant 1

If your network doesn’t use rfc 1459 compliant string matching routines, set this to 0.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/mod/python.html0000664000175000017500000003216614703073435017515 0ustar geogeo Python Module — Eggdrop 1.10.0 documentation

Last revised: November 03, 2023

Python Module¶

This module adds a Python interpreter to Eggdrop, allowing you to run Python scripts.

System Requirements¶

This module requires Python version 3.8 or higher in order to run. Similar to Tcl requirements, Eggdrop requires both python and python development libraries to be installed on the host machine. On Debian/Ubuntu machines, this means the packages python, python-dev AND python-is-python3 to be installed. The python-is-python3 updates symlinks on the host system that allow Eggdrop to find it.

Loading Python¶

Put this line into your Eggdrop configuration file to load the python module:

loadmodule python

To load a python script from your config file, place the .py file in the scripts/ folder and add the following line to your config:

pysource scripts/myscript.py

Partyline Commands¶

python <expression>¶

You can run a python command from the partyline with the .python command, such as:

.python 1 + 1
Python: 2
.python from eggdrop.tcl import putmsg; putmsg('#chan', 'Hello world!')
Python: None

.binds python¶

The python module extends the core .binds partyline command by adding a python mask. This command will list all binds for python scripts.

Tcl Commands¶

pysource <path/to/file>¶

The pysource command is analogous to the Tcl source command, except that it loads a Python script into Eggdrop instead of a Tcl script.

eggdrop-1.10.0/doc/html/modules/seen.html0000664000175000017500000002201214703073435016334 0ustar geogeo Seen Module — Eggdrop 1.9.2 documentation

Last revised: January 1, 2002

Seen Module¶

This module provides very basic seen commands via msg, on channel or via dcc. This module works only for users in the bot’s userlist. If you are looking for a better and more advanced seen module, try the gseen module by G’Quann. You can find it at http://www.kreativrauschen.com/gseen.mod/.

This module requires: none

Put this line into your Eggdrop configuration file to load the seen module:

loadmodule seen

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/index.html0000664000175000017500000002532714703073435016525 0ustar geogeo Eggdrop Module Information — Eggdrop 1.10.0 documentation

Eggdrop Module Information Last revised: Jul 25, 2016

Eggdrop Module Information¶

What are modules?¶

Modules are independent portions of code that are loaded separately from the main core code of Eggdrop. This allows users to only implement the features they desire without adding the extra overhead or “bloat†of those they don’t, or even write their own module to add an enhancement not currently implemented by the Eggdrop development team. For example, the transfer module provides the ability to transfer files to and from the Eggdrop, and the ident module provides the ability to run an ident server to answer ident requests.

How to install a module¶

Please note that these are only basic instructions for compiling and installing a module. Please read any and all directions included with the module you wish to install.

  1. Download and un-tar the Eggdrop source code.

  2. Place the new module in its own directory (in the format of (modulename).mod) in src/mod.

  3. Run ./configure (from eggdrop-1.10.0/).

  4. Type ‘make config’ or ‘make iconfig’.

  5. Type ‘make’.

  6. Copy the compiled module file (modulename.so) into your bot’s modules folder.

  7. Add ‘loadmodule modulename’ to your eggdrop.conf file (do not add the .so suffix).

  8. Rehash or restart your bot.

To view your currently loaded modules, type ‘.module’.

Can I compile Eggdrop without dynamic modules? (Static compile)¶

Yes, you can. If the configure script detects that your system CAN’T run modules, it will setup ‘make’ to link the modules in statically for you. You can choose this option yourself by using ‘make static’. You can also try to compile dynamic modules on a static-only system by using ‘make eggdrop’.

Do I still need to ‘loadmodule’ modules?¶

YES, when you compile statically, all the modules are linked into the main executable. HOWEVER, they are not enabled until you use loadmodule to enable them, hence you get nearly the same functionality with static modules as with dynamic modules.

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/woobie.html0000664000175000017500000002146314703073435016677 0ustar geogeo Woobie Module — Eggdrop 1.9.2 documentation

Last revised: December 31, 2001

Woobie Module¶

This is for demonstrative purposes only. If you are looking for starting point in writing modules, woobie is the right thing.

This module requires: none

Put this line into your Eggdrop configuration file to load the woobie module:

loadmodule woobie

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/ctcp.html0000664000175000017500000002331714703073435016344 0ustar geogeo CTCP Module — Eggdrop 1.9.2 documentation

Last revised: February 12, 2002

CTCP Module¶

This module provides the normal ctcp replies that you would expect. Without it loaded, CTCP CHAT will not work.

This module requires: server

Put this line into your Eggdrop configuration file to load the ctcp module:

loadmodule ctcp

There are also some variables you can set in your config file:

set ctcp-mode 0

Set here how the ctcp module should answer ctcps. There are 3 possible operating modes:

0 Normal behavior is used.
1 The bot ignores all ctcps, except for CHAT and PING requests by users with the +o flag.
2 Normal behavior is used, however the bot will not answer more than X ctcps in Y seconds (defined by ‘set flood-ctcp’).

There are also several variables to help make your bot less noticeable. They are: ctcp-version, ctcp-finger, and ctcp-userinfo. You can use set to set them to values you’d like.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/filesys.html0000664000175000017500000004626214703073435017075 0ustar geogeo Filesys Module — Eggdrop 1.9.2 documentation

Last revised: Dec 30, 2017

Filesys Module¶

This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server.

This module requires: transfer

Config file setup¶

Put this line into your Eggdrop configuration file to load the filesys module:

loadmodule filesys

There are also some variables you can set in your config file:

set files-path “/home/mydir/eggdrop/filesysâ€
Set here the ‘root’ directory for the file system.
set incoming-path “/home/mydir/eggdrop/filesys/incomingâ€
If you want to allow uploads, set this to the directory uploads should be put into. Set this to “†if you don’t want people to upload files to your bot.
set upload-to-pwd 0
If you don’t want to have a central incoming directory, but instead want uploads to go to the current directory that a user is in, set this setting to 1.
set filedb-path “â€
Eggdrop creates a ‘.filedb’ file in each subdirectory of your file area to keep track of its own file system information. If you can’t do that (for example, if the dcc path isn’t owned by you, or you just don’t want it to do that) specify a path here where you’d like all of the database files to be stored instead.
set max-file-users 20
Set here the maximum number of people that can be in the file area at once. Setting this to 0 makes it effectively infinite.
set max-filesize 1024
Set here the maximum allowable file size that will be received (in KB). Setting this to 0 makes it effectively infinite.

Partyline usage¶

.files¶

Moves you into the file transfer sub-system, if it has been enabled on this bot. From there you can browse through the files online and use dcc file transfers to download and upload.

.cancel <file> [file] …¶

Tells the bot to stop sending a file that is pending (either queued, waiting, or in the process of being transferred).

.cd <directory>¶

Changes your current directory if possible. this works exactly like the unix command.

.cp <source> <dst>¶

Copies a file or group of files from one place to another.

.desc <file> <description>¶

Changes the description for a file. if you are a master or file janitor, you can change the description for any file. otherwise you can only change the descriptions for files you have uploaded.

The description is restricted to 3 lines of 60 characters each, and is broken up between words. you can force a line break by putting a ‘|’ in the comment.

.filestats <user> [clear]¶

Reports on the users upload & download statistics. Optional argument ‘clear’ clears a users upload and download statistics.

.stats¶

Clears a users upload & download statistics.

.get <filename> [nickname]¶

Sends you the file(s) requested, over IRC. you should get a DCC SEND notice on IRC, and have your client accept it. if your nickname on IRC is different than the one you use on the bot, you should specify a nickname too. you can also use that to send files to other people. if a file you want is actually on another bot, it may take a little bit longer so be patient. if that bot isn’t on the botnet right now, it will say the file isn’t available.

There is a limit to the number of transfers you can have going simultaneously, so if you go over this limit, the remainder of your file requests will be queued. As the first files finish transferring, the queued files will be sent.

.hide <file> [files] …¶

Marks a file as hidden, so that normal users can’t see it. Only a master or file janitor using %b’lsa’%b can see hidden files.

.ln <bot:filepath> <localfile>¶

Creates a link to a file on another bot. The filepath has to be complete, like ‘/gifs/uglyman.gif’. If the bot is not connected to the botnet, nobody will be able to download the file until that bot connects again. The local filename can be anything you want.

Example: ln Snowbot:/gifs/uglyman.gif ugly.gif

.ls [filemask]¶

Displays the files in the current directory. Subdirectories are shown with “<DIR>†next to them, and other files will display their size (typically in kilobytes), who uploaded them (and when), and how many times each file has been downloaded. If a description of the file exists, it is displayed below the filename. You can restrict the file listing by specifying a mask, just like in unix.

.mkdir <dir> [flags [channel]]¶

Creates a subdirectory from this one, with the given name. If flags are specified, then those flags are required to enter or even see the directory. You can even specify a channel that the flags are matched against. You can use the %b’mkdir’%b command again to alter or remove those flags.

.mv <source> <dest>¶

Moves a file or group of files from one place to another (it can also be used to rename files).

.pending¶

Gives you a listing of every file you’ve requested which is still waiting, queued, or in the process of transferring. It shows you the nickname on IRC that the file is being sent to, and, if the transfer is in progress, tells you how far along the transfer is.

.pwd¶

Tells you what your current directory is.

.quit¶

Exits the file system.

rm <file> [files] …¶

Erase a file for good.

.rmdir <dir>¶

Removes an existing directory, if there are no files in it.

.share <file> [files] …¶

Marks a file as shared. This means that other bots can get the file remotely for users on their file systems. By default, files are marked as unshared.

.optimize¶

Cleans up the current directory’s database. If you have a large directory with many files you may want to use this command if you experience slow-downs/delays over time. Normally, the db should clean up itself though.

.unhide¶

Makes a file be not hidden any more.

.unshare <file> [file] …¶

Removes the shared tag from a file.

.filesys module¶

This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server.

The following commands are provided by the filesys module:

For filesystem users:
files

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/dns.html0000664000175000017500000002375014703073435016200 0ustar geogeo DNS Module — Eggdrop 1.9.2 documentation

Last revised: September 26, 2010

DNS Module¶

This module provides asynchronous dns support. This will avoid long periods where the bot just hangs there, waiting for a hostname to resolve, which will often let it timeout on all other connections.

This module requires: none

Put this line into your Eggdrop configuration file to load the dns module:

loadmodule dns

There are also some variables you can set in your config file:

set dns-servers “8.8.8.8 8.8.4.4â€
In case your bot has trouble finding dns servers or you want to use specific ones, you can set them here. The value is a list of dns servers. The relative order doesn’t matter. You can also specify a non-standard port. The default is to use the system specified dns servers. You don’t need to modify this normally.
set dns-cache 86400
Specify how long should the DNS module cache replies at maximum. The value must be in seconds. Note that it will respect the TTL of the reply and this is just an upper boundary.
set dns-negcache 600
Specify how long should the DNS module cache negative replies (NXDOMAIN, DNS Lookup failed). The value must be in seconds.
set dns-maxsends 4
How many times should the DNS module resend the query for a given domain if it receives no reply?
set dns-retrydelay 3
Specify how long should the DNS module wait for a reply before resending the query. The value must be in seconds.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/compress.html0000664000175000017500000002244114703073435017243 0ustar geogeo Compress Module — Eggdrop 1.9.2 documentation

Last revised: May 27, 2004

Compress Module¶

This module provides support for file compression. It can be used to compress files via Tcl or to transfer the userfile compressed during the share process, saving bandwidth.

This module requires: share

Put this line into your Eggdrop configuration file to load the compress module:

loadmodule compress

There are also some variables you can set in your config file:

set share-compressed 1
Allow compressed sending of user files? The user files are compressed with the compression level defined in ‘compress-level’.
set compress-level 9
This is the default compression level used. These levels are the same as those used by GNU gzip.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/server.html0000664000175000017500000005050414703073435016717 0ustar geogeo Server Module — Eggdrop 1.9.2 documentation

Last revised: October 25, 2010

Server Module¶

This module provides the core server support. You have to load this if you want your bot to come on IRC. Not loading this is equivalent to the old NO_IRC define.

This module requires: none

Put this line into your Eggdrop configuration file to load the server module:

loadmodule server

There are also some variables you can set in your config file:

set net-type Efnet
What is your network? Possible allowed values are Efnet, IRCnet, Undernet, DALnet, Libera, freenode, Quakenet, Rizon, Other. If the network you use is not listed, using “Other†is a good sane choice and can be customized with settings both here and in the IRC module sections of the config file.
set nick “LamestBotâ€
Set the nick the bot uses on IRC, and on the botnet unless you specify a separate botnet-nick, here.
set altnick “L?m?stB?tâ€
Set the alternative nick which the bot uses on IRC if the nick specified by ‘set nick’ is unavailable. All ‘?’ characters will be replaced by random numbers.
set keep-nick 1
This setting makes the bot try to get his original nickname back if its primary nickname is already in use.
set realname “/msg LamestBot helloâ€
Set here what to display in the real-name field for the bot.
bind evnt - init-server evnt:init_server
proc evnt:init_server {type} {
  global botnick
  putquick "MODE $botnick +i-ws"
}

… is Tcl scripting that is run immediately after connecting to a server.

set init-server { putquick "MODE $botnick +i-ws" }

… is Tcl scripting that is run immediately after connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc).

set connect-server { putlog "Connecting to server." }

… is Tcl scripting that is run immediately before connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc).

set disconnect-server { putlog "Disconnected from server." }

… is a Tcl script that is run immediately after disconnecting from a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc).

set servers {
  you.need.to.change.this:6667
  another.example.com:7000:password
  [2001:db8:618:5c0:263::]:6669:password
  ssl.example.net:+6697
}

… is the bot’s server list. The bot will start at the first server listed, and cycle through them whenever it gets disconnected. You need to change these servers to YOUR network’s servers.

The format is:
server[:port[:password]]
Prefix the port with a plus sign to attempt a SSL connection:
server:+port[:password]

Both the port and password fields are optional; however, if you want to set a password or use SSL you must also set a port. If a port isn’t specified it will default to your default-port setting.

set default-port 6667
Set the default port which should be used if none is specified with ‘.jump’ or in ‘set servers’.
set msg-rate 2
Number of seconds to wait between transmitting queued lines to the server. Lower this value at your own risk. ircd is known to start flood control at 512 bytes/2 seconds.
set ssl-verify-servers 0

Control certificate verification for servers. You can set this by adding together the numbers for all exceptions you want to enable. By default certificate verification is disabled and all certificates are assumed to be valid. The numbers are the following:

The numbers are the following:

0 disable verification
1 enable certificate verification
2 allow self-signed certificates
4 don’t check peer common or alt names
8 allow expired certificates
16 allow certificates which are not valid yet
32 allow revoked certificates
set server-cycle-wait 60
This setting defines how long Eggdrop should wait before moving from one server to another on disconnect. If you set 0 here, Eggdrop will not wait at all and will connect instantly. Setting this too low could result in your bot being K:Lined.
set server-timeout 60
Set here how long Eggdrop should wait for a response when connecting to a server before giving up and moving on to next server.
set check-stoned 1
Set this to 1 if Eggdrop should check for stoned servers? (where the server connection has died, but Eggdrop hasn’t been notified yet).
set serverror-quit 1
If you want your bot to exit the server if it receives an ERROR message, set this to 1.
set max-queue-msg 300
Set here the maximum number of lines to queue to the server. If you’re going to dump large chunks of text to people over IRC, you will probably want to raise this. 300 is fine for most people though.
set quiet-reject 1
This setting makes the bot squelch the error message when rejecting a DCC CHAT, SEND or message command. Normally, Eggdrop notifies the user that the command has been rejected because they don’t have access. Note that sometimes IRC server operators detect bots that way.
set flood-msg 5:60
Set here how many msgs in how many seconds from one host constitutes a flood. If you set this to 0:0, msg flood protection will be disabled.
set flood-ctcp 3:60
Set here how many ctcps in how many seconds from one host are recognized as a flood. Not specifying or using number = 0 will not check against ctcp floods.
set answer-ctcp 3
Set how many ctcps should be answered at once here.
set lowercase-ctcp 0
If you want your bot to answer lower case ctcp requests (non rfc- compliant), set this setting to 1. mIRC will do this, most other clients will not.
set trigger-on-ignore 0
If you want Eggdrop to trigger binds for ignored users, set this to 1.
set exclusive-binds 0
This setting configures PUBM and MSGM binds to be exclusive of PUB and MSG binds. This means if a MSGM bind with the mask “help†exists and is triggered, any MSG bindings with “help†in their mask will not be triggered. Don’t enable this unless you know what you are doing!
set double-mode 0
Allow identical messages in the mode queue?
set double-server 0
Allow identical messages in the server queue?
set double-help 0
Allow identical messages in the help queue?
set use-penalties 1 (default on net-type IRCnet)
This enables Eggdrop’s penalty calculation. Every command Eggdrop sends to the IRC server raises its penalty points. If Eggdrop reaches a server limit, it gets disconnected with “excess flood†message. Eggdrop is able to count internal those penalty points, too and take measures against excess flooding. Note: it’s highly advised to turn this on!
set optimize-kicks 1

This optimizes the kick queue. It also traces nick changes and parts in the channel and changes the kick queue accordingly. There are three different options for this setting:

0 Turn it off.
1 Optimize the kick queue by summarizing kicks.
2 Trace nick changes and parts on the channel and change the queue accordingly. For example, bot will not try to kick users who have already parted the channel.

ATTENTION: Setting 2 is very CPU intensive.

There are additional settings for ‘net-type’ Efnet.

net-type 5 specific features:

Attention: Use this settings only if you set ‘net-type’ to Efnet!

set check-mode-r 1
This settings defines how umode +r is understood by Eggdrop. Some networks use +r to indicate a restricted connection. If this is your case, and you want your bot to leave restricted servers and jump to the next server on its list, then set it to 1. Please note, this setting is automatically set to 0 for net-type of Efnet, Undernet, and DALnet, and set to 1 for net-type IRCNet.
set nick-len 9
This setting allows you to specify the maximum nick-length supported by your network. The default setting is 9. The maximum supported length by Eggdrop is 32.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/notes.html0000664000175000017500000002331514703073435016541 0ustar geogeo Notes Module — Eggdrop 1.9.2 documentation

Last revised: January 1, 2002

Notes Module¶

This module provides support for storing of notes for users from each other. Note sending between currently online users is supported in the core, this is only for storing the notes for later retrieval.

This module requires: none

Put this line into your Eggdrop configuration file to load the notes module:

loadmodule notes

There are also some variables you can set in your config file:

set notefile “LamestBot.notesâ€
Set here the filename where private notes between users are stored.
set max-notes 50
Set here the maximum number of notes to allow to be stored for each user (to prevent flooding).
set note-life 60
Set here how long (in days) to store notes before expiring them.
set allow-fwd 0
Set this to 1 if you want to allow users to specify a forwarding address for forwarding notes to another account on another bot.
set notify-users 1
Set this to 1 if you want the bot to let people know hourly if they have any notes.
set notify-onjoin 1
Set this to 1 if you want the bot to let people know on join if they have any notes.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/share.html0000664000175000017500000002444414703073435016517 0ustar geogeo Share Module — Eggdrop 1.9.2 documentation

Last revised: November 27, 2003

Share Module¶

This module provides userfile sharing support between two directly linked bots.

This module requires: transfer, channels

Put this line into your Eggdrop configuration file to load the share module:

loadmodule share

There are also some variables you can set in your config file:

set allow-resync 0
When two bots get disconnected, this setting allows them to create a resync buffer which saves all changes done to the userfile during the disconnect. When they reconnect, they will not have to transfer the complete user file, but, instead, just send the resync buffer.
set resync-time 900
This setting specifies how long to hold another bots resync data before flushing it. This is a setting for allow-resync.
set private-global 0
When sharing user lists, DON’T ACCEPT global flag changes from other bots? NOTE: The bot will still send changes made on the bot, it just won’t accept any global flag changes from other bots. This overrides the private-globals setting (below).
set private-globals “mnotâ€
When sharing user lists, if private-global isn’t set, which global flag changes from other bots should be ignored?
set private-user 0
When sharing user lists, don’t accept ANY userfile changes from other bots? Paranoid people should use this feature on their hub bot. This will force all userlist changes to be made via the hub.
set override-bots 0
This setting makes the bot discard its own bot records in favor of the ones sent by the hub. NOTE: No passwords or botflags are shared, only ports and address are added to sharing procedure. This only works with hubs that are v1.5.1 or higher.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/internals.html0000664000175000017500000014371414703073435017416 0ustar geogeo Eggdrop Bind Internals — Eggdrop 1.10.0 documentation

Eggdrop Bind Internals¶

This document is intended for C developers who want to understand how Eggdrop’s Tcl binds or C binds work.

For documentation purposes the “dcc†bind type is used as an example.

It already exists and is suitable to illustrate the details of bind handling in Eggdrop.

Note: All code snippets are altered for brevity and simplicity, see original source code for the full and current versions.

General Workflow To Create a New Bind¶

To create a new type of bind, there are generally three steps. First, you must add the new bind type to the Bind Table. Once you have registered the bind type with the bind table, you must create a C Function that will be called to perform the functionality you wish to occur when the bind is triggered. Finally, once the C code supporting the new bind has been finished, the new Tcl binding is ready to be used in a Tcl script.

Adding a New Bind Type to the Bind Table¶

The bind is added to the bind table is by calling, either at module initialization or startup

/* Global symbol, available to other C files with
 * extern p_tcl_bind_list H_dcc;
 */
p_tcl_bind_list H_dcc;

/* Creating the bind table:
 * @param[in] const char *name Limited in length, see tclhash.h
 * @param[in] int flags        HT_STACKABLE or 0
 * @param[in] IntFunc          Function pointer to C handler
 * @return    p_tcl_bind_list  aka (tcl_bind_list_t *)
 */
H_dcc = add_bind_table("dcc", 0, builtin_dcc);

What the C handler does is explained later, because a lot happens before it is actually called. IntFunc is a generic function pointer that returns an int with arbitrary arguments.

H_dcc can be exported from core and imported into modules as any other variable or function. That should be explained in a separate document.

Stackable Binds: HT_STACKABLE¶

HT_STACKABLE means that multiple binds can exist for the same mask. An example of what happens when NOT using this flag shown in the code block below.

bind dcc - test proc1; # not stackable
bind dcc - test proc2; # overwrites the first one, only proc2 will be called

To enable this feature, you must set the second argument to add_bind_table() with HT_STACKABLE. Using HT_STACKABLE does not automatically call all the binds that match, see the bind flags listed in Triggering any Bind section for details on the partner flags BIND_STACKABLE and BIND_WANTRET used in check_tcl_bind().

Adding Bind Functionality¶

A C function must created that will be called when the bind is triggered. Importantly, the function is designed to accept specific arguments passed by Tcl.

int check_tcl_dcc(const char *cmd, int idx, const char *args) {
  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };
  int x;
  char s[11];

  get_user_flagrec(dcc[idx].user, &fr, dcc[idx].u.chat->con_chan);
  egg_snprintf(s, sizeof s, "%ld", dcc[idx].sock);
  Tcl_SetVar(interp, "_dcc1", (char *) dcc[idx].nick, 0);
  Tcl_SetVar(interp, "_dcc2", (char *) s, 0);
  Tcl_SetVar(interp, "_dcc3", (char *) args, 0);
  x = check_tcl_bind(H_dcc, cmd, &fr, " $_dcc1 $_dcc2 $_dcc3",
                  MATCH_PARTIAL | BIND_USE_ATTR | BIND_HAS_BUILTINS);
  /* snip ..., return code handling */
  return 0;
}

The global Tcl variables $_dcc1 $_dcc2 $_dcc3 are used as temporary string variables and passed as arguments to the registered Tcl proc.

This shows which arguments the callbacks in Tcl get:

  • the nickname of the DCC chat user (handle of the user)

  • the IDX (socket id) of the partyline so [putdcc] can respond back

  • another string argument that depends on the caller

The call to check_tcl_dcc can be found in the DCC parsing in src/dcc.c.

Using the Bind in Tcl¶

After the bind table is created with add_bind_table, Tcl procs can already be registered to this bind by calling

bind dcc -|- test myproc
proc myproc {args} {
  putlog "myproc was called, argument list: '[join $args ',']'"
  return 0
}

Of course it is not clear so far:

  • If flags -|- matter for this bind at all and what they are checked against

  • If channel flags have a meaning or global/bot only

  • What test is matched against to see if the bind should trigger

  • Which arguments myproc receives, the example just accepts all arguments

Triggering any Bind¶

check_tcl_bind is used by all binds and does the following

/* Generic function to call one/all matching binds
 * @param[in] tcl_bind_list_t *tl      Bind table (e.g. H_dcc)
 * @param[in] const char *match        String to match the bind-masks against
 * @param[in] struct flag_record *atr  Flags of the user calling the bind
 * @param[in] const char *param        Arguments to add to the bind callback proc (e.g. " $_dcc1 $_dcc2 $_dcc3")
 * @param[in] int match_type           Matchtype and various flags
 * @returns   int                      Match result code
 */

/* Source code changed, only illustrative */
int check_tcl_bind(tcl_bind_list_t *tl, const char *match, struct flag_record *atr, const char *param, int match_type) {
  int x = BIND_NOMATCH;
  for (tm = tl->first; tm && !finish; tm_last = tm, tm = tm->next) {
    /* Check if bind mask matches */
    if (!check_bind_match(match, tm->mask, match_type))
      continue;
    for (tc = tm->first; tc; tc = tc->next) {
      /* Check if the provided flags suffice for this command. */
      if (check_bind_flags(&tc->flags, atr, match_type)) {
        tc->hits++;
        /* not much more than Tcl_Eval(interp, "<procname> <arguments>"); and grab the result */
        x = trigger_bind(tc->func_name, param, tm->mask);
      }
    }
  }
  return x;
}

Bind Flags¶

The last argument to check_tcl_bind in check_tcl_dcc sets additional configurations for the bind. These are the allowed defined values:

Value

Description

MATCH_PARTIAL

Check the triggering value against the beginning of the bind mask, ie DIR triggers a mask for DIRECTORY (case insensitive)

MATCH_EXACT

Check the triggering value exactly against the bind mask value (case insensitive)

MATCH_CASE

Check the triggering value exactly against the bind mask value (case sensitive)

MATCH_MASK

Check if the bind mask is matched against the triggering value as a wildcarded value

MATCH_MODE

Special mode for bind mode similar to MATCH_MASK. This uses case-insensitive matching before the first space in the mask, (the channel), and then case sensitive after the first space (the modes)

MATCH_CRON

Check the triggering value against a bind mask formatted as a cron entry, ie “30 7 6 7 5 “ triggers a mask for “30 7 * * * “

BIND_USE_ATTR

Check the flags of the user match the flags required to trigger the bind

BIND_STACKABLE

Allow one mask to be re-used to call multiple Tcl proc. Must be used with HT_STACKABLE

BIND_WANTRET

With stacked binds, if the called Tcl proc called returns a ‘1’, halt processing any further binds triggered by the action

BIND_STACKRET

Used with BIND_WANTRET; allow stacked binds to continue despite receiving a ‘1’

Bind Return Values¶

The value returned by the bind is often matched against a desired value to return a ‘1’ (often used with BIND_WANTRET and BIND_STACKRET) to the calling function.

Value

Description

BIND_NOMATCH

The bind was not triggered due to not meeting the criteria set for the bind

BIND_AMBIGUOUS

The triggering action matched multiple non-stackable binds

BIND_MATCHED

The bind criteria was met, but the Tcl proc it tried to call could not be found

BIND_EXECUTED

The bind criteria was met and the Tcl proc was called

BIND_EXEC_LOG

The bind criteria was met, the Tcl proc was called, and Eggdrop logged the bind being called

BIND_QUIT

Sentinel value to signal that quit was triggered by the target leaving the partyline or filesys area. (Virtual bind to CMD_LEAVE)

Note: For a bind type to be stackable it needs to be registered with HT_STACKABLE AND check_tcl_bind must be called with BIND_STACKABLE.

C Binding¶

To create a C function that is called by the bind, Eggdrop provides the add_builtins function.

/* Add a list of C function callbacks to a bind
 * @param[in] tcl_bind_list_t *  the bind type (e.g. H_dcc)
 * @param[in] cmd_t *            a NULL-terminated table of binds:
 * cmd_t *mycmds = {
 *   {char *name, char *flags, IntFunc function, char *tcl_name},
 *   ...,
 *   {NULL, NULL, NULL, NULL}
 * };
 */
void add_builtins(tcl_bind_list_t *tl, cmd_t *cc) {
  char p[1024];
  cd_tcl_cmd tclcmd;

  tclcmd.name = p;
  tclcmd.callback = tl->func;
  for (i = 0; cc[i].name; i++) {
    /* Create Tcl command with automatic or given names *<bindtype>:<funcname>, e.g.
     * - H_raw {"324", "", got324, "irc:324"} => *raw:irc:324
     * - H_dcc {"boot", "t", cmd_boot, NULL} => *dcc:boot
     */
    egg_snprintf(p, sizeof p, "*%s:%s", tl->name, cc[i].funcname ? cc[i].funcname : cc[i].name);
    /* arbitrary void * can be included, we include C function pointer */
    tclcmd.cdata = (void *) cc[i].func;
    add_cd_tcl_cmd(tclcmd);
    bind_bind_entry(tl, cc[i].flags, cc[i].name, p);
  }
}

It automatically creates Tcl commands (e.g. *dcc:cmd_boot) that will call the C handler from add_bind_table in the first section Bind Table and it gets a context (void *) argument with the C function it is supposed to call (e.g. cmd_boot()).

Now we can actually look at the C function handler for dcc as an example and what it has to implement.

C Handler¶

The example handler for DCC looks as follows

/* Typical Tcl_Command arguments, just like e.g. tcl_putdcc is a Tcl/C command for [putdcc] */
static int builtin_dcc (ClientData cd, Tcl_Interp *irp, int argc, char *argv[]) {
  int idx;
  /* F: The C function we want to call, if the bind is okay, e.g. cmd_boot() */
  Function F = (Function) cd;

  /* Task of C function: verify argument count and syntax as any Tcl command */
  BADARGS(4, 4, " hand idx param");

  /* C Macro only used in C handlers for bind types, sanity checks the Tcl proc name
   * for *<bindtype>:<name> and that we are in the right C handler
   */
  CHECKVALIDITY(builtin_dcc);

  idx = findidx(atoi(argv[2]));
  if (idx < 0) {
      Tcl_AppendResult(irp, "invalid idx", NULL);
      return TCL_ERROR;
  }

  /* Call the desired C function, e.g. cmd_boot() with their arguments */
  F(dcc[idx].user, idx, argv[3]);
  Tcl_ResetResult(irp);
  Tcl_AppendResult(irp, "0", NULL);
  return TCL_OK;
}

This is finally the part where we see the arguments a C function gets for a DCC bind as opposed to a Tcl proc.

F(dcc[idx].user, idx, argv[3]):

  • User information as struct userrec *

  • IDX as int

  • The 3rd string argument from the Tcl call to *dcc:cmd_boot, which was $_dcc3 which was args to check_tcl_dcc which was everything after the dcc command

So this is how we register C callbacks for binds with the correct arguments

/* We know the return value is ignored because the return value of F
 * in builtin_dcc is ignored, so it can be void, but for other binds
 * it could be something else and used in the C handler for the bind.
 */
void cmd_boot(struct userrec *u, int idx, char *par) { /* snip */ }

cmd_t *mycmds = {
  {"boot", "t", (IntFunc) cmd_boot, NULL /* automatic name: *dcc:boot */},
  {NULL, NULL, NULL, NULL}
};
add_builtins(H_dcc, mycmds);

Summary¶

In summary, this is how the dcc bind is called:

  • check_tcl_dcc() creates Tcl variables $_dcc1 $_dcc2 $_dcc3 and lets check_tcl_bind call the binds

  • Tcl binds are done at this point

  • C binds mean the Tcl command associated with the bind is *dcc:boot which calls builtin_dcc which gets cmd_boot as ClientData cd argument

  • gbuildin_dcc performs some sanity checking to avoid crashes and then calls cmd_boot() aka F() with the arguments it wants C callbacks to have

Example edited and annotated gdb backtrace in :code::cmd_boot after doing .boot test on the partyline as user thommey with typical owner flags.

#0  cmd_boot (u=0x55e8bd8a49b0, idx=4, par=0x55e8be6a0010 "test") at cmds.c:614
    *u = {next = 0x55e8bd8aec90, handle = "thommey", flags = 8977024, flags_udef = 0, chanrec = 0x55e8bd8aeae0, entries = 0x55e8bd8a4a10}
#1  builtin_dcc (cd=0x55e8bbf002d0 <cmd_boot>, irp=0x55e8bd59b1c0, argc=4, argv=0x55e8bd7e3e00) at tclhash.c:678
    idx = 4
    argv = {0x55e8be642fa0 "*dcc:boot", 0x55e8be9f6bd0 "thommey", 0x55e8be7d9020 "4", 0x55e8be6a0010 "test", 0x0}
    F = 0x55e8bbf002d0 <cmd_boot>
#5  Tcl_Eval (interp=0x55e8bd59b1c0, script = "*dcc:boot $_dcc1 $_dcc2 $_dcc3") from /usr/lib/x86_64-linux-gnu/libtcl8.6.so
    Tcl: return $_dcc1 = "thommey"
    Tcl: return $_dcc2 = "4"
    Tcl: return $_dcc3 = "test"
    Tcl: return $lastbind = "boot" (set automatically by trigger_bind)
#8  trigger_bind (proc=proc@entry=0x55e8bd5efda0 "*dcc:boot", param=param@entry=0x55e8bbf4112b " $_dcc1 $_dcc2 $_dcc3", mask=mask@entry=0x55e8bd5efd40 "boot") at tclhash.c:742
#9  check_tcl_bind (tl=0x55e8bd5eecb0 <H_dcc>, match=match@entry=0x7ffcf3f9dac1 "boot", atr=atr@entry=0x7ffcf3f9d100, param=param@entry=0x55e8bbf4112b " $_dcc1 $_dcc2 $_dcc3", match_type=match_type@entry=80) at tclhash.c:942
    proc = 0x55e8bd5efda0 "*dcc:boot"
    mask = 0x55e8bd5efd40 "boot"
    brkt = 0x7ffcf3f9dac6 "test"
#10 check_tcl_dcc (cmd=cmd@entry=0x7ffcf3f9dac1 "boot", idx=idx@entry=4, args=0x7ffcf3f9dac6 "test") at tclhash.c:974
    fr = {match = 5, global = 8977024, udef_global = 0, bot = 0, chan = 0, udef_chan = 0}
#11 dcc_chat (idx=idx@entry=4, buf=<optimized out>, i=<optimized out>) at dcc.c:1068
    v = 0x7ffcf3f9dac1 "boot"
eggdrop-1.10.0/doc/html/modules/transfer.html0000664000175000017500000002364014703073435017236 0ustar geogeo Transfer Module — Eggdrop 1.9.2 documentation

Last revised: January 1, 2002

Transfer Module¶

The transfer module provides DCC SEND/GET support and userfile transfer support for userfile sharing.

This module requires: none

Put this line into your Eggdrop configuration file to load the transfer module:

loadmodule transfer

There are also some variables you can set in your config file:

set max-dloads 3
Set here the maximum number of simultaneous downloads to allow for each user.
set dcc-block 0
Set here the block size for dcc transfers. ircII uses 512 bytes, but admits that may be too small. 1024 is standard these days. Set this to 0 to use turbo-dcc (recommended).
set copy-to-tmp 1
Enable this setting if you want to copy files to a temporary location before sending or receiving them. This might be useful for file stability, but if your directories are NFS mounted, it’s a pain. Setting this to 1 is not advised for big files or if you’re low on disk space.
set xfer-timeout 30
Set here the time (in seconds) to wait before an inactive transfer times out.
set sharefail-unlink 1
By default, Eggdrop will abort the linking process if userfile sharing is enabled but the userfile transfer fails. Set this to 0 to keep the bots linked if the userfile transfer fails and retry every minute (both bots must be v1.9.0 or higher).

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/channels.html0000664000175000017500000006030114703073435017200 0ustar geogeo Channels Module — Eggdrop 1.9.2 documentation

Last revised: October 25, 2010

Channels Module¶

This module provides channel related support for the bot. Without it, you won’t be able to make the bot join a channel or save channel specific userfile information.

This module requires: none

Put this line into your Eggdrop configuration file to load the channels module:

loadmodule channels

There are also some variables you can set in your config file:

set chanfile “LamestBot.chanâ€
Enter here the filename where dynamic channel settings are stored.
set force-expire 0
Set this setting to 1 if you want your bot to expire bans/exempts/invites set by other opped bots on the channel.
set share-greet 0
Set this setting to 1 if you want your bot to share user greets with other bots on the channel if sharing user data.
set use-info 1
Set this setting to 1 if you want to allow users to store an info line.
set allow-ps 0
Set this setting to 1 if you want to allow both +p and +s channel modes to be enforced at the same time by the chanmode channel setting. Make sure your server supports +ps mixing or you may get endless mode floods.
channel add #channel { SETTINGS }

Add each static channel you want your bot to sit in using this command. There are many different possible settings you can insert into this command, which are explained below.

chanmode +/-<modes>
This setting makes the bot enforce channel modes. It will always add the +<modes> and remove the -<modes> modes.
idle-kick 0
This setting will make the bot check every minute for idle users. Set this to 0 to disable idle check.
stopnethack-mode 0

This setting will make the bot de-op anyone who enters the channel with serverops. There are seven different modes for this settings:

0 turn off
1 isoptest (allow serverop if registered op)
2 wasoptest (allow serverop if user had op before split)
3 allow serverop if isop or wasop
4 allow serverop if isop and wasop.
5 If the channel is -bitch, see stopnethack-mode 3
If the channel is +bitch, see stopnethack-mode 1
6 If the channel is -bitch, see stopnethack-mode 2
If the channel is +bitch, see stopnethack-mode 4
revenge-mode 0

This settings defines how the bot should punish bad users when revenging. There are four possible settings:

0 Deop the user.
1 Deop the user and give them the +d flag for the channel.
2 Deop the user, give them the +d flag for the channel, and kick them.
3 Deop the user, give them the +d flag for the channel, kick, and ban them.
ban-type 3

This setting defines what type of bans should eggdrop place for +k users or when revenge-mode is 3. Available types are:

0 *!user@host
1 *!*user@host
2 *!*@host
3 *!*user@*.host
4 *!*@*.host
5 nick!user@host
6 nick!*user@host
7 nick!*@host
8 nick!*user@*.host
9 nick!*@*.host

You can also specify types from 10 to 19 which correspond to types 0 to 9, but instead of using a * wildcard to replace portions of the host, only numbers in hostnames are replaced with the ‘?’ wildcard. Same is valid for types 20-29, but instead of ‘?’, the ‘*’ wildcard will be used. Types 30-39 set the host to ‘*’.

ban-time 120
Set here how long temporary bans will last (in minutes). If you set this setting to 0, the bot will never remove them.
exempt-time 60
Set here how long temporary exempts will last (in minutes). If you set this setting to 0, the bot will never remove them. The bot will check the exempts every X minutes, but will not remove the exempt if a ban is set on the channel that matches that exempt. Once the ban is removed, then the exempt will be removed the next time the bot checks. Please note that this is an IRCnet feature.
invite-time 60
Set here how long temporary invites will last (in minutes). If you set this setting to 0, the bot will never remove them. The bot will check the invites every X minutes, but will not remove the invite if a channel is set to +i. Once the channel is -i then the invite will be removed the next time the bot checks. Please note that this is an IRCnet feature.
aop-delay (minimum:maximum)

This is used for autoop, autohalfop, autovoice. If an op or voice joins a channel while another op or voice is pending, the bot will attempt to put both modes on one line.

aop-delay 0 No delay is used.
aop-delay X An X second delay is used.
aop-delay X:Y A random delay between X and Y is used.
need-op { putserv “PRIVMSG #lamest :op me cos i’m lame!†}
This setting will make the bot run the script enclosed in braces if it does not have ops. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.
need-invite { putserv “PRIVMSG #lamest :let me in!†}
This setting will make the bot run the script enclosed in braces if it needs an invite to the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.
need-key { putserv “PRIVMSG #lamest :let me in!†}
This setting will make the bot run the script enclosed in braces if it needs the key to the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.
need-unban { putserv “PRIVMSG #lamest :let me in!†}
This setting will make the bot run the script enclosed in braces if it needs to be unbanned on the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.
need-limit { putserv “PRIVMSG #lamest :let me in!†}
This setting will make the bot run the script enclosed in braces if it needs the limit to be raised on the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don’t need to set this setting.
flood-chan 15:60
Set here how many channel messages in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables text flood protection for the channel, where X is an integer >= 0.
flood-deop 3:10
Set here how many deops in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables deop flood protection for the channel, where X is an integer >= 0.
flood-kick 3:10
Set here how many kicks in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables kick flood protection for the channel, where X is an integer >= 0.
flood-join 5:60
Set here how many joins in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables join flood protection for the channel, where X is an integer >= 0.
flood-ctcp 3:60
Set here how many channel ctcps in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables ctcp flood protection for the channel, where X is an integer >= 0.
flood-nick 5:60
Set here how many nick changes in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables nick flood protection for the channel, where X is an integer >= 0.
channel set <chan> +/-<setting>

There are many different options for channels which you can define. They can be enabled or disabled by a plus or minus in front of them.

A complete list of all available channel settings:

enforcebans
When a ban is set, kick people who are on the channel and match the ban?
dynamicbans
Only activate bans on the channel when necessary? This keeps the channel’s ban list from getting excessively long. The bot still remembers every ban, but it only activates a ban on the channel when it sees someone join who matches that ban.
userbans
Allow bans to be made by users directly? If turned off, the bot will require all bans to be made through the bot’s console.
dynamicexempts
Only activate exempts on the channel when necessary? This keeps the channel’s exempt list from getting excessively long. The bot still remembers every exempt, but it only activates a exempt on the channel when it sees a ban set that matches the exempt. The exempt remains active on the channel for as long as the ban is still active.
userexempts
Allow exempts to be made by users directly? If turned off, the bot will require all exempts to be made through the bot’s console.
dynamicinvites
Only activate invites on the channel when necessary? This keeps the channel’s invite list from getting excessively long. The bot still remembers every invite, but the invites are only activated when the channel is set to invite only and a user joins after requesting an invite. Once set, the invite remains until the channel goes to -i.
userinvites
Allow invites to be made by users directly? If turned off, the bot will require all invites to be made through the bot’s console.
autoop
Op users with the +o flag as soon as they join the channel? This is insecure and not recommended.
autohalfop
Halfop users with the +l flag as soon as they join the channel? This is insecure and not recommended.
bitch
Only let users with the +o flag have op on the channel?
greet
Say a user’s info line when they join the channel?
protectops
Re-op a user with the +o flag if they get deopped?
protecthalfops
Re-halfop a user with the +l flag if they get dehalfopped?
protectfriends
Re-op a user with the +f flag if they get deopped?
statuslog

Log the channel status line every 5 minutes? This shows the bot’s status on the channel (op, voice, etc.), the channel’s modes, and the total number of members, ops, voices, regular users, and +b, +e, and +I modes on the channel. A sample status line follows:

[01:40] @#lamest (+istn) : [m/1 o/1 v/4 n/7 b/1 e/5 I/7]
revenge
Remember people who deop/kick/ban the bot, valid ops, or friends and punish them? Users with the +f flag are exempt from revenge.
revengebot
This is similar to to the ‘revenge’ option, but it only triggers if a bot gets deopped, kicked or banned.
autovoice
Voice users with the +v flag when they join the channel?
secret
Prevent this channel from being listed on the botnet?
shared
Share channel-related user info for this channel?
cycle
Cycle the channel when it has no ops?
dontkickops
Do you want the bot not to be able to kick users who have the +o flag, letting them kick-flood for instance to protect the channel against clone attacks?
inactive
This prevents the bot from joining the channel (or makes it leave the channel if it is already there). It can be useful to make the bot leave a channel without losing its settings, channel-specific user flags, channel bans, and without affecting sharing.
seen
Respond to seen requests in the channel? The seen module must be loaded for this to work.
nodesynch
Allow non-ops to perform channel modes? This can stop the bot from fighting with services such as ChanServ, or from kicking IRCops when setting channel modes without having ops.
static
Allow only permanent owners to remove the channel?

The following settings are used as default values when you .+chan #chan or .tcl channel add #chan. Look in the section above for explanation of every option.

set default-flood-chan 15:60

set default-flood-deop 3:10

set default-flood-kick 3:10

set default-flood-join 5:60

set default-flood-ctcp 3:60

set default-flood-nick 5:60

set default-aop-delay 5:30

set default-idle-kick 0

set default-chanmode “ntâ€

set default-stopnethack-mode 0

set default-revenge-mode 0

set default-ban-type 3

set default-ban-time 120

set default-exempt-time 60

set default-invite-time 60

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

}

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/console.html0000664000175000017500000002246014703073435017053 0ustar geogeo Console Module — Eggdrop 1.9.2 documentation

Last revised: January 1, 2002

Console Module¶

This module provides storage of console settings when you exit the bot or type .store on the partyline.

This module requires: none

Put this line into your Eggdrop configuration file to load the console module:

loadmodule console

There are also some variables you can set in your config file:

set console-autosave 1
Save users console settings automatically? Otherwise, they have to use the .store command.
set force-channel 0
If a user doesn’t have any console settings saved, which channel do you want them automatically put on?
set info-party 0
Enable this setting if a user’s global info line should be displayed when they join a botnet channel.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/modules/irc.html0000664000175000017500000003542014703073435016166 0ustar geogeo IRC Module — Eggdrop 1.9.2 documentation

Last revised: August 21, 2004

IRC Module¶

This module controls the bots interaction on IRC. It allows the bot to join channels, etc. You have to load this if you want your bot to come on irc.

This module requires: server, channels

Put this line into your Eggdrop configuration file to load the irc module:

loadmodule irc

There are also some variables you can set in your config file:

set bounce-bans 1
Set this to 1 if you want to bounce all server bans.
set bounce-exempts 0
Set this to 1 if you want to bounce all server exemptions (+e modes). This is disabled if use-exempts is disabled.
set bounce-invites 0
Set this to 1 if you want to bounce all server invitations (+I modes). This is disabled if use-invites is disabled.
set bounce-modes 0
Set this to 1 if you want to bounce all server modes.
set max-modes 30
There is a global limit for +b/+e/+I modes. This limit should be set to the same value as max-bans for networks that do not support +e/+I.
set max-bans 30
Set here the maximum number of bans you want the bot to set on a channel. Eggdrop will not place any more bans if this limit is reached. Undernet currently allows 45 bans, IRCnet allows 30, EFnet allows 100, and DALnet allows 100.
set max-exempts 20
Set here the maximum number of exempts you want Eggdrop to set on a channel. Eggdrop will not place any more exempts if this limit is reached.
set max-invites 20
Set here the maximum number of invites you want Eggdrop to set on a channel. Eggdrop will not place any more invites if this limit is reached.
set use-exempts 0
set use-invites 0
These settings should be left commented unless the default values are being overridden. By default, exempts and invites are on for EFnet and IRCnet, but off for all other large networks. This behavior can be modified with the following 2 flags. If your network doesn’t support +e/+I modes then you will be unable to use these features.
set learn-users 0
If you want people to be able to add themselves to the bot’s userlist with the default userflags (defined above in the config file) via the ‘hello’ msg command, set this to 1.
set wait-split 600
Set here the time (in seconds) to wait for someone to return from a netsplit (i.e. wasop will expire afterwards). Set this to 1500 on IRCnet since its nick delay stops after 30 minutes.
set wait-info 180
Set here the time (in seconds) that someone must have been off-channel before re-displaying their info line.
set mode-buf-length 200
Set this to the maximum number of bytes to send in the arguments of modes sent to the server. Most servers default this to 200.
unbind msg - hello *msg:hello
bind msg - myword *msg:hello
Many IRCops find bots by seeing if they reply to ‘hello’ in a msg. You can change this to another word by un-commenting thse two lines and changing “myword†to the word wish to use instead of’hello’. It must be a single word.
unbind msg - ident *msg:ident
unbind msg - addhost *msg:addhost Many takeover attempts occur due to lame users blindly /msg ident’ing to
the bot and attempting to guess passwords. We now unbind this command by default to discourage them. You can enable this command by un-commenting these two lines.
set opchars “@â€
#set opchars “@&~â€
Some IRC servers are using some non-standard op-like channel prefixes/modes. Define them here so the bot can recognize them. Just “@†should be fine for most networks. Un-comment the second line for some UnrealIRCds.
set no-chanrec-info 0
If you are so lame you want the bot to display peoples info lines, even when you are too lazy to add their chanrecs to a channel, set this to 1. NOTE This means every user with an info line will have their info line displayed on EVERY channel they join (provided they have been gone longer than wait-info).

These were the core irc module settings. There are more settings for ‘net-type’ IRCnet and Efnet. net-type has to be set in the server module config section.

Use the following settings only if you set ‘net-type’ to IRCnet!

set prevent-mixing 1
At the moment, the current IRCnet IRCd version (2.10) doesn’t support the mixing of b, o and v modes with e and I modes. This might be changed in the future, so use 1 at the moment for this setting.

Use the following settings only if you set ‘net-type’ to Efnet!

set kick-method 1
If your network supports more users per kick command then 1, you can change this behavior here. Set this to the number of users to kick at once, or set this to 0 for all at once.
set modes-per-line 3
Some networks allow you to stack lots of channel modes into one line. They’re all guaranteed to support at least 3, so that’s the default. If you know your network supports more, you may want to adjust this. This setting is limited to 6, although if you want to use a higher value, you can modify this by changing the value of MODES_PER_LINE_MAX in src/chan.h and recompiling the bot.
set include-lk 1
Some networks don’t include the +l limit and +k or -k key modes in the modes-per-line (see above) limitation. Set include-lk to 0 for these networks.
set use-354 0
Set this to 1 if your network uses IRCu2.10.01 specific /who requests. Eggdrop can, therefore, ask only for exactly what’s needed.
set rfc-compliant 1
If your network doesn’t use rfc 1459 compliant string matching routines, set this to 0.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/0000775000175000017500000000000014703073435014174 5ustar geogeoeggdrop-1.10.0/doc/html/using/tls.html0000664000175000017500000004554614703073435015702 0ustar geogeo TLS support — Eggdrop 1.10.0 documentation

TLS support Last revised: Jan 26, 2020

TLS support¶

This document provides information about TLS support which is a new Eggdrop feature since version 1.8.0.

About¶

Eggdrop can be optionally compiled with TLS support. This requires OpenSSL 0.9.8 or later installed on your system. TLS support includes encryption for IRC, DCC, botnet, telnet and scripted connections as well as certificate authentication for users and bots.

Installation¶

./configure and install as usual, the configure script will detect if your system meets the requirements and will enable TLS automatically. You can override the autodetection and manually disable TLS with ./configure –disable-tls. You can’t forcefully enable it though. The configure script will look for OpenSSL at the default system locations. If you have it installed at a non-standard location or locally in your home directory, you’ll need to specify the paths to header and library files with the –with-sslinc and –with-ssllib options. You can also use these if you want to override the default OpenSSL installation with a custom one, as they take precedence over any system-wide paths.

Usage¶

As of v1.9.0, TLS support must be requested explicitly for botnet links. To create a TLS-enabled listening port or connect to a TLS-enabled listening port, you must prefix the port with a plus sign (+). If a port number could normally be omitted as part of a command syntax must be included (and prefixed) to enable TLS.

Scripts can also upgrade a regular plaintext connection to TLS via STARTTLS using the starttls Tcl command.

Prior to v1.9.0, Eggdrop would use STARTTLS to automatically attempt to upgrade a plain connection to an encrypted connection for botnet links, without any additional configuration (This was changed to provide users the flexibility to configure their own environments and assist in debugging).

IRC¶

To connect to IRC using SSL, specify the port number and prefix it with a plus sign. Example: .jump irc.server.com +6697. The same goes for the server list in the config file.

Some NickServ services allow you to authenticate with a certificate. Eggdrop will use the certificte pair specified in ssl-privatekey/ ssl-certificate for authentication.

Botnet¶

Eggdrop can use TLS connections to protect botnet links if it is compiled with TLS support. As of version 1.9.0, only raw TLS sockets are used to protect a connection. By prefixing a listen port in the Eggdrop configuration with a plus (+), that specifies that port as a TLS-enabled port, and will only accept TLS connections (no plain text connections will be allowed). With two TLS-enabled Eggdrops, it graphically looks like this:

Leaf bot sets hub port as…

and Hub bot config uses…

the connection will…

port

listen port

be plain, but can be upgraded to TLS manually with the starttls Tcl/bot command

+port

listen +port

connect with TLS

port

listen +port

fail as hub only wants TLS

+port

listen port

fail as leaf only wants TLS

In short, a bot added to your Eggdrop with a +port in the address can only connect to a bot listening with a +port in the config. Conversely, a bot added to your Eggdrop without a + prefix can only connect to a bot listening without a + prefix in the config.

If TLS negotiation fails, the connection is deliberately aborted and no clear text is ever sent by the TLS-requiring party.

Eggdrop can also upgrade a plaintext connection with the starttls Tcl command. To use this, a plaintext connection is first made to a non-TLS port (ie, one that is not prefixed with a plus), then the starttls command is issued to upgrade that link to a TLS connection. In the Eggdrop 1.8 series, Eggdrop automatically attempted a starttls upgrade on all botnet connections. As such, if a 1.8 Eggdrop connects to a plain listening port on a 1.9.0 or later Eggdrop, it will automatically attempt to upgrade the link to TLS.

Secure DCC¶

Eggdrop supports the SDCC protocol, allowing you to establish DCC chat and file transfers over SSL. Example: /ctcp bot schat Note, that currently the only IRC client supporting SDCC is KVIrc. For information on how to initiate secure DCC chat from KVIrc (rather than from the bot with /ctcp bot chat), consult the KVIrc documentation.

Scripts¶

Scripts can open or connect to TLS ports the usual way specifying the port with a plus sign. Alternatively, the connection could be established as plaintext and later switched on with the starttls Tcl command. (Note that the other side should also switch to TLS at the same time - the synchronization is the script’s job, not Eggdrop’s.)

Keys, certificates and authentication¶

You need a private key and a digital certificate whenever your bot will act as a server in a connection of any type. Common examples are hub bots and TLS listening ports. General information about certificates and public key infrastructure can be obtained from Internet. This document only contains eggdrop-specific information on the subject. The easy way to create a key and a certificate is to type ‘make sslcert’ after compiling your bot (If you installed Eggdrop to a non-standard location, use make sslcert DEST=/path/to/eggdrop). This will generate a 4096-bit private key (eggdrop.key) and a certificate (eggdrop.crt) after you fill in the required fields. Alternatively, you can use ‘make sslsilent’ to generate a key and certificate non-interactively, using pre-set values. This is useful when installing Eggdrop via a scripted process.

To authenticate with a certificate instead of using password, you should make a ssl certificate for yourself and enable ssl-cert-auth in the config file. Then either connect to the bot using TLS and type “.fprint +†or enter your certificate fingerprint with .fprint SHA1-FINGERPRINT. To generate a ssl certificate for yourself, you can run the following command from the Eggdrop source directory:

openssl req -new -x509 -nodes -keyout my.key -out my.crt -config ssl.conf

When asked about bot’s handle, put your handle instead. How to use your new certificate to connect to Eggdrop, depends on your irc client. To connect to your bot from the command line, you can use the OpenSSL ssl client:

openssl s_client -cert my.crt -key my.key -connect host:sslport

SSL/TLS Settings¶

There are some new settings allowing control over certificate verification and authorization.

ssl-privatekey

file containing Eggdrop’s private key, required for the certificate.

ssl-certificate

Specify the filename where your SSL certificate is located. if your bot will accept SSL connections, it must have a certificate.

ssl-verify-depth

maximum verification depth when checking certificate validity. Determines the maximum certificate chain length to allow.

ssl-capath
ssl-cafile

specify the location of certificate authorities certificates. These are used for verification. Both can be active at the same time. If you don’t set this, validation of the issuer won’t be possible and depending on verification settings, the peer certificate might fail verification.

ssl-ciphers

specify the list of ciphers (in order of preference) allowed for use with ssl.

ssl-cert-auth

enables or disables certificate authorization for partyline/botnet. This works only for SSL connections (SDCC or telnet over SSL). A setting of 1 means optional authorization: If the user/bot has a fingerprint set and it matches the certificate SHA1 fingerprint, access is granted, otherwise ordinary password authentication takes place.

If you set this to 2 however, users without a fingerprint set or with a fingerprint not matching the certificate, will not be allowed to enter the partyline with SSL. In addition to this user and bot certificates will be required to have an UID field matching the handle of the user/bot.

ssl-verify-dcc
ssl-verify-bots
ssl-verify-server
ssl-verify-clients

control ssl certificate verification. A value of 0 disables verification completely. A value of 1 enables full verification. Higher values enable specific exceptions like allowing self-signed or expired certificates. Details are documented in eggdrop.conf.

Copyright (C) 2010 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/bans.html0000664000175000017500000002463214703073435016014 0ustar geogeo Bans, Invites, and Exempts — Eggdrop 1.10.0 documentation

Bans, Invites and Exempts Last revised: March 07, 2002

Bans, Invites, and Exempts¶

I assume that you know how bans work on IRC. Eggdrop handles bans, exempts and invites in various ways, and this file is intended to help clarify how these modes are used within the bot. From here on, ‘mode’ applies to all three modes (bans, exempts, and invites) unless otherwise specified. There are three types of modes:

Global modes

These modes will be active on every channel the bot monitors. Some will “expire†after a while (be removed automatically). Others are considered “permanent†and can only be removed by a master.

Channel modes

These modes are active only on one channel, and are almost always temporary modes that expire after an hour or so (depending on how long you’ve specified in the config file). Usually they’re created by a Tcl script of some sort.

Non-bot modes

These are modes that were not placed by the bot. They can be removed by anyone on the channel. The other two types of modes are protected by the bot (unless the channel settings specify otherwise), and have to be removed via the bot.

Bans can also be either sticky or unsticky:

Sticky

These modes are usually set by a user using the “.stick†command. Modes with this attribute are attempted to be kept active on the channel at all times by the bot, even if the channel is set to use dynamic modes. Obviously, if the channel isn’t set to use dynamic modes, this won’t have any effect.

Un-sticky

These modes are the style that Eggdrop sets by default when a user uses one of the commands that result in a mode. This attribute means that the ban will be removed if using dynamic modes after a certain time. If a mode is “sticky†and you wish to set it to be “un-stickyâ€, use the “.unstick†command.

Mode behavior:

Bans

If the channel is supporting dynamic bans, then the ban is set when a user with a matching hostmask joins the channel; otherwise, the modes are permanently set. On a channel with dynamic bans, the ban expires after ‘ban-time’ minutes (which is specified in the config file).

Exempts

If the channel is not supporting dynamic exempts, then they are set at all times. Otherwise, the exemption is set when a ban is placed whose host includes that covered by the exempt. The exempt will remain in place for at least ‘exempt-time’ minutes (defined in config file) or until after the corresponding ban has been removed, whichever happens last.

Invites

If the channel does not support dynamic invites, then they are set at all times. Otherwise, the invite is set when the channel is +i and a user requests an invite into the channel. The invite then remains set for ‘invite-time’ minutes (defined in config file) or until the channel goes -i again, whichever happens last.

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/pbkdf2info.html0000664000175000017500000003654714703073435017125 0ustar geogeo Encryption/Hashing — Eggdrop 1.10.0 documentation

Encryption/Hashing¶

With the release of Eggdrop 1.9.0, an updated crytopgraphy module (PBKDF2) was released for use with Eggdrop. PBKDF2 is a one-way hashing algorithm used to protect the contents of the password file, as well as for use via the Tcl interface. Prior to this, blowfish was used for cryptographic requirements, such as hashing passwords for storage in the userfile.

Background¶

Prior to Eggdrop 1.9.0, the blowfish module was included with Eggdrop to protect sensitive data such as passwords stored in the userfile. While there are no known practical attacks against blowfish at the time of this writing, it was decided that a more modern crypto solution was desirable to be included with Eggdrop. The PBKDF2 (Password-based Key Derivation Function 2) uses a password and salt value to create a password hash (the salt value ensures that the hashes of two identical passwords are different). This process is one-way, which means the hashes cannot be cryptographically reversed and thus are safe for storing in a file.

The default configuration of Eggdrop 1.9.0 has both the blowfish and pbkdf2 modules enabled (see Hybrid Configuration below). This will allow users upgrading a seamless transition to the PBKDF2 module. For users starting an Eggdrop for the first time, it is recommended to comment out the ‘loadmodule blowfish’ line, in order to implement the Solo Configuration.

Also of note, the maximum password length is increased to 30 with PBKDF2, up from 15 with Blowfish. The automatically-generated botnet passwords are now 30 characters instead of the maximum-allowed 16 used with the blowfish module, and pull from a larger character set than what was used with the blowfish module. Finally, if you are linking bots, you’ll need to ensure the same module is loaded on both bots (ie, if the hub bot is using the pbkdf2 module, the leaf bots must have pbkdf2 loaded as well in order to enable authentication checks).

Usage¶

There are two ways to implement PBKDF2- Hybrid configuration, which is recommended for transitioning an already-existing userfile to PBKDF2 by working with the blowfish module, and Solo configuration, which is recommended for use when starting a new Eggdrop for the first time.

Hybrid Configuration¶

With a hybrid configuration, Eggdrop will run both the blowfish and the pbkdf2 modules concurrently. This will allow Eggdrop to authenticate users against their existing blowfish passwords stored in the userfile. However, the first time a user logs in, the pbkdf2 module will hash the (correct) password they enter and save it to the userfile. The pbkdf2-hashed password will then be used for all future logins.

Enabling hybrid configuration¶

  1. BACK UP YOUR USERFILE! This is the file that usually ends with ‘.user’.

  2. Ensure

loadmodule blowfish

is added to the config file and not commented out (it should already be there).

  1. Ensure

loadmodule pbkdf2

is uncommented in the config file (or added, if this is a config file from 1.8)

  1. Start Eggdrop

  2. If this is your first time starting this Eggdrop, follow the instructions it gives you at startup to identify yourself. Otherwise, for an existing Eggdrop where you are already added to the userfile, log in as usual to the partyline via telnet or DCC, or authenticate via a message command like /msg bot op <password>

  3. Sit back and enjoy a cold beverage, you did it! Now encourage the rest of your users to log in so that their passwords are updated to the new format as well.

Solo configuration¶

With a solo configuration, Eggdrop will only run the pbkdf2 module. Eggdrop will not be able to authenticate against passwords in an already-existing userfile and thus will require every user to set a password again, as if they were just added to Eggdrop. This can be done via the PASS msg command (/msg bot PASS <password>) or by having a user with appropriate permissions (and an already-set password) log into the partyline and use the ‘.chpass’ command.

SECURITY CONSIDERATION: This configuration is not ideal for transitioning an existing userfile to PBKDF2. Without the blowfish module loaded, every user in the userfile essentially has no password set. This means any other user that matches a hostmask applied to a handle (!*@.aol.com, I’m looking at you) could set the password and gain access to that user’s Eggdrop account.

Enabling solo configuration¶

  1. BACK UP YOUR USERFILE! This is the file that usually ends with ‘.user’.

  2. Remove or comment:

    # loadmodule blowfish
    

from your config file.

  1. Ensure:

    loadmodule pbkdf2
    

is uncommented (or added, if this is a config file from 1.8) from your config file.

  1. Start Eggdrop

  2. If this is your first time starting this Eggdrop, follow the instructions it gives you at startup to identify yourself. Otherwise, for an existing Eggdrop where you are already added to the userfile, set a new password via /msg bot PASS <password>

  3. Sit back and enjoy a fancy lobster dinner, you did it! If there are other users already added to the bot, DEFINITELY encourage them to set a new password IMMEDIATELY!

Tcl Interface¶

The PBKDF2 module adds the ‘encpass2’ command to the Tcl library. This command takes a string and hashes it using the PBKDF2 algorithm, and returns a string in the following format:

$<PBK method>$rounds=<rounds>$<salt>$<password hash>

where ‘PBK method’ is the method specified in the configuration file, ‘rounds’ is the number of rounds specified in the configuration file, ‘salt’ is the value used for the salt, and ‘password hash’ is the output of the hashing algorithm.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/text-sub.html0000664000175000017500000002405614703073435016644 0ustar geogeo Textfile Substitutions — Eggdrop 1.10.0 documentation

Textfile Substitutions Last revised: March 08, 2002

Textfile Substitutions¶

These %-variables can be inserted into help files, the banner, the MOTD, and other text files. There are four variables that can be used to format text:

%b

display bold

%v

display inverse

%_

display underline

%f

display flashing via telnet; bold underline via IRC

These variables will be interpreted by Eggdrop and replaced by their respective values:

%B

bot’s nickname (i.e. “LamestBotâ€)

%V

current Eggdrop version (i.e. “eggdrop v1.10.0â€)

%E

long form of %V (i.e. “Eggdrop v1.10.0 (C) 1997 Robey Pointer (C) 2010 Eggheads Development Teamâ€)

%C

channels the bot is on (i.e. “#lamest, #botnetcentralâ€)

%A

whatever is set in the config file by ‘set admin’

%n

whatever is set in the config file by ‘set network’

%T

the current time (i.e. “15:00â€)

%N

the current user’s nickname (i.e. “Robeyâ€)

%U

the current operating system the bot is running on

%%

a percent sign (“%â€)

You can also encode messages which can only be read by people with certain flags:

%{+m} Only masters would see this. %{-}

%{+A} Only people with the user flag A see this. %{-}

%{+b} This is only displayed to users doing a remote ‘.motd’ from another bot. %{-}

%{+|m} Only channel masters would see this. %{-}

Other variables:

%{cols=N}

start splitting output into N columns

%{cols=N/W}

same as above, but use a screen width of W

%{end}

end columnated or restricted (i.e. %{+m}) block

%{center}

center the following text (70 columns)

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/tricks.html0000664000175000017500000002726514703073435016375 0ustar geogeo Advanced Tips — Eggdrop 1.10.0 documentation

Eggdrop Tricks Last revised: Jun 02, 2021

Advanced Tips¶

Here are some little tricks that you may or may not know about, which aren’t documented in other areas.

Renaming commands¶

You can rename a built-in command by binding over it. To rename ‘.status’ to ‘.report’, you’d do:

unbind dcc - status *dcc:status
bind dcc m report *dcc:status

The first line removes the built-in binding on ‘.status’, and the second line binds ‘.report’ to the built-in status function.

Keeping Logs¶

If you don’t want your logfiles to be deleted after two days and don’t want the bot to create a new logfile each new day, then set ‘keep-all-logs’ to 0 and ‘switch-logfiles-at’ to 2500 in your bot’s config file to make it keeping one logfile all the time. This is not recommended on high traffic channels.

Self-logging¶

Because of how traditional IRC works, Eggdrop doesn’t capture outgoing messages to its logfile. However, if the server you are on supports the IRCv3 capability “echo-messageâ€, you can request this capability to be enabled by the server in your config file. This will cause the server to send Eggdrop’d public messages back, thereby allowing those messages to be logged.

Modifying Default Strings¶

You can modify Eggdrop’s output in the partyline, kick messages, and other texts by editing core.english.lang in the language directory.

Modularizing Your Config File¶

You can export parts of your config file to separate files. For example, if you have several config files which differ from themselves only by the nickname and the used servers, you can export them to an own file and link it with the ‘source’ Tcl command, similar to a script. The advantage of this is that you have to edit/upload only the small file instead of the big one. This technique is also useful if you want to maintain the same channel settings, etc across your botnet.

Variables in Your Config¶

You can use variables in your config file, since it’s really just a normal Tcl file. For example, you can set ‘userfile’ and ‘chanfile’ to “yourbot.user†and “yourbot.chan†using the following method:

set myvar "yourbot"
set userfile "$myvar.user"
set chanfile "$myvar.chan"

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/autoscripts.html0000664000175000017500000006164514703073435017456 0ustar geogeo Eggdrop Autoscripts — Eggdrop 1.10.0 documentation

Eggdrop Autoscripts¶

Since it’s inception, users have needed to load a Tcl script into Eggdrop by downloading a Tcl file, editing the file to customize settings, and then sourceing that file in the config file. In v1.10, the Autoscripts system was added to make this process a little more user-friendly. The autoscripts system helps by:

  • Centralizing commonly-used scripts in a single location

  • Allowing scripts to be downloaded via the partyline

  • Allowing script settings to be configured via the partyline

  • Allowing user-written scripts to be managed by the autoscripts system

  • Providing a documented API to write autoscripts-compatible scripts

Autoscripts usage¶

To view available autoscript commands, type .autoscript on the partyline. This will open up a special Eggdrop console that doesn’t require you to prefix commands with a ‘.’ . The following sub-commands are available for use with script:

remote¶

This command will list scripts hosted on the Eggdrop website that are available to be downloaded and installed on your Eggdrop.

fetch <script>¶

This command will download the specified script from the Eggdrop website and place it into the autoscript/ directory.

list¶

This command will list scripts locallt present in the autoscripts/ directory, available to be configured and loaded.

config <script>¶

This command will list settings available for configuration for the provided script.

set <script> <setting>¶

This command will set setting for script to the provided value. To activate this change, use the load command.

load <script>¶

This command will activate the script for use. You can also use this command to reload a script after modifying a script variable.

unload <script>¶

This command will prevent the script from being loaded the next time Eggdrop starts. To fully unload a script, Eggdrop must be restarted!

clean <script>¶

This command will delete the script from the filesystem. After running this command, you will have to re-download and re-configure the script if you wish to use it again.

update [script]¶

If no script is specified, this command checks if there any downloaded script has a newer version available. If a script is specified, autoscript will fetch and install the updated script.

Autoscripts File Structure¶

An autoscripts package requires (minimum) two files: the Tcl script, and a json manifest file.

Tcl File¶

Nothing new or novel here; this is where your Tcl code goes. The one change to this file is that any setting intended should now be located in the manifest.json file, not the Tcl script file. All variables will be added to the global namespace. For this reason, we suggest wrapping a custom autoscript inside a namespace eval <scriptname> {} statement as an autoscript best practice, which will lessen the chance of a variable name colliding with a variable from a separate script.

Manifest.json¶

Every autoscripts package must have a manifest.json file. This file contains metadata for the script such as version and description information, as well as the user-configurable settings for use with th script. A simple example of a manifest.json file is as follows:

{
  "schema": 1,
  "name": "woobie",
  "version_major": 1,
  "version_minor": 0,
  "description": "An example script to help developers write autoscript packages",
  "long_description": "This is an example script to help understand the autoscript system. Yeah, it doesn't really do anything, but that's besides the point. It could, and that should be enough for anyone"
  "config": {
    "loaded": 0,
    "udef": {
       "myflag": {
          "type": "flag",
          "description": "Activate the script on <channel> by doing"
       },
       "mystr1": {
          "type": "str",
          "description": "Flood limit, modify the channel value for this doing",
          "value": "{10:6}"
       },
       "mystr2": {
          "type": "str",
          "description": "Change that with",
          "value": "Just my string"
       }
       "myint1": {
          "type": "int",
          "description": "Number of allowed kicks, could be change with",
          "value": 4
       }
    },
    "requires": "tls",
    "vars": {
      "woobie_dict": {
        "description": "A setting that accepts a dict as a value",
        "value": "{quiet q}"
      },
      "woobie_setting": {
        "description": "A normal setting to enable or disable something",
        "value": "1"
      },
      "woobie_string": {
        "description": "A setting taking a string, like a filename or something",
        "value": "woobie"
      },
      "woobie(array)": {
        "description": "A setting that is set as an array",
        "value":"another string"
      }
    }
  }
}

schema

The schema version of autoscript (currently 1)

name

The name of the script. Must match the script name (if the script is foo.tcl, then this must be foo)

version_major

The major version integer (ie, 1 for 1.6)

version_minor

The minor version integer (ie, 6 for 1.6)

description

A one-line summary of what the script does. This will be shown when available scripts are listed on the partyline via .script list.

long_description

A longer description of what the script does, similar to a README. This will be shown when a script is viewed via .script config.

config-loaded

Whether this script is currently loaded or not. It should be default set to 0.

config-udef-<varname>-type

Type of the user-defined channel setting, could be flag, str or int.

config-udef-<varname>-description

Description of user-defined channel setting used by the script. The description is appended with “ .chanset <channel> <varname> value†in case of int or str, and with “ .channel <channel> +<varname>†when flag

config-udef-<varname>-value

Default value of user-defined channel setting used by the script. This is displayed when configuration settings are displayed to the user on the partyline.

config-requires

Any Tcl package required for use by the script, such as tls, http, json, etc.

config-vars-<varname>

A setting intended to be modified by the user. The ‘description’ field should describe what the setting does, and the ‘value’ field stores the current value. These settings are displayed when the configuration settings are displayed to the user on the partyline.

config-vars-<varname>-description

A description of the setting, displayed in the configuration listing for the script.

config-vars-<varname>-value

The value the setting is set to

File placement¶

Autoscript files are stored in the autoscript directory. The path structure is eggdrop/autoscript/<scriptname>/[script files]. If the autoscript fetch command is used, a .tgz file will be downloaded and extracted to the proper location automatically. If you wish to manually add a script, create a directory with the same name as the script, and then place the script and manifest files inside the directory. The directory name must exactly match the script name (without the .tcl extension)! If the Tcl script to be loaded is called myscript_goodversion_specialfeature.tcl, then the directory must also called myscript_goodversion_specialfeature.

Development hints¶

  • An autoscript should not require a user to manually open the script in an editor for any reason. Design your script as such!

  • Use user defined channel flags to enable/disable a script for a particular channel, they’re easy!

  • Don’t use global statements. Based on the manifest, variables are created by autoscript in the global namespace before the script is loaded. Instead of the global command, use the variable command to access a global variable inside a proc. And because Tcl is awesome, each variable must be declared on its own line, not all on a single line like you can do with global. Sorry!

  • While we’re talking about variables… make them unique to prevent collisions! We recommend prefixing the script name in front of a variable, such as myscript_setting or ms_setting. Alternatively, you can wrap your autoscript inside a namespace eval <scriptname> {} statement, which create a private namespace for your script to operate within.

Tcl Commands¶

The autoscripts Tcl script adds three new commands for use with Tcl scripts:

egg_loaded¶

Description: lists all scripts currently loaded via the autoscripts system

Returns: A Tcl list of script names currently loaded via autoscripts

egg_unloaded¶

Description: lists all scripts downloaded to the local machine via the autoscripts system but not currently loaded by Eggdrop

Returns: A Tcl list of script names downloaded but not currently loaded via autoscripts

egg_all¶

Description: lists all script downloaded to the localm machine via the autoscripts system, regardless if they are running or not

Returns: A Tcl list of all script namees download via autoscripts

eggdrop-1.10.0/doc/html/using/ircv3.html0000664000175000017500000002633714703073435016123 0ustar geogeo IRCv3 support — Eggdrop 1.10.0 documentation

IRCv3 support Last revised: November 27, 2021

IRCv3 support¶

This document provides information about IRCv3 capabilities, as defined via specifications documented by the IRCv3 working group (https://ircv3.net/). Support for some of these specifications was added starting with version 1.9.0, and more capabilities are added as possible with new versions.

About¶

As more and more IRC servers began to develop and implement their own versions of the IRC protocol (generally defined in RFC1459 and RFC2812), a working group comprised of server, client, and bot developers decided to work together to document these features to make their implementation defined and standardized across servers. What emerged was the IRCv3 set of standards. The specifications developed by the IRCv3 working group was designed to be backwards compatible and are generally implemented via a CAP (capability) request sent at the initialization of an IRC session. A client can optinoally request these “extra†capabilities be enabled through the CAP request, with the assumption that the client can then support the capability requested and enabled. Not all servers or clients support the same capabilities, a general support list can be via the appropriate support table link at https://ircv3.net/.

Usage¶

Within eggdrop.conf, several common IRCv3-defined capabilities are enabled simply changing their setting to ‘1’. Other capabilities without explicit settings in eggdrop.conf may be requested by adding them in a space-separated list to the cap-request setting. For more information on what a specific IRCv3-defined capability does, please consult https://ircv3.net/irc/.

Supported CAP capabilities¶

The following capabilities are supported by Eggdrop:

  • CAP/CAP 302 requests

  • SASL 3.2

  • account-notify

  • account-tag

  • away-notify

  • BOT 005 mode

  • cap-notify

  • chghost

  • echo-message

  • extended-join

  • invite-notify

  • message-tags

  • Monitor

  • server-time

  • setname

  • userhost-in-names

  • +typing

Errata¶

  • Enabling echo-message will cause Eggdrop to trigger PUB/PUBM binds on its own messages (because now it can actually see them). This may cause unintentional functionality with some scripts

  • Enabling userhost-in-names will cause Eggdrop’s internal mechanisms to mark a channel’s userlist as synch’d upon receiving the NAMES list after a join, instead of waiting for a full WHO listing. This is done because the assumption is that userhost-in-names was enabled as a response to WHO queries being disabled on a server, which prevents Eggdrop from populating its userlist. To avoid unintended functionality, it is suggested that this capability only be enabled on servers that disable WHO queries.

Copyright (C) 2010 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/users.html0000664000175000017500000003063114703073435016226 0ustar geogeo Users and Flags — Eggdrop 1.10.0 documentation

Last revised: March 07, 2002

Users and Flags¶

People on IRC are recognized by the bot according to their nick!user@host. That is, if I am on IRC as:

*** Robey is robey@hubcap.clemson.edu (i hate milk)

Eggdrop will identify me according to “Robey!robey@hubcap.clemson.edu†and not only by my nickname.

Eggdrop does not have access levels like some bots. There are no meaningless numbers or titles. Instead, each user has “flags†that entitle them to certain privileges. Think of a flag as a badge. Any user can have any number of flags – you can have no flags, or you can have all of them. Some flags are good, some are bad. Each flag is identified by a letter. A channel flag applies only to a specific channel, and a global flag applies to all channels. The standard global flags are:

Flag

Attribute

Description

n

owner

user has absolute control. Only give this flag to people you trust completely.

m

master

user has access to almost every feature of the bot.

t

botnet-master

user has access to all features dealing with the botnet.

a

auto-op

user is opped automatically upon joining a channel.

o

op

user has op access to all of the bot’s channels.

y

auto-halfop

user is halfopped automatically upon joining a channel

l

halfop

user has halfop access to all of the bot’s channels.

g

auto-voice

user is voiced automatically upon joining a channel.

v

voice

user gets +v automatically on +autovoice channels.

f

friend

user is not punished for flooding, etc.

p

party

user has access to the partyline.

q

quiet

user does not get voice on +autovoice channels.

r

dehalfop

user cannot gain halfops on any of the bot’s channels.

d

deop

user cannot gain ops on any of the bot’s channels.

k

auto-kick

user is kicked and banned automatically.

x

xfer

user has access to the file transfer area of the bot the bot.

j

janitor

user can perform maintenance in the file area of the bot (if it exists) – like a “master†of the file area. Janitors have complete access to the filesystem.

c

common

this marks a user who is connecting from a public site from which any number of people can use IRC. The user will now be recognized by NICKNAME.

b

bot

user is a bot.

w

wasop-test

user needs wasop test for +stopnethack procedure.

z

washalfop-test

user needs washalfop test for +stopnethack procedure.

e

nethack-exempt

user is exempted from stopnethack protection.

u

unshared

user record is not sent to other bots.

h

highlight

use bold text in help/text files.

All global flags other then u, h, b, c, x, j, and p are also channel-specific flags. Flags are set with the chattr command. The syntax for this command is:

chattr <nickname> [attributes] [channel]

There are also 26 global user-defined flags and 26 channel user-defined flags (Capital letters A through Z). These are used by scripts, and their uses vary depending on the script that uses them.

Copyright (C) 2002 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/twitch-tcl-commands.html0000664000175000017500000006037714703073435020760 0ustar geogeo Eggdrop Twitch Tcl Commands — Eggdrop 1.10.0 documentation

Eggdrop Twitch Tcl Commands Last revised: April 25, 2020

Eggdrop Twitch Tcl Commands¶

This is an exhaustive list of all the Twitch-specific Tcl commands added to Eggdrop. These commands are held separate from the traditional tcl-commands.doc due to the unique nature of Twitch and the fact that these commands WILL NOT work on a normal IRC server. Again, if you try and use these commands on a normal IRC server they will, at best, not work and possibly have unintended consequences.

This list is accurate for Eggdrop v1.9.0, the minimum version for which Twitch functionality is possible.

It should also be noted that if you are debugging scripts via the partyline, the Eggdrop partyline output has not been updated to handle the potentially LONG tag message lines that are sent by a server. This means if you view a variable that has stored all the tag messages sent by the server, it may appear truncated. Rest assured, the variable does contain the full set of tags, they just aren’t being displayed.

Commands¶

twcmd <chan> <cmd> [arg]¶

Description: sends cmd to the server, prefixed with a ‘/’. This is replicates the web UI functionality of sending commands such as /vip or /subscribers. Do not include a ‘/’ in the cmd. arg, if required, is a single argument, so enclose multiple strings in quotes. Example: twcmd timeout “badguy 100â€

Returns: 0 if command is successfully sent to the Twitch server, 1 on failure

userstate <channel>¶

Description: provides current userstate for the Eggdrop on the given channel.

Returns: a dict containing key/value pairs for userstate values.

roomstate <channel>¶

Description: provides current roomstate of a channel Eggdrop is on.

Returns: a dict containing key/value pairs for roomstate values.

twitchmods <channel>¶

Description: maintains a list of usernames provided by Twitch as those that have moderator status on the provided channel. This list is refreshed upon join, or can manually be refreshed by using the Tcl twcmd to issue a /mods Twitch command. This list is a comprehensive list, the user does not need to be present on the channel to be included on this list.

Returns: A list of usernames designated as having moderator status by Twitch.

twitchvips <channel>¶

Description: maintains a list of usernames provided by Twitch as those that have VIP status on the provided channel. This list is refreshed upon join, or can manually be refreshed by using the Tcl twcmd to issue a /vips Twitch command. This list is a comprehensive list, the user does not need to be present on the channel to be included on this list.

Returns: A list of usernames designated as having VIP status by Twitch.

ismod <nick> [channel]¶

Description: checks if a user is on the moderator list maintained by Twitch (the same list accessible by the /mods command entered via the Twith web GUI). This differs from the other “normal†is* Eggdrop Tcl cmds, as this does NOT check if the user is currently on the channel (that status is unreliable on Twitch IRC).

Returns: 1 if someone by the specified nickname is on the moderator list for the channel (or any channel if no channel name is specified); 0 otherwise.

isvip <nick> [channel]¶

Description: checks if a user is on the VIP list maintained by Twitch (the same list accessible by the /vips command entered via the Twith web GUI). This differs from the other “normal†is* Eggdrop Tcl cmds, as this does NOT check if the user is currently on the channel (that status is unreliable on Twitch IRC).

Returns: 1 if someone by the specified nickname is on the VIP list for the channel (or any channel if no channel name is specified); 0 otherwise.

Binds¶

You can use the ‘bind’ command to attach Tcl procedures to certain events. The binds listed here are in addition to the binds listed in tcl-commands.doc.

Because Twitch offers an IRC gateway that significantly reduces traditional IRC functionality, the following binds listed in tcl-commands.doc are not compatible with Twitch. If they are in an existing script you are running that is fine, they just likely won’t do anything.

To remove a bind, use the ‘unbind’ command. For example, to remove the bind for the “stop†msg command, use ‘unbind msg - stop msg:stop’.

Flags¶

Most of the following binds have “flags†listed as an argument for the bind. Flags represents a flagmask that the user, if found, must match in order for the bind to trigger. Example flag masks are:

-

Matches any user existing in Eggdrop’s internal user list (added to the bot)

*

Matches any user, doesn’t need to be added to Eggdrop

+o

Matches a user with the global ‘o’ flag added to their handle on the Eggdrop

|+f

Matches a user with the ‘f’ flag added on a channel to their handle on the Eggdrop

+m|+m

Matches a user with the ‘m’ flag added either globally or on a channel on the Eggdrop

Bind Types¶

The following is a list of bind types and how they work. Below each bind type is the format of the bind command, the list of arguments sent to the Tcl proc, and an explanation.

  1. CCHT (CLEARCHAT)

bind ccht <flags> <mask> <proc>

procname <nick> <chan>

Description: Called when the chat history for the channel or a user on the channel is cleared. The value of mask specified in the bind is matched against #channel nick!nick@nick.tmi.twitch.tv and can use wildcards. If a user is found that matches mask, they must also match the flags mask. If the CLEARCHAT is only targeted at a specific user and not the channel, that user’s nickname will appear in nick, otherwise nick is empty. chan will contain the channel the CLEARCHAT was used on.

  1. CMSG (CLEARMSG)

bind cmsg <flags> <command> <proc>

procname <nick> <chan> <msgid> <msg>

Description: Called when a specific message on the channel is cleared. The value of mask specified in the bind is matched against #channel nick!nick@nick.tmi.twitch.tv and can use wildcards. If a user is found that matches mask, they must also match the flags mask. nick contains the user’s nickname, and chan will contain the channel the CLEARMSG was used on.

  1. HTGT (HOSTTARGET)

bind htgt <flags> <mask> <proc>

procname <target> <chan> <viewers>

Description: Called when a broadcaster starts or stops hosting another Twitch channel. mask is in the format “#channel targetâ€, where #channel is the hosting channel and target is the name of the broadcaster being hosted by #channel. Similarly for the proc, target is the name of the Twitch channel being hosted by chan. A value of - in target indicates that the broadcaster has stopped hosting another channel. viewers contains the number of viewers in chan that are now watching target when hosting starts, but has been found to not be reliably provided by Twitch (often arbitrarily set to 0).

  1. WSPR (WHISPER)

bind wspr <flags> <command> <proc>

procname <nick> <userhost> <handle> <msg>

Description: Checks the first word of a whisper Eggdrop receives from another Twitch user. The first word of the whisper is matched against command, and the remainder of the text is passed to msg. nick is populated with the login name of the user messaging the Eggdrop, userhost contains nick’s userhost in the format nick!nick@nick.tmi.twitch.tv. handle will match the user’s handle on the bot if present, otherwise it will return a *.

  1. WSPM (WHISPER)

bind wspm <flags> <mask> <proc>

procname <nick> <userhost> <handle> <msg>

Description: Checks the entire contents of a whisper Eggdrop receives from another Twitch user. The contents of the whisper are matched against mask, which can contain wildcards. nick is populated with the login name of the user messaging the Eggdrop, userhost contains nick’s userhost in the format nick!nick@nick.tmi.twitch.tv. handle will match the user’s handle on the bot if present, otherwise it will return a *. The full text of the whisper is stored in msg.

  1. RMST (ROOMSTATE)

bind rmst <flags> <mask> <proc>

procname <chan> <tags>

Description: Called when Eggdrop receives a ROOMSTATE message. mask is in the format of #channel keys and can use wildcards. For example, to trigger this bind on #eggdrop for any change, you would use #eggdroptest * as the mask, or to trigger on #eggdrop specifically for the emote-only setting, you would use "#eggdrop *emote-only*" as the mask. Due to the nature of multiple keys per roomstate and uncertainty of ordering, it is recommended to use multiple binds if you wish to specify multiple key values. chan is the channel Eggdrop received the ROOMSTATE message for, and tags is a list of key/value pairs provided by the ROOMSTATE message, suitable for use as a Tcl dict. flags is ignored.

  1. USST (USERSTATE)

bind usst <flags> <mask> <proc>

procname <chan> <tags>

Description: Called when Eggdrop receives a USERSTATE message. mask is in the format of #channel keys and can use wildcards (see the RMST bind for additional details on format). chan is the channel Eggdrop received the USERSTATE message for, and tags is a list of key/value pairs provided in the USERSTATE message, suitable for use as a Tcl dict. flags is ignored.

  1. USRNTC (USERNOTICE)

bind usrntc <flags> <mask> <proc>

procname <chan> <tags>

Description: Called when Eggdrop received a USERNOTICE message. mask` is in the format of #channel keys and can use wildcards (see the RMST bind for additional details on format). chan is the channel Eggdrop received the USERNOTICE message for, and tags is a list of key/value pairs provided in the USERNOTICE message, suitable for use as a Tcl dict. flags is ignored.

eggdrop-1.10.0/doc/html/using/accounts.html0000664000175000017500000004572014703073435016711 0ustar geogeo Account tracking in Eggdrop — Eggdrop 1.10.0 documentation

Account tracking in Eggdrop¶

In Eggdrop 1.9.3, Eggdrop added the ability to associate nicknames with the service accounts they are logged into. It is IMPORTANT to note that Eggdrop’s ability to do this is dependent on an IRC server’s implementation of three features- the IRCv3 extended-join capability, the IRCv3 account-notify capability, and WHOX support. All three of these features must be supported by the server and, in the case of extended-join and account-notify, requested by Eggdrop in order for Eggdrop to maintain “perfect†association between nicknames and account statuses.

Required Server Capabilities¶

You’re going to see this repeated a lot- the IRC server must support three features in order for Eggdrop to accurately associate accounts with nicknames. These three features allow Eggdrop to always know the current association between an account and a nickname by getting account statuses of users already on a channel when it joins, new users joining a channel, and users who authenticate while on a channel.

extended-join¶

extended-join is an IRCv3-defined capability that adds the account name of a user to the JOIN message sent by the IRC server, alerting clients that a new member has joined a channel. Enabling this capability allows Eggdrop to immediately determine the account name associated with a user joining a channel

account-notify¶

account-notify is an IRCv3-defined capability that sends a message to a channel when a member of the channel either authenticates or deauthenticates from their account. Enabling this capability allows Eggdrop to immediately associate an account to a channel member when they authenticate or deauthenticate.

WHOX¶

‘WHOX <https://ircv3.net/specs/extensions/whox>`_ is a server feature that allows a client to request custom fields to be returned in a WHO response. If a server supports this capability, Eggdrop sends a WHOX query to the server when it joins a channel, allowing it to immediately determine accounts associated with channel members when Eggdrop joins a channel.

Enabling Eggdrop Account Tracking¶

By default, the Eggdrop config file will attempt to enable all the capabilities required for account tracking. There are two settings to pay attention to

# To request the account-notify feature via CAP, set this to 1
set account-notify 1

# To request the extended-join feature via CAP, set this to 1
set extended-join 1

The ability of a server to support WHOX queries is determined via a server’s ISUPPORT (005) reply. If a server supports WHOX queries, Eggdrop will automatically enable this feature.

Checking Account-tracking Status¶

While Eggdrop is running, join the partyline and type .status. If account-tracking is enabled (both the server supports and Eggdrop has requested), you’ll see this line

Loaded module information:
  #eggdroptest        : (not on channel)
  Channels: #eggdroptest (trying)
  Account tracking: Enabled           <--- This line
  Online as: BeerBot (BeerBot)

Otherwise, the prompt will tell you which required capability is missing/not enabled

Loaded module information:
  #eggdroptest        :   2 members, enforcing "+tn" (greet)
  Channels: #eggdroptest (need ops)
  Account tracking: Best-effort (Missing capabilities: extended-join, see .status all for details)      <---- This line
  Online as: Eggdrop (Eggdrop)

Determining if a Server Supports Account Capabilities¶

A server announces the capabilities it supports via a CAP request. If you have Tcl enabled on the partyline (or via a raw message from a client), you can send .tcl cap ls and see if the extended-join and account-notify capabilities are supported by the server. If they are not listed, the server does not support it.

A server announces if it supports WHOX via its ISUPPORT (005) announcement. If you have Tcl enabled on the partyline, you can send .tcl issupport isset WHOX and if it returns ‘1’, WHOX is supported by the server.

Best-Effort Account Tracking¶

If a server only supports some, but not all, of the required capabilities, Eggdrop will switch to ‘best effort’ account tracking. This means Eggdrop will update account statuses whenever it sees account information, but in this mode Eggdrop cannot guarantee that all account associations are up to date.

If a server does not support extended-join, Eggdrop will not be able to determine the account associated with a user when they join. Eggdrop can update this information by sending a WHOX to the server.

If a server does not support account-notify, Eggdrop will not be able to determine the account associated with a user if they authenticate/deauthenticate from their account after joining a channel. Eggdrop can update this information by sending a WHOX to the server.

If a server does not support WHOX, Eggdrop will not be able to determine the accounts associated with users already on a channel before Eggdrop joined. There is no reliable way to update this information.

One workaround to significantly increase the accuracy of account tracking for scripts in a ‘best effort’ scenario would be to issue a WHOX query (assuming the server supports it), wait for the reply from the server, and then query for the account information.

account-tag¶

One supplementary capability that can assist a best-effort account tracking scenario is the IRCv3-defined account-tag capability. The account-tag capability attaches a tag with the account name associated with the user sending a command. Enabling this capability allows Eggdrop to update its account tracking every time a user talks in channel, sets a mode, sends a kick, etc. While still not able to offer the same level of accuracy as enabling the “main three†account tracking features, it can increase the overall accuracy of the account list. Additionally, binds that react to user activity (pub, kick, mode, etc) containing account-tag will update the internal account list prior to executing the associated callback, so looking up the account name in the callback can be considered accurate.

Using Accounts with Tcl Scripts¶

The Eggdrop Tcl ACCOUNT bind is triggered whenever an existing account record stored by Eggdrop is modified, such as a user de/authenticating to their account while in a channel, or information such as an account-tag being seen that updates an existing user. However, the ACCOUNT bind will NOT be triggered for the creation of a new user record, such as a user joining a channel. The bind is triggered for every channel the user is seen on- this means if a user is present with Eggdrop on four channels, the bind will be executed four times, each time with a different channel variable being passed to the associated Tcl procedure. Additionally, in a best-effort account tracking situation, Eggdrop will update the account associated with a user on all channels, not just the channel the event is seen on (and thus resulting in a bind trigger for each channel the user is on).

In order to trigger Tcl script events to cover all instances where a user logs in, you need to pair an ACCOUNT bind with a JOIN bind. This will allow you to execute account-based events when a user joins as well as if they authenticate after joining.

eggdrop-1.10.0/doc/html/using/ipv6.html0000664000175000017500000002673614703073435015764 0ustar geogeo IPv6 support — Eggdrop 1.10.0 documentation

IPv6 support Last revised: Mar 24, 2021

IPv6 support¶

This document provides information about IPv6 support which is a new eggdrop feature since version 1.8.0.

About¶

Eggdrop can be compiled with IPv6 support. To make use of this, you need an IPv6-enabled OS and IPv6 connectivity. Every possible type of TCP connection can be established over IPv6 now, which includes IRC connections, DCC connections, file transfer, botnet connections, Tcl script connections initiated with the listen/connect commands, telnet and ident lookups.

Installation¶

./configure and install as usual, the configure script will detect if your system supports IPv6 and will enable it automatically. You can override this behavior and manually enable or disable IPv6 with ./configure –enable-ipv6 or ./configure –disable-ipv6. Older operating systems may have limited or no support for IPv6. Linux 2.4 & 2.6, FreeBSD, NetBSD, OpenBSD and Mac OS X all have full IPv6 support. MS Windows has proper support beginning with Windows Vista. XP’s IPv6 stack has some limitations and needs to be manually installed and enabled. Cygwin includes IPv6 only since version 1.7. Unofficial patches are available for 1.5.x.

Usage¶

You can use IPv6 addresses wherever you could specify IPv4 ones. IPs and hostnames are interchangeable everywhere. For certain settings and commands, you can enclose IPv6 addresses in square brackets to prevent the colon character (:) from being interpreted as a port separator. These are documented in the help files and the html documentation, so you can consult them when in doubt.

CTCP CHAT/CHAT4/CHAT6¶

When a user sends a CTCP chat request, the request is passed to the bot via the IRC server, hiding the user’s IP. Since Eggdrop is unable to ‘see’ the type IP of the user is using (IPv4 or IPv6), it is thus unable to determine whether it should send back an IPv4 or an IPv6 address for the user to connect to. To work around this problem, the CHAT4 and CHAT6 commands were added to Eggdrop to force it to present an IPv4 or IPv6 address for use with a DCC connection, respectively. Otherwise, the traditional CHAT command will likely result in the Eggdrop presenting an IPv4 address to the user. So in short, if you’re on an IPv6 address and want to use CTCP CHAT to initiate a DCC session for the partyline, use CHAT6, not CHAT as the CTCP argument.

Settings¶

There are four new IPv6 related config variables:

vhost4

set this to use a specific vhost with IPv4 connections. Can contain either an IP address or a hostname.

vhost6

set this to use a specific vhost with IPv6 connections. Can contain either an IPv6 address or a hostname.

prefer-ipv6

when a connection can be established through both IPv4 and IPv6. You can set this to 1 to prefer IPv6 or to 0 to prefer IPv4.

Other affected variables:

my-ip and my-hostname are removed now. Their function is split between vhost4 and the listen command.

nat-ip works with IPv4 as it used to. It has no meaning for IPv6 and is not queried for IPv6 connections.

Copyright (C) 2010 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/pbkdf2.html0000664000175000017500000003532614703073435016243 0ustar geogeo Encryption/Hashing — Eggdrop 1.9.2 documentation

Encryption/Hashing¶

With the release of Eggdrop 1.9.0, an updated crytopgraphy module (PBKDF2) was released for use with Eggdrop. PBKDF2 is a one-way hashing algorithm used to protect the contents of the password file, as well as for use via the Tcl interface. Prior to this, blowfish was used for cryptographic requirements, such as hashing passwords for storage in the userfile.

Background¶

Prior to Eggdrop 1.9.0, the blowfish module was included with Eggdrop to protect sensitive data such as passwords stored in the userfile. While there are no known practical attacks against blowfish at the time of this writing, it was decided that a more modern crypto solution was desirable to be included with Eggdrop. The PBKDF2 (Password-based Key Derivation Function 2) uses a password and salt value to create a password hash (the salt value ensures that the hashes of two identical passwords are different). This process is one-way, which means the hashes cannot be cryptographically reversed and thus are safe for storing in a file.

The default configuration of Eggdrop 1.9.0 has both the blowfish and pbkdf2 modules enabled (see Hybrid Configuration below). This will allow users upgrading a seamless transition to the PBKDF2 module. For users starting an Eggdrop for the first time, it is recommended to comment out the ‘loadmodule blowfish’ line, in order to implement the Solo Configuration.

Also of note, the maximum password length is increased to 30 with PBKDF2, up from 15 with Blowfish. The automatically-generated botnet passwords are now 30 characters instead of the maximum-allowed 16 used with the blowfish module, and pull from a larger character set than what was used with the blowfish module. Finally, if you are linking bots, you’ll need to ensure the same module is loaded on both bots (ie, if the hub bot is using the pbkdf2 module, the leaf bots must have pbkdf2 loaded as well in order to enable authentication checks).

Usage¶

There are two ways to implement PBKDF2- Hybrid configuration, which is recommended for transitioning an already-existing userfile to PBKDF2 by working with the blowfish module, and Solo configuration, which is recommended for use when starting a new Eggdrop for the first time.

Hybrid Configuration¶

With a hybrid configuration, Eggdrop will run both the blowfish and the pbkdf2 modules concurrently. This will allow Eggdrop to authenticate users against their existing blowfish passwords stored in the userfile. However, the first time a user logs in, the pbkdf2 module will hash the (correct) password they enter and save it to the userfile. The pbkdf2-hashed password will then be used for all future logins.

Enabling hybrid configuration¶

  1. BACK UP YOUR USERFILE! This is the file that usually ends with ‘.user’.
  2. Ensure
loadmodule blowfish

is added to the config file and not commented out (it should already be there).

  1. Ensure
::
loadmodule pbkdf2

is uncommented in the config file (or added, if this is a config file from 1.8)

  1. Start Eggdrop
  2. If this is your first time starting this Eggdrop, follow the instructions it gives you at startup to identify yourself. Otherwise, for an existing Eggdrop where you are already added to the userfile, log in as usual to the partyline via telnet or DCC, or authenticate via a message command like /msg bot op <password>
  3. Sit back and enjoy a cold beverage, you did it! Now encourage the rest of your users to log in so that their passwords are updated to the new format as well.

Solo configuration¶

With a solo configuration, Eggdrop will only run the pbkdf2 module. Eggdrop will not be able to authenticate against passwords in an already-existing userfile and thus will require every user to set a password again, as if they were just added to Eggdrop. This can be done via the PASS msg command (/msg bot PASS <password>) or by having a user with appropriate permissions (and an already-set password) log into the partyline and use the ‘.chpass’ command.

SECURITY CONSIDERATION: This configuration is not ideal for transitioning an existing userfile to PBKDF2. Without the blowfish module loaded, every user in the userfile essentially has no password set. This means any other user that matches a hostmask applied to a handle (!*@.aol.com, I’m looking at you) could set the password and gain access to that user’s Eggdrop account.

Enabling solo configuration¶

  1. BACK UP YOUR USERFILE! This is the file that usually ends with ‘.user’.

  2. Remove or comment:

    # loadmodule blowfish
    

from your config file.

  1. Ensure:

    loadmodule pbkdf2
    

is uncommented (or added, if this is a config file from 1.8) from your config file.

  1. Start Eggdrop
  2. If this is your first time starting this Eggdrop, follow the instructions it gives you at startup to identify yourself. Otherwise, for an existing Eggdrop where you are already added to the userfile, set a new password via /msg bot PASS <password>
  3. Sit back and enjoy a fancy lobster dinner, you did it! If there are other users already added to the bot, DEFINITELY encourage them to set a new password IMMEDIATELY!

Tcl Interface¶

The PBKDF2 module adds the ‘encpass2’ command to the Tcl library. This command takes a string and hashes it using the PBKDF2 algorithm, and returns a string in the following format:

$<PBK method>$rounds=<rounds>$<salt>$<password hash>

where ‘PBK method’ is the method specified in the configuration file, ‘rounds’ is the number of rounds specified in the configuration file, ‘salt’ is the value used for the salt, and ‘password hash’ is the output of the hashing algorithm.

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/twitch.html0000664000175000017500000003416714703073435016377 0ustar geogeo Twitch — Eggdrop 1.9.2 documentation

Twitch¶

This module attempts to provide connectivity with the Twitch gaming platform. While Twitch provides an IRC gateway to connect with it’s streaming service, it does not claim to (and certainly does not) follow the IRC RFC in any meaningful way. The intent of this module is not to provide the full spectrum of management functions typically associated with Eggdrop; instead it focuses around the following key functions:

  • Logging of general and Twitch-specific events (raids, blocks, bit donations)
  • Tracking userstate and roomstate values
  • Adding Tcl event binds for a number of Twitch events

Disclaimer¶

We should also make clear that Eggdrop is in no way affiliated with Twitch in any way, and Twitch fully controls their own platform, to include the IRC gateway. This was just a fun project implemented at the request of some users to interact with the Twitch IRC development gateway as it existed at the time of development. At any time, Twitch could choose to alter or discontinue their IRC connectivity, thereby rendering this Eggdrop module useless. Eggdrop developers are also unable to offer technical support for Twitch-specific issues encountered while using this module.

Registering with Twitch¶

  1. Register an account with Twitch. At the time of writing, this is done by visiting Twitch and clicking on the Sign Up button.
  2. Generate a token to authenticate your bot with Twitch. At the time of writing, this is done by visiting the Twitch OAuth generator while logged in to the account you just created. The token will be an alphanumeric string and should be treated like a password (…because it is). Make note of it, and keep it safe!

Editing the config file¶

  1. Find the options to add a server in the server section of the config file. Remove the sample servers listed and add the following line in their place, replacing the alphanumeric string after ‘oauth:’ with the token you created when registering with Twitch in the previous section. Pretending your Twitch token from the previous step is ‘j9irk4vs28b0obz9easys4w2ystji3u’, it should look like this:

    server add irc.chat.twitch.tv 6667 oauth:j9irk4vs28b0obz9easys4w2ystji3u
    

Make sure you leave the ‘oauth:’ there, including the ‘:’.

  1. Spoiler alert- this step tells you to do nothing, but we’re including it for the sake of thoroughness. We know you are the ideal IRC user and have read all the docs for Twitch already, and noticed that Eggdrop has to request capabilities from the Twitch via a CAP request, something that is normally set in the config file. Good news! The Twitch module does this for you already, automatically. No need to edit the cap-request setting in the config. Moving on!

  2. Find the Twitch section of the config file, and enable the loading of the twitch module by removing the ‘#’ in front of the loadmodule command. It should look like this when you are done:

    loadmodule twitch
    
  3. Start your bot as usual, and good luck!

Twitch web UI functions¶

Twitch is normally accessed via a web UI, and uses commands prefixed with a . or a / to interact with the channel. The Twitch module adds the partyline command twcmd to replicate those Twitch-specific commands. For example, to grant VIP status to a user via Tcl, you would use the command .twcmd vip username. or to restrict chat to subscribers, you would use .twcmd subscribers (Note: no . or / is needed as a prefix to the Twitch command). In other words, .twcmd in Tcl is the interface to the standard Twitch set of commands available through the web UI (Also available as a Tcl command).

Twitch IRC limitations¶

There are a few things you should know about how Twitch provides service through the IRC gateway that affects how well Eggdrop can function:

  • Twitch does not broadcast JOINs or PARTs for channels over 1,000 users. This renders tracking users on a channel unreliable.
  • Twitch does not broadcast MODE changes for moderator status. This (mostly) renders tracking the status of users infeasible.
  • Twitch stores bans on its servers (and does not accept MODE +b), making the Eggdrop ban list (and exempts/invites) mostly useless
  • Twitch does not allow clients to issue MODE +o/-o commands, preventing Eggdrop from op’ing users through the traditional method

In light of these limitations, Eggdrop developers made an intentional decision to leave some non-compatible capabilities present with the Twitch module, most notably on the Tcl side. For example, if functionality such as the Tcl topic bind were to be removed, already-written scripts that had that feature in them would simply not load, rendering the entire Tcl script useless. By leaving these capabilities in, the hope is that existing Tcl scripts can still be used with Twitch, even if in a degraded capacity. As such, do be careful with the scripts you load as you may face errors you had not encountered before.

eggdrop-1.10.0/doc/html/using/features.html0000664000175000017500000002323614703073435016706 0ustar geogeo Eggdrop Features — Eggdrop 1.10.0 documentation

Eggdrop Features¶

Eggdrop is the most advanced IRC robot available. It has been under development since December 1993, and unlike most other bots, it is still regularly updated. Some of its features include:

  • Capability (CAP) support used to enable IRCv3 features. Eggdrop currently supports the following IRCv3 capability sets: account-notify, account-tag, away-notify, cap-notify, chghost, echo-message, extended-join, invite-notify, message-tags, monitor, SASL, server-time, setname, WHOX, and +typing.

  • Support for SSL-enabled IRC servers

  • Support for IPv6 users

  • Support for Twitch servers

  • Completely separate channel user lists like having a separate bot for each channel.

  • A “party line†available through dcc chat or telnet, with multiple channels, giving you the ability to talk to people without being affected by netsplits.

  • A “botnetâ€. A botnet consists of one or more bots linked together. This can allow bots to op each other securely, control floods efficiently, and share user lists, ban lists, exempt/invite lists, and ignore lists (if sharing is enabled).

  • User records are saved on disk and alterable via dcc chat. Each user can have a password (encrypted), a list of valid hostmasks, a set of access flags, etc.

  • The ability to “learn†new users (if you choose to let the bot do so) by letting users /MSG the bot “helloâ€. The bot will grant them automatic access of whatever type you specify (or even no access at all).

  • A file system where users can upload and download files in an environment that looks and acts (for the most part) like a typical UNIX system. It also has the ability to mark files and directories as hidden – unaccessible to people without certain user flags.

  • Console mode: you can view each channel through dcc chat or telnet, selectively looking at mode changes, joins and parts, channel talk, or any combination of the above.

  • A scripting language: commands and features can be easily added to the bot by means of the Tcl scripting language, giving you the power of TOTAL customization of your bot.

  • Module support: you can remove/add features to your bot by adding or removing modules.

Copyright (C) 1997 Robey Pointer

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/patch.html0000664000175000017500000002317214703073435016166 0ustar geogeo Patching Eggdrop — Eggdrop 1.10.0 documentation

Patching Eggdrop¶

Eggdrop is an open source project that depends on contributions of its users- like you! If you come across a feature you’d like to see implemented, find a bug, or think the documentation could be made more clear, you can open an issue on GitHub to discuss your ideas, and then submit a Pull Request to implement it!

Submitting a patch via GitHub¶

To create a patch via github:

  1. Fork the eggdrop git repo by logging in to your GitHub account and clicking the fork button at the top of the screen. Follow the directions it provides to configure your local repo.

  2. Enter the local directory and create a new branch for your patch:

    git checkout -b <DescriptiveBranchName>
    
  3. Make your changes

  4. Once you confirm your patch works, push the changes back to your GitHub repo - this is usually done by something similar to:

    git push origin <DescriptiveBranchName>
    
  5. Create a pull request by clicking on the “Pull Request†button on your GitHub page. Select the appropriate branches (usually eggheads/eggdrop/develop and yourUserName/eggdrop/YourBranchName)

  6. Fill in the Pull Request template and submit

  7. Pour yourself a cold one and bask in the warm feeling of contributing to the open source community! Karma++!

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/tcl-commands.html0000664000175000017500000063155714703073435017464 0ustar geogeo Eggdrop Tcl Commands — Eggdrop 1.10.0 documentation

Eggdrop Tcl Commands Last revised: January 6, 2024

Eggdrop Tcl Commands¶

This is an exhaustive list of all the Tcl commands added to Eggdrop. All of the normal Tcl built-in commands are still there, of course, but you can also use these to manipulate features of the bot. They are listed according to category.

This list is accurate for Eggdrop v1.10.0. Most scripts written for the v1.3, v1.4, 1.6, 1.8, and 1.9 series of Eggdrop should probably work in their current form, with only a very few needing minor modifications. Scripts which were written for v0.9, v1.0, v1.1 or v1.2 will probably not work without modification.

Output Commands¶

putserv <text> [options]¶

Description: sends text to the server, like ‘.dump’ (intended for direct server commands); output is queued so that the bot won’t flood itself off the server.

Options: -next push messages to the front of the queue -normal no effect

Returns: nothing

Module: server

puthelp <text> [options]¶

Description: sends text to the server, like ‘putserv’, but it uses a different queue intended for sending messages to channels or people.

Options: -next push messages to the front of the queue -normal no effect

Returns: nothing

Module: server

putquick <text> [options]¶

Description: sends text to the server, like ‘putserv’, but it uses a different (and faster) queue.

Options: -next push messages to the front of the queue -normal no effect

Returns: nothing

Module: server

putnow <text> [-oneline]¶

Description: sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server.

Options: -oneline send text up to the first r or n, discarding the rest

Returns: nothing

Module: server

putkick <channel> <nick,nick,…> [reason]¶

Description: sends kicks to the server and tries to put as many nicks into one kick command as possible.

Returns: nothing

Module: irc

putlog <text>¶

Description: logs <text> to the logfile and partyline if the ‘misc’ flag (o) is active via the ‘logfile’ config file setting and the ‘.console’ partyline setting, respectively.

Returns: nothing

Module: core

putcmdlog <text>¶

Description: logs <text> to the logfile and partyline if the ‘cmds’ flag (c) is active via the ‘logfile’ config file setting and the ‘.console’ partyline setting, respectively.

Returns: nothing

Module: core

putxferlog <text>¶

Description: logs <text> to the logfile and partyline if the ‘files’ flag (x) is active via the ‘logfile’ config file setting and the ‘.console’ partyline setting, respectively.

Returns: nothing

Module: core

putloglev <flag(s)> <channel> <text>¶

Description: logs <text> to the logfile and partyline at the log level of the specified flag. Use “*†in lieu of a flag to indicate all log levels.

Returns: nothing

Module: core

dumpfile <nick> <filename>¶

Description: dumps file from the help/text directory to a user on IRC via msg (one line per msg). The user has no flags, so the flag bindings won’t work within the file.

Returns: nothing

Module: core

queuesize [queue]¶

Returns: the number of messages in all queues. If a queue is specified, only the size of this queue is returned. Valid queues are: mode, server, help.

Module: server

clearqueue <queue>¶

Description: removes all messages from a queue. Valid arguments are: mode, server, help, or all.

Returns: the number of deleted lines from the specified queue.

Module: server

cap <ls/values/req/enabled/raw> [arg]¶

Description: displays CAP status or sends a raw CAP command to the server. “ls†will list the capabilities Eggdrop is internally tracking as supported by the server. “values†will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and “values†with a capability name as arg will list the values associated for the capability. “enabled†will list the capabilities Eggdrop is internally tracking as negotiated with the server. “req†will request the capabilities listed in “arg†from the server. “raw†will send a raw CAP command to the server. The arg field is a single argument, and should be submitted as a single string. For example, to request capabilities foo and bar, you would use [cap req “foo barâ€], and for example purposes, sending the same request as a raw command would be [cap raw “REQ :foo barâ€].

Returns: a list of CAP capabilities for the “enabled†and “ls†sub-commands; a dict of capability/value pairs for the “values†command or a list if “values†if followed by an argument; otherwise nothing.

Module: server

tagmsg <tags> <target>¶

Description: sends an IRCv3 TAGMSG command to the target. Only works if message-tags has been negotiated with the server via the cap command. tags is a Tcl dict (or space-separated string) of the tags you wish to send separated by commas (do not include the @prefix), and target is the nickname or channel you wish to send the tags to. To send a tag only (not a key/value pair), use a “†as the value for a key in a dict, or a “{}†if you are sending as a space-separated string.

Examples:

set mytags [dict create +foo bar moo baa +last “â€]; tagmsg $mytags #channel tagmsg “+foo bar moo baa +last {}†#channel

Returns: nothing

Module: server

server add <ip/host> [[+]port [password]]¶

Description: adds a server to the list of servers Eggdrop will connect to. Prefix the port with ‘+’ to indicate an SSL-protected port. A port value is required if password is to be specified. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000).

Returns: nothing

Module: server

server remove <ip/host> [[+]port]¶

Description: removes a server from the list of servers Eggdrop will connect to. If no port is provided, all servers matching the ip or hostname provided will be removed, otherwise only the ip/host with the corresponding port will be removed. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000).

Returns: nothing

Module: server

server list¶

Description: lists all servers currently added to the bots internal server list

Returns: A list of lists in the format {{hostname} {port} {password}}

Module: server

User Record Manipulation Commands¶

countusers¶

Returns: number of users in the bot’s database

Module: core

validuser <handle>¶

Returns: 1 if a user by that name exists; 0 otherwise

Module: core

finduser [-account] <value>¶

Description: finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user@host.

Returns: the handle found, or “*†if none

Module: core

userlist [flags]¶

Returns: a list of users on the bot. You can use the flag matching system here ([global]{&/|}[chan]{&/|}[bot]). ‘&’ specifies “andâ€; ‘|’ specifies “orâ€.

Module: core

passwdok <handle> <pass>¶

Description: checks the password given against the user’s password. Check against the password “-†to find out if a user has no password set.

Returns: 1 if the password matches for that user; 0 otherwise. Or if we are checking against the password “-â€: 1 if the user has no password set; 0 otherwise.

Module: core

getuser <handle> [entry-type] [extra info]¶

Description: an interface to the new generic userfile support. Without an entry-type, it returns a flat key/value list (dict) of all set entries. Valid entry types are:

ACCOUNT

returns thee a list of servivce accounts associated with the user

BOTFL

returns the current bot-specific flags for the user (bot-only)

BOTADDR

returns a list containing the bot’s address, bot listen port, and user listen port

HOSTS

returns a list of hosts for the user

LASTON

returns a list containing the unixtime last seen and the last seen place. LASTON #channel returns the time last seen time for the channel or 0 if no info exists.

INFO

returns the user’s global info line

XTRA

returns the user’s XTRA info

COMMENT

returns the master-visible only comment for the user

HANDLE

returns the user’s handle as it is saved in the userfile

PASS

returns the user’s encrypted password

For additional custom user fields, to include the deprecated “EMAIL†and “URL†fields, reference scripts/userinfo.tcl.

Returns: info specific to each entry-type

Module: core

setuser <handle> <entry-type> [extra info]¶

Description: this is the counterpart of getuser. It lets you set the various values. Other then the ones listed below, the entry-types are the same as getuser’s.

Type

Extra Info

ACCOUNT

[account] If no value is specified, all accounts for the user will be cleared. Otherwise, only a single account will be added to the account list

PASS

<password>

Password string (Empty value will clear the password)

BOTADDR

<address> [bot listen port] [user listen port]

Sets address, bot listen port and user listen port. If no listen ports are specified, only the bot address is updated. If only the bot listen port is specified, both the bot and user listen ports are set to the bot listen port.

HOSTS

[hostmask]

If no value is specified, all hosts for the user will be cleared. Otherwise, only 1 hostmask is added :P

LASTON

This setting has 3 forms.

<unixtime> <place>

sets global LASTON time. Standard values used by Eggdrop for <place> are partyline, linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to anything.

<unixtime>

sets global LASTON time (leaving the place field empty)

<unixtime> <channel>

sets a user’s LASTON time for a channel (if it is a valid channel)

Returns: nothing

Module: core

chhandle <old-handle> <new-handle>¶

Description: changes a user’s handle

Returns: 1 on success; 0 if the new handle is invalid or already used, or if the user can’t be found

Module: core

chattr <handle> [changes [channel]]¶

Description: changes the attributes for a user record, if you include any. Changes are of the form ‘+f’, ‘-o’, ‘+dk’, ‘-o+d’, etc. If changes are specified in the format of |<changes> <channel>, the channel-specific flags for that channel are altered. You can now use the +o|-o #channel format here too.

Returns: new flags for the user (if you made no changes, the current flags are returned). If a channel was specified, the global AND the channel-specific flags for that channel are returned in the format of globalflags|channelflags. “*†is returned if the specified user does not exist.

Module: core

botattr <handle> [changes [channel]]¶

Description: similar to chattr except this modifies bot flags rather than normal user attributes.

Returns: new flags for the bot (if you made no changes, the current flags are returned). If a channel was specified, the global AND the channel-specific flags for that channel are returned in the format of globalflags|channelflags. “*†is returned if the specified bot does not exist.

Module: core

matchattr <handle> <flags> [channel]¶

Description: checks if the flags of the specified user match the flags provided. “flags†is of the form:

[+/-]<global flags>[&/|<channel flags>[&/|<bot flags>]]

Either | or & can be used as a separator between global, channel, and bot flags, but only one separator can be used per flag section. A ‘+’ is used to check if a user has the subsequent flags, and a ‘-’ is used to check if a user does NOT have the subsequent flags. Please see Flag Masks for additional information on flag usage.

Returns: 1 if the specified user has the flags matching the provided mask; 0 otherwise

Module: core

adduser <handle> [hostmask]¶

Description: creates a new user entry with the handle and hostmask given (with no password and the default flags)

Returns: 1 if successful; 0 if the handle already exists

Module: core

addbot <handle> <address> [botport [userport]]¶

Description: adds a new bot to the userlist with the handle and botaddress given (with no password and no flags). <address> format is one of:

  • ipaddress

  • ipv4address:botport/userport [DEPRECATED]

  • [ipv6address]:botport/userport [DEPRECATED]

NOTE 1: The []s around the ipv6address argument are literal []s, not optional arguments. NOTE 2: In the deprecated formats, an additional botport and/or userport given as follow-on arguments are ignored.

Returns: 1 if successful; 0 if the bot already exists or a port is invalid

Module: core

deluser <handle>¶

Description: attempts to erase the user record for a handle

Returns: 1 if successful, 0 if no such user exists

Module: core

delhost <handle> <hostmask>¶

Description: deletes a hostmask from a user’s host list

Returns: 1 on success; 0 if the hostmask (or user) doesn’t exist

Module: core

addchanrec <handle> <channel>¶

Description: adds a channel record for a user

Returns: 1 on success; 0 if the user or channel does not exist

Module: channels

delchanrec <handle> <channel>¶

Description: removes a channel record for a user. This includes all associated channel flags.

Returns: 1 on success; 0 if the user or channel does not exist

Module: channels

haschanrec <handle> <channel>¶

Returns: 1 if the given handle has a chanrec for the specified channel; 0 otherwise

Module: channels

getchaninfo <handle> <channel>¶

Returns: info line for a specific channel (behaves just like ‘getinfo’)

Module: channels

setchaninfo <handle> <channel> <info>¶

Description: sets the info line on a specific channel for a user. If info is “noneâ€, it will be removed.

Returns: nothing

Module: channels

newchanban <channel> <ban> <creator> <comment> [lifetime] [options]¶

Description: adds a ban to the ban list of a channel; creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, ban-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ban.

Options:

sticky

forces the ban to be always active on a channel, even with dynamicbans on

Returns: nothing

Module: channels

newban <ban> <creator> <comment> [lifetime] [options]¶

Description: adds a ban to the global ban list (which takes effect on all channels); creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, default-ban-time (usually 120) is used. Setting the lifetime to 0 makes it a permanent ban.

Options:

sticky

forces the ban to be always active on a channel, even with dynamicbans on

Returns: nothing

Module: channels

newchanexempt <channel> <exempt> <creator> <comment> [lifetime] [options]¶

Description: adds a exempt to the exempt list of a channel; creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed. For timed bans, once the time period has expired, the exempt will not be removed until the corresponding ban has either expired or been removed.

Options:

sticky

forces the exempt to be always active on a channel, even with dynamicexempts on

Returns: nothing

Module: channels

newexempt <exempt> <creator> <comment> [lifetime] [options]¶

Description: adds a exempt to the global exempt list (which takes effect on all channels); creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed.

Options:

sticky

forces the exempt to be always active on a channel, even with dynamicexempts on

Returns: nothing

Module: channels

newchaninvite <channel> <invite> <creator> <comment> [lifetime] [options]¶

Description: adds a invite to the invite list of a channel; creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i.

Options:

sticky

forces the invite to be always active on a channel, even with dynamicinvites on

Returns: nothing

Module: channels

newinvite <invite> <creator> <comment> [lifetime] [options]¶

Description: adds a invite to the global invite list (which takes effect on all channels); creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i.

Options:

sticky

forces the invite to be always active on a channel, even with dynamicinvites on

Returns: nothing

Module: channels

stickban <banmask> [channel]¶

Description: makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

unstickban <banmask> [channel]¶

Description: makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

stickexempt <exemptmask> [channel]¶

Description: makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

unstickexempt <exemptmask> [channel]¶

Description: makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

stickinvite <invitemask> [channel]¶

Description: makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

unstickinvite <invitemask> [channel]¶

Description: makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only.

Returns: 1 on success; 0 otherwise

Module: channels

killchanban <channel> <ban>¶

Description: removes a ban from the ban list for a channel

Returns: 1 on success; 0 otherwise

Module: channels

killban <ban>¶

Description: removes a ban from the global ban list

Returns: 1 on success; 0 otherwise

Module: channels

killchanexempt <channel> <exempt>¶

Description: removes an exempt from the exempt list for a channel

Returns: 1 on success; 0 otherwise

Module: channels

killexempt <exempt>¶

Description: removes an exempt from the global exempt list

Returns: 1 on success; 0 otherwise

Module: channels

killchaninvite <channel> <invite>¶

Description: removes an invite from the invite list for a channel

Returns: 1 on success; 0 otherwise

Module: channels

killinvite <invite>¶

Description: removes an invite from the global invite list

Returns: 1 on success; 0 otherwise

Module: channels

ischanjuped <channel>¶

Returns: 1 if the channel is juped, and the bot is unable to join; 0 otherwise

Module: channels

isban <ban> [channel [-channel]]¶

Returns: 1 if the specified ban is in the global ban list; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well. If the -channel flag is used at the end of the command, *only* the channel bans are checked.

Module: channels

ispermban <ban> [channel [-channel]]¶

Returns: 1 if the specified ban is in the global ban list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well. If the -channel flag is used at the end of the command, *only* the channel bans are checked.

Module: channels

isexempt <exempt> [channel [-channel]]¶

Returns: 1 if the specified exempt is in the global exempt list; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well. If the -channel flag is used at the end of the command, *only* the channel exempts are checked.

Module: channels

ispermexempt <exempt> [channel [-channel]]¶

Returns: 1 if the specified exempt is in the global exempt list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well. If the -channel flag is used at the end of the command, *only* the channel exempts are checked.

Module: channels

isinvite <invite> [channel [-channel]]¶

Returns: 1 if the specified invite is in the global invite list; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well. If the -channel flag is used at the end of the command, *only* the channel invites are checked.

Module: channels

isperminvite <invite> [channel [-channel]]¶

Returns: 1 if the specified invite is in the global invite list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well. If the -channel flag is used at the end of the command, *only* the channel invites are checked.

Module: channels

isbansticky <ban> [channel [-channel]]¶

Returns: 1 if the specified ban is marked as sticky in the global ban list; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well. If the -channel flag is used at the end of the command, *only* the channel bans are checked.

Module: channels

isexemptsticky <exempt> [channel [-channel]]¶

Returns: 1 if the specified exempt is marked as sticky in the global exempt list; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well. If the -channel flag is used at the end of the command, *only* the channel exempts are checked.

Module: channels

isinvitesticky <invite> [channel [-channel]]¶

Returns: 1 if the specified invite is marked as sticky in the global invite list; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well. If the -channel flag is used at the end of the command, *only* the channel invites are checked.

Module: channels

matchban <nick!user@host> [channel]¶

Returns: 1 if the specified nick!user@host matches a ban in the global ban list; 0 otherwise. If a channel is specified, that channel’s ban list is checked as well.

Module: channels

matchexempt <nick!user@host> [channel]¶

Returns: 1 if the specified nick!user@host matches an exempt in the global exempt list; 0 otherwise. If a channel is specified, that channel’s exempt list is checked as well.

Module: channels

matchinvite <nick!user@host> [channel]¶

Returns: 1 if the specified nick!user@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that channel’s invite list is checked as well.

Module: channels

banlist [channel]¶

Returns: a list of global bans, or, if a channel is specified, a list of channel-specific bans. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.

Module: channels

exemptlist [channel]¶

Returns: a list of global exempts, or, if a channel is specified, a list of channel-specific exempts. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.

Module: channels

invitelist [channel]¶

Returns: a list of global invites, or, if a channel is specified, a list of channel-specific invites. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format.

Module: channels

newignore <hostmask> <creator> <comment> [lifetime]¶

Description: adds an entry to the ignore list; creator is given credit for the ignore. lifetime is how many minutes until the ignore expires and is removed. If lifetime is not specified, ignore-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ignore.

Returns: nothing

Module: core

killignore <hostmask>¶

Description: removes an entry from the ignore list

Returns: 1 if successful; 0 otherwise

Module: core

ignorelist¶

Returns: a list of ignores. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, and creator. The timestamps are in unixtime format.

Module: core

isignore <hostmask>¶

Returns: 1 if the ignore is in the list; 0 otherwise

Module: core

save¶

Description: writes the user and channel files to disk

Returns: nothing

Module: core

reload¶

Description: loads the userfile from disk, replacing whatever is in memory

Returns: nothing

Module: core

backup¶

Description: makes a simple backup of the userfile that’s on disk. If the channels module is loaded, this also makes a simple backup of the channel file.

Returns: nothing

Module: core

getting-users¶

Returns: 1 if the bot is currently downloading a userfile from a sharebot (and hence, user records are about to drastically change); 0 if not

Module: core

Channel Commands¶

channel add <name> [option-list]¶

Description: adds a channel record for the bot to monitor. The full list of possible options are given in doc/settings/mod.channels. Note that the channel options must be in a list (enclosed in {}).

Returns: nothing

Module: channels

channel set <name> <options…>¶

Description: sets options for the channel specified. options is a flat list of either +/-settings or key/value pairs. The full list of possible options are given in doc/settings/mod.channels. Note: Tcl code settings such as the need-* settings must be valid Tcl code as a single word, for example channel set #lamest need-op { putmsg ChanServ "op #lamest" }

Returns: nothing

Module: channels

channel info <name>¶

Returns: a list of info about the specified channel’s settings.

Module: channels

channel get <name> [setting]¶

Returns: The value of the setting you specify. For flags, a value of 0 means it is disabled (-), and non-zero means enabled (+). If no setting is specified, a flat list of all available settings and their values will be returned.

Module: channels

channel remove <name>¶

Description: removes a channel record from the bot and makes the bot no longer monitor the channel

Returns: nothing

Module: channels

savechannels¶

Description: saves the channel settings to the channel-file if one is defined.

Returns: nothing

Module: channels

loadchannels¶

Description: reloads the channel settings from the channel-file if one is defined.

Returns: nothing

Module: channels

channels¶

Returns: a list of the channels the bot has a channel record for

Module: channels

channame2dname <channel-name>¶

chandname2name <channel-dname>¶

Description: these two functions are important to correctly support !channels. The bot differentiates between channel description names (chan dnames) and real channel names (chan names). The chan dnames are what you would normally call the channel, such as “!channelâ€. The chan names are what the IRC server uses to identify the channel. They consist of the chan dname prefixed with an ID; such as “!ABCDEchannelâ€.

For bot functions like isop, isvoice, etc. you need to know the chan dnames. If you communicate with the server, you usually get the chan name, though. That’s what you need the channame2dname function for.

If you only have the chan dname and want to directly send raw server commands, use the chandname2name command.

NOTE: For non-!channels, chan dname and chan name are the same.

Module: irc

isbotnick <nick>¶

Returns: 1 if the nick matches the botnick; 0 otherwise

Module: server

botisop [channel]¶

Returns: 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

botishalfop [channel]¶

Returns: 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

botisvoice [channel]¶

Returns: 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

botonchan [channel]¶

Returns: 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise

Module: irc

isop <nickname> [channel]¶

Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and has ops; 0 otherwise

Module: irc

ishalfop <nickname> [channel]¶

Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and has halfops; 0 otherwise

Module: irc

wasop <nickname> <channel>¶

Returns: 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise

Module: irc

washalfop <nickname> <channel>¶

Returns: 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise

Module: irc

isvoice <nickname> [channel]¶

Returns: 1 if someone by that nickname is on the channel (or any channel if no channel is specified) and has voice (+v); 0 otherwise

Module: irc

isidentified <nickname> [channel]¶

Description: determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses)

Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); 0 otherwise.

Module: irc

isaway <nickname> [channel]¶

Description: determine if a user is marked as ‘away’ on a server. IMPORTANT: this command is only “mostly†reliable on its own when the IRCv3 away-notify capability is available and negotiated with the IRC server (if you didn’t add this to your config file, it likely isn’t enabled- you can confirm using the cap Tcl command). Additionally, there is no way for Eggdrop (or any client) to capture a user’s away status when the user first joins a channel (they are assumed present by Eggdrop on join). To use this command without the away-notify capability negotiated, or to get a user’s away status on join (via a JOIN bind), use refreshchan <channel> w on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel.

Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as ‘away’ (again, see disclaimer above) by an IRC server; 0 otherwise.

Module: irc

isircbot <nickname> [channel]¶

Description: determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server’s 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use refreshchan <channel> w on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding “BOT=B†(or whatever flag is used) to the isupport-default setting in your eggdrop.conf file.

Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; 0 otherwise.

onchan <nickname> [channel]¶

Returns: 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise

Module: irc

monitor <add/delete/list/online/offline/status/clear> [nickname]¶

Description: interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid sub-commands are add, delete, list, online, offline, status, and clear. The ‘add’ command sends ‘nickname’ to the server to track. The ‘delete’ command removes ‘nickname’ from being tracked by the server (or returns an error if the nickname is not present). The ‘list’ command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The ‘online’ command returns a string of tracked nicknames that are currently online. The ‘offline’ command returns a list of tracked nicknames that are currently offline.

Returns: The ‘add’ sub-command returns a ‘1’ if the nick was successfully added, a ‘0’ if the nick is already in the monitor list, and a ‘2’ if the nick could not be added. The ‘delete’ sub-command returns a ‘1’ if the nick is removed, or an error if the nick is not found. The ‘status’ sub-command returns a ‘1’ if ‘nickname’ is online or a 0 if ‘nickname’ is offline. The ‘clear’ command removes all nicknames from the list the server is monitoring.

Module: irc

accounttracking¶

Description: checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when selecting an “Other†server).

Returns: a ‘1’ if all three functionalities are present, a ‘0’ if one or more are missing.

Module: irc

getaccount <nickname> [channel]¶

Returns: the services account name associated with nickname, “*†if the user is not logged into services, or “†if eggdrop does not know the account status of the user.

NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information.

nick2hand <nickname> [channel]¶

Returns: the handle of a nickname on a channel. If a channel is not specified, the bot will check all of its channels. If the nick is not found, “†is returned. If the nick is found but does not have a handle, “*†is returned. If no channel is specified, all channels are checked.

Module: irc

account2nicks <account> [channel]¶

Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nickname matches the given account; Ҡis returned if no match is found. This command will only work if a server supports (and Eggdrop has enabled) the account-notify and extended-join capabilities, and the server understands WHOX requests (also known as raw 354 responses). If no channel is specified, all channels are checked.

Module: irc

hand2nick <handle> [channel]¶

Returns: nickname of the first person on the specified channel (if one is specified) whose nick!user@host matches the given handle; Ҡis returned if no match is found. If no channel is specified, all channels are checked.

Module: irc

hand2nicks <handle> [channel]¶

Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nick!user@host matches the given handle; Ҡis returned if no match is found. If no channel is specified, all channels are checked.

Module: irc

handonchan <handle> [channel]¶

Returns: 1 if the the nick!user@host for someone on the channel (or any channel if no channel name is specified) matches for the handle given; 0 otherwise

Module: irc

ischanban <ban> <channel>¶

Returns: 1 if the specified ban is on the given channel’s ban list (not the bot’s banlist for the channel)

Module: irc

ischanexempt <exempt> <channel>¶

Returns: 1 if the specified exempt is on the given channel’s exempt list (not the bot’s exemptlist for the channel)

Module: irc

ischaninvite <invite> <channel>¶

Returns: 1 if the specified invite is on the given channel’s invite list (not the bot’s invitelist for the channel)

Module: irc

chanbans <channel>¶

Returns: a list of the current bans on the channel. Each element is a sublist of the form {<ban> <bywho> <age>}. age is seconds from the bot’s point of view

Module: irc

chanexempts <channel>¶

Returns: a list of the current exempts on the channel. Each element is a sublist of the form {<exempts> <bywho> <age>}. age is seconds from the bot’s point of view

Module: irc

chaninvites <channel>¶

Returns: a list of the current invites on the channel. Each element is a sublist of the form {<invites> <bywho> <age>}. age is seconds from the bot’s point of view

Module: irc

resetbans <channel>¶

Description: removes all bans on the channel that aren’t in the bot’s ban list and refreshes any bans that should be on the channel but aren’t

Returns: nothing

Module: irc

resetexempts <channel>¶

Description: removes all exempt on the channel that aren’t in the bot’s exempt list and refreshes any exempts that should be on the channel but aren’t

Returns: nothing

Module: irc

resetinvites <channel>¶

Description: removes all invites on the channel that aren’t in the bot’s invite list and refreshes any invites that should be on the channel but aren’t

Returns: nothing

Module: irc

resetchanidle [nick] <channel>¶

Description: resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified.

Returns: nothing

Module: irc

resetchanjoin [nick] <channel>¶

Description: resets the channel join time for the given nick or for all nicks on the channel if no nick is specified.

Returns: nothing

Module: irc

resetchan <channel> [flags]¶

Description: clears the channel info Eggdrop is currently storing for a channel, then rereads the channel info from the server. Useful if Eggdrop gets into a bad state on a server with respect to a channel userlist, for example. If flags are specified, only the required information will be reset, according to the given flags. Available flags:

b

channel bans

e

channel exempts

I

channel invites

m

channel modes

w

memberlist (who & away info)

Returns: nothing

Module: irc

refreshchan <channel> [flags]¶

Description: An alternative to resetchan, refresh rereads the channel info from the server without first clearing out the previously stored information. Useful for updating a user’s away status without resetting their idle time, for example. If flags are specified, only the required information will be refreshed, according to the given flags. Available flags:

b

channel bans

e

channel exempts

I

channel invites

m

channel modes

t

channel topic

w

memberlist (who & away info)

Returns: nothing

Module: irc

getchanhost <nickname> [channel]¶

Returns: user@host of the specified nickname (the nickname is not included in the returned host). If a channel is not specified, bot will check all of its channels. If the nickname is not on the channel(s), Ҡis returned.

Module: irc

getchanjoin <nickname> <channel>¶

Returns: timestamp (unixtime format) of when the specified nickname joined the channel if available, 0 otherwise. Note that after a channel reset this information will be lost, even if previously available.

Module: irc

onchansplit <nick> [channel]¶

Returns: 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise

Module: irc

chanlist <channel> [flags][<&|>chanflags]¶

Description: lists all users on a channel Eggdrop has joined. flags are any global flags; the ‘&’ or ‘|’ denotes to look for channel specific flags, where ‘&’ will return users having ALL chanflags and ‘|’ returns users having ANY of the chanflags (See Flag Masks for additional information).

Returns: Searching for flags optionally preceded with a ‘+’ will return a list of nicknames that have all the flags listed. Searching for flags preceded with a ‘-’ will return a list of nicknames that do not have have any of the flags (differently said, ‘-’ will hide users that have all flags listed). If no flags are given, all of the nicknames on the channel are returned.

Please note that if you’re executing chanlist after a part or sign bind, the gone user will still be listed, so you can check for wasop, isop, etc.

Module: irc

getchanidle <nickname> <channel>¶

Returns: number of minutes that person has been idle; -1 if the specified user isn’t on the channel

Module: irc

getchanmode <channel>¶

Returns: string of the type “+ntik key†for the channel specified

Module: irc

jump [server [[+]port [password]]]¶

Description: jumps to the server specified, or (if none is specified) the next server in the bot’s serverlist. If you prefix the port with a plus sign (e.g. +6697), SSL connection will be attempted.

Returns: nothing

Module: server

pushmode <channel> <mode> [arg]¶

Description: sends out a channel mode change (ex: pushmode #lame +o goober) through the bot’s queuing system. All the mode changes will be sent out at once (combined into one line as much as possible) after the script finishes, or when ‘flushmode’ is called.

Returns: nothing

Module: irc

flushmode <channel>¶

Description: forces all previously pushed channel mode changes to be sent to the server, instead of when the script is finished (just for the channel specified)

Returns: nothing

Module: irc

topic <channel>¶

Returns: string containing the current topic of the specified channel

Module: irc

validchan <channel>¶

Description: checks if the bot has a channel record for the specified channel. Note that this does not necessarily mean that the bot is ON the channel.

Returns: 1 if the channel exists, 0 if not

Module: channels

isdynamic <channel>¶

Returns: 1 if the channel is a dynamic channel; 0 otherwise

Module: channels

setudef <flag/int/str> <name>¶

Description: initializes a user defined channel flag, string or integer setting. You can use it like any other flag/setting. IMPORTANT: Don’t forget to reinitialize your flags/settings after a restart, or it’ll be lost.

Returns: nothing

Module: channels

renudef <flag/int/str> <oldname> <newname>¶

Description: renames a user defined channel flag, string, or integer setting.

Returns: nothing

Module: channels

deludef <flag/int/str> <name>¶

Description: deletes a user defined channel flag, string, or integer setting.

Returns: nothing

Module: channels

getudefs [flag/int/str]¶

Returns: a list of user defined channel settings of the given type, or all of them if no type is given.

Module: channels

chansettype <setting>¶

Returns: The type of the setting you specify. The possible types are flag, int, str, pair. A flag type references a channel flag setting that can be set to either + or -. An int type is a channel setting that is set to a number, such as ban-time. A str type is a channel setting that stores a string, such as need-op. A pair type is a setting that holds a value couple, such as the flood settings.

Module: channels

isupport get [key]¶

Description: - isupport get: Returns a flat key/value list (dict) of settings. - isupport get <key>: Returns the setting’s value as a string. Throws an error if the key is not set.

Returns: string or dict, see description above

Module: server

isupport isset <key>¶

Description: Returns 0/1 depending on whether the key has a value.

Returns: 0 or 1

Module: server

DCC Commands¶

putdcc <idx> <text> [-raw]¶

Description: sends text to the idx specified. If -raw is specified, the text will be sent as is, without forced new lines or limits to line length.

Returns: nothing

Module: core

putidx <idx> <text> -[raw]¶

Description. Alias for the putdcc command.

Returns: nothing

Module: core

dccbroadcast <message>¶

Description: sends a message to everyone on the party line across the botnet, in the form of “*** <message>†for local users, “*** (Bot) <message>†for users on other bots with version below 1.8.4, and “(Bot) <message>†for users on other bots with version 1.8.4+ and console log mode ‘l’ enabled

Returns: nothing

Module: core

dccputchan <channel> <message>¶

Description: sends your message to everyone on a certain channel on the botnet, in a form exactly like dccbroadcast does. Valid channels are 0 through 99999.

Returns: nothing

Module: core

boot <user@bot> [reason]¶

Description: boots a user from the partyline

Returns: nothing

Module: core

dccsimul <idx> <text>¶

Description: simulates text typed in by the dcc user specified. Note that in v0.9, this only simulated commands; now a command must be preceded by a ‘.’ to be simulated.

Returns: nothing

Module: core

hand2idx <handle>¶

Returns: the idx (a number greater than or equal to zero) for the user given if the user is on the party line in chat mode (even if she is currently on a channel or in chat off), the file area, or in the control of a script. -1 is returned if no idx is found. If the user is on multiple times, the oldest idx is returned.

Module: core

idx2hand <idx>¶

Returns: handle of the user with the given idx

Module: core

valididx <idx>¶

Returns: 1 if the idx currently exists; 0 otherwise

Module: core

getchan <idx>¶

Returns: the current party line channel for a user on the party line; “0†indicates he’s on the group party line, “-1†means he has chat off, and a value from 1 to 99999 is a private channel

Module: core

setchan <idx> <channel>¶

Description: sets a party line user’s channel. The party line user is not notified that she is now on a new channel. A channel name can be used (provided it exists).

Returns: nothing

Module: core

console <idx> [channel] [console-modes]¶

Description: changes a dcc user’s console mode, either to an absolute mode (like “mpjâ€) or just adding/removing flags (like “+pj†or “-moc†or “+mp-câ€). The user’s console channel view can be changed also (as long as the new channel is a valid channel).

Returns: a list containing the user’s (new) channel view and (new) console modes, or nothing if that user isn’t currently on the partyline

Module: core

resetconsole <idx>¶

Description: changes a dcc user’s console mode to the default setting in the configfile.

Returns: a list containing the user’s channel view and (new) console modes, or nothing if that user isn’t currently on the partyline

Module: core

echo <idx> [status]¶

Description: turns a user’s echo on or off; the status has to be a 1 or 0

Returns: new value of echo for that user (or the current value, if status was omitted)

Module: core

strip <idx> [+/-strip-flags]¶

Description: modifies the strip-flags for a user. The supported strip-flags are:

c

remove all color codes

b

remove all boldface codes

r

remove all reverse video codes

u

remove all underline codes

a

remove all ANSI codes

g

remove all ctrl-g (bell) codes

o

remove all ordinary codes (ctrl+o, terminates bold/color/..)

i

remove all italics codes

*

remove all of the above

Returns: new strip-flags for the specified user (or the current flags, if strip-flags was omitted)

Module: core

putbot <bot-nick> <message>¶

Description: sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored.

Returns: nothing

Module: core

putallbots <message>¶

Description: sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored.

Returns: nothing

Module: core

killdcc <idx>¶

Description: kills a partyline or file area connection

Returns: nothing

Module: core

bots¶

Returns: list of the bots currently connected to the botnet

Module: core

botlist¶

Returns: a list of bots currently on the botnet. Each item in the list is a sublist with four elements: bot, uplink, version, and sharing status:

bot

the bot’s botnetnick

uplink

the bot the bot is connected to

version

it’s current numeric version

sharing

a “+†if the bot is a sharebot; “-†otherwise

Module: core

islinked <bot>¶

Returns: 1 if the bot is currently linked; 0 otherwise

Module: core

dccused¶

Returns: number of dcc connections currently in use

Module: core

dcclist [type]¶

Returns: a list of active connections, each item in the list is a sublist containing seven elements: {<idx> <handle> <hostname> <[+]port> <type> {<other>} <timestamp>}.

The types are: chat, bot, files, file_receiving, file_sending, file_send_pending, script, socket (these are connections that have not yet been put under ‘control’), telnet, and server. The timestamp is in unixtime format.

Module: core

socklist [type]¶

Returns: a list of active connections, each item in the list is a sublist containing eight elements (in dict-readable format). The order of items returned should not be considered static or permanent, so it is recommended to access the items as key/value pairs with the dict command, as opposed to something like lindex, to extract values. The possible keys returned are:

idx

integer value assigned to Eggdrop connections

handle

possible values are (telnet), (bots), (users), (script) for a listening socket, or the handle of the connected user for an established connection

host

the hostname of the connection, if it is known; otherwise a *

ip

the ip of the connection

port

the port number associated with the connection (local port for listening connections, remote port for server connections.

secure

1 if SSL/TLS is used for the connect; 0 otherwise

type

the type of connection (TELNET, CHAT, SERVER, etc)

info

extra information associated with the connection

time

timestamp of when the socket was established

Module: core

whom <chan>¶

Returns: list of people on the botnet who are on that channel. 0 is the default party line. Each item in the list is a sublist with six elements: nickname, bot, hostname, access flag (‘-’, ‘@’, ‘+’, or ‘*’), minutes idle, and away message (blank if the user is not away). If you specify * for channel, every user on the botnet is returned with an extra argument indicating the channel the user is on.

Module: core

getdccidle <idx>¶

Returns: number of seconds the dcc chat/file system/script user has been idle

Module: core

getdccaway <idx>¶

Returns: away message for a dcc chat user (or Ҡif the user is not set away)

Module: core

setdccaway <idx> <message>¶

Description: sets a party line user’s away message and marks them away. If set to “â€, the user is marked as no longer away.

Returns: nothing

Module: core

connect <host> <[+]port>¶

Description: makes an outgoing connection attempt and creates a dcc entry for it. A ‘control’ command should be used immediately after a successful ‘connect’ so no input is lost. If the port is prefixed with a plus sign, SSL encrypted connection will be attempted.

Returns: idx of the new connection

Module: core

listen [ip] <port> <type> [options [flag]]¶

Description: opens a listening port to accept incoming telnets; type must be one of “botsâ€, “allâ€, “usersâ€, “scriptâ€, or “offâ€. Prefixing the port with a plus sign will make eggdrop accept SSL connections on it. An IP may optionally be listed before the mandatory port argument. If no IP is specified, all available interfaces are used.

listen [ip] <port> bots [mask]

Description: accepts connections from bots only; the optional mask is used to identify permitted bot names. If the mask begins with ‘@’, it is interpreted to be a mask of permitted hosts to accept connections from.

Returns: port number or error message

listen [ip] <port> users [mask]

Description: accepts connections from users only (no bots); the optional mask is used to identify permitted nicknames. If the mask begins with ‘@’, it is interpreted to be a mask of permitted hosts to accept connections from.

Returns: port number or error message

listen [ip] <port> all [mask]

Description: accepts connections from anyone; the optional mask is used to identify permitted nicknames/botnames. If the mask begins with ‘@’, it is interpreted to be a mask of permitted hosts to accept connections from.

Returns: port number or error message

listen [ip] <port> script <proc> [flag]

Description: accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection. The optional flag parameter currently only accepts ‘pub’ as a value. By specifying ‘pub’ as a flag, Eggdrop will skip the ident check for the user regardless of settings in the config file. This will allow any user to attempt a connection, and result in Eggdrop using “-telnet!telnet@host†instead of “-telnet!<ident>@host†as a hostmask to match against the user.

Returns: port number or error message

listen [ip] <port> off

Description: stop listening on a port

Returns: nothing

Module: core

dccdumpfile <idx> <filename>¶

Description: dumps out a file from the text directory to a dcc chat user. The flag matching that’s used everywhere else works here, too.

Returns: nothing

Module: core

Notes Module¶

notes <user> [numberlist]¶

Returns: -1 if no such user, -2 if notefile failure. If a numberlist is not specified, the number of notes stored for the user is returned. Otherwise, a list of sublists containing information about notes stored for the user is returned. Each sublist is in the format of:

{<from> <timestamp> <note text>}

Module: notes

erasenotes <user> <numberlist>¶

Description: erases some or all stored notes for a user. Use ‘-’ to erase all notes.

Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, or number of erased notes.

Module: notes

listnotes <user> <numberlist>¶

Description: lists existing notes according to the numberlist (ex: “2-4;8;16-“)

Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, list of existing notes.

Module: notes

storenote <from> <to> <msg> <idx>¶

Description: stores a note for later reading, notifies idx of any results (use idx -1 for no notify).

Returns: 0 on success; non-0 on failure

Module: notes

Assoc Module¶

assoc <chan> [name]¶

Description: sets the name associated with a botnet channel, if you specify one

Returns: current name for that channel, if any

Module: assoc

killassoc <chan>¶

Description: removes the name associated with a botnet channel, if any exists. Use ‘killassoc &’ to kill all assocs.

Returns: nothing

Module: assoc

Compress Module¶

compressfile [-level <level>] <src-file> [target-file]¶

and¶

uncompressfile <src-file> [target-file]¶

Description: compresses or un-compresses files. The level option specifies the compression mode to use when compressing. Available modes are from 0 (minimum CPU usage, minimum compression) all the way up to 9 (maximum CPU usage, maximum compression). If you don’t specify the target-file, the src-file will be overwritten.

Returns: nothing

Module: compress

iscompressed <filename>¶

Description: determines whether <filename> is gzip compressed.

Returns: 1 if it is, 0 if it isn’t, and 2 if some kind of error prevented the checks from succeeding.

Module: compress

Filesys Module¶

setpwd <idx> <dir>¶

Description: changes the directory of a file system user, in exactly the same way as a ‘cd’ command would. The directory can be specified relative or absolute.

Returns: nothing

Module: filesys

getpwd <idx>¶

Returns: the current directory of a file system user

Module: filesys

getfiles <dir>¶

Returns: a list of files in the directory given; the directory is relative to dcc-path

Module: filesys

getdirs <dir>¶

Returns: a list of subdirectories in the directory given; the directory is relative to dcc-path

Module: filesys

dccsend <filename> <ircnick>¶

Description: attempts to start a dcc file transfer to the given nick; the filename must be specified either by full pathname or in relation to the bot’s startup directory

Returns:

0

success

1

the dcc table is full (too many connections)

2

can’t open a socket for the transfer

3

the file doesn’t exist

4

the file was queued for later transfer, which means that person has too many file transfers going right now

5

the file could not be opened or temporary file could not be created

Module: transfer

filesend <idx> <filename> [ircnick]¶

Description: like dccsend, except it operates for a current filesystem user, and the filename is assumed to be a relative path from that user’s current directory

Returns: 0 on failure; 1 on success (either an immediate send or a queued send)

Module: filesys

fileresend <idx> <filename> [ircnick]¶

Description: functions like filesend, only that it sends a DCC RESEND instead of a DCC SEND, which allows people to resume aborted file transfers if their client supports that protocol. ircII/BitchX/etc. support it; mIRC does not.

Returns: 0 on failure; 1 on success (either an immediate send or a queued send)

Module: filesys

setdesc <dir> <file> <desc>¶

Description: sets the description for a file in a file system directory; the directory is relative to dcc-path

Returns: nothing

Module: filesys

getdesc <dir> <file>¶

Returns: the description for a file in the file system, if one exists

Module: filesys

setowner <dir> <file> <handle>¶

Description: changes the owner for a file in the file system; the directory is relative to dcc-path

Returns: nothing

Module: filesys

getowner <dir> <file>¶

Returns: the owner of a file in the file system

Module: filesys

getfileq <handle>¶

Returns: list of files queued by someone; each item in the list will be a sublist with two elements: nickname the file is being sent to and the filename

Module: transfer

getfilesendtime <idx>¶

Returns: the unixtime value from when a file transfer started, or a negative number:

-1

no matching transfer with the specified idx was found

-2

the idx matches an entry which is not a file transfer

Module: transfer

mkdir <directory> [<required-flags> [channel]]¶

Description: creates a directory in the file system. Only users with the required flags may access it.

Returns:

0

success

1

can’t create directory

2

directory exists but is not a directory

-3

could not open filedb

Module: filesys

rmdir <directory>¶

Description: removes a directory from the file system.

Returns: 0 on success; 1 on failure

Module: filesys

mv <file> <destination>¶

Description: moves a file from its source to the given destination. The file can also be a mask, such as /incoming/*, provided the destination is a directory.

Returns: If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned:

-1

invalid source file

-2

invalid destination

-3

destination file exists

-4

no matches found

Module: filesys

cp <file> <destination>¶

Description: copies a file from its source to the given destination. The file can also be a mask, such as /incoming/*, provided the destination is a directory.

Returns: If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned:

-1

invalid source file

-2

invalid destination

-3

destination file exists

-4

no matches found

Module: filesys

getflags <dir>¶

Returns: the flags required to access a directory

Module: filesys

setflags <dir> [<flags> [channel]]¶

Description: sets the flags required to access a directory

Returns: 0 on success; -1 or -3 on failure

Module: filesys

PBKDF2 Module¶

encpass2 <pass>¶

Returns: a hash in the format of “$pbkdf2-<digest>$rounds=<rounds>$<salt>$<hash>†where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash.

Module: pbkdf2

pbkdf2 [-bin] <pass> <salt> <rounds> <digest>¶

Returns: a derived key from the provided “pass†string using “salt†and “rounds†count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data.

Module: pbkdf2

Miscellaneous Commands¶

bind <type> <flags> <keyword/mask> [proc-name]¶

Description: You can use the ‘bind’ command to attach Tcl procedures to certain events. flags are the flags the user must have to trigger the event (if applicable). proc-name is the name of the Tcl procedure to call for this command (see below for the format of the procedure call). If the proc-name is omitted, no binding is added. Instead, the current binding is returned (if it’s stackable, a list of the current bindings is returned).

Returns: name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command

Module: core

unbind <type> <flags> <keyword/mask> <proc-name>¶

Description: removes a previously created bind

Returns: name of the command that was removed

Module: core

binds [type/mask]¶

Description: By default, lists Tcl binds registered with the Eggdrop. You can specify ‘all’ to view all binds, ‘tcl’ to view Tcl binds, and ‘python’ to view Python binds. Alternately, you can specify a bind type (pub, msg, etc) to view all binds that match that type of bind, or a mask that is matched against the command associated with the bind.

Returns: a list of Tcl binds, each item in the list is a sublist of five elements:

{<type> <flags> <name> <hits> <proc>}

Module: core

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.

Logfile flags:

b

information about bot linking and userfile sharing

c

commands

d

misc debug information

g

raw outgoing share traffic

h

raw incoming share traffic

j

joins, parts, quits, topic changes, and netsplits on the channel

k

kicks, bans, and mode changes on the channel

l

linked bot messages

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 incoming botnet traffic

u

raw outgoing 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

Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log}

Module: core

maskhost <nick!user@host> [masktype]¶

Returns: masked hostmask for the string given according to the masktype (the default is 3).

Available types are:

0

*!user@host

1

*!*user@host

2

*!*@host

3

*!*user@*.host

4

*!*@*.host

5

nick!user@host

6

nick!*user@host

7

nick!*@host

8

nick!*user@*.host

9

nick!*@*.host

You can also specify types from 10 to 19 which correspond to types 0 to 9, but instead of using a * wildcard to replace portions of the host, only numbers in hostnames are replaced with the ‘?’ wildcard. Same is valid for types 20-29, but instead of ‘?’, the ‘*’ wildcard will be used. Types 30-39 set the host to ‘*’.

Module: core

timer <minutes> <tcl-command> [count [timerName]]¶

Description: executes the given Tcl command after a certain number of minutes have passed, at the top of the minute (ie, if a timer is started at 10:03:34 with 1 minute specified, it will execute at 10:04:00. If a timer is started at 10:06:34 with 2 minutes specified, it will execute at 10:08:00). If count is specified, the command will be executed count times with the given interval in between. If you specify a count of 0, the timer will repeat until it’s removed with killtimer or until the bot is restarted. If timerName is specified, it will become the unique identifier for the timer. If no timerName is specified, Eggdrop will assign a timerName in the format of “timer<integer>â€.

Returns: a timerName

Module: core

utimer <seconds> <tcl-command> [count [timerName]]¶

Description: executes the given Tcl command after a certain number of seconds have passed. If count is specified, the command will be executed count times with the given interval in between. If you specify a count of 0, the utimer will repeat until it’s removed with killutimer or until the bot is restarted. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of “timer<integer>â€.

Returns: a timerName

Module: core

timers¶

Description: lists all active minutely timers.

Returns: a list of active minutely timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats.

Module: core

utimers¶

Description: lists all active secondly timers.

Returns: a list of active secondly timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats.

Module: core

killtimer <timerName>¶

Description: removes the timerName minutely timer from the timer list.

Returns: nothing

Module: core

killutimer <timerName>¶

Description: removes the timerName secondly timer from the timer list.

Returns: nothing

Module: core

unixtime¶

Returns: a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT).

Module: core

duration <seconds>¶

Returns: the number of seconds converted into years, weeks, days, hours, minutes, and seconds. 804600 seconds is turned into 1 week 2 days 7 hours 30 minutes.

Module: core

strftime <formatstring> [time]¶

Returns: a formatted string of time using standard strftime format. If time is specified, the value of the specified time is used. Otherwise, the current time is used. Note: The implementation of strftime varies from platform to platform, so the user should only use POSIX-compliant format specifiers to ensure fully portable code.

Module: core

ctime <unixtime>¶

Returns: a formatted date/time string based on the current locale settings from the unixtime string given; for example “Fri Aug 3 11:34:55 1973â€

Module: core

myip¶

Returns: a long number representing the bot’s IP address, as it might appear in (for example) a DCC request

Module: core

rand <limit>¶

Returns: a random integer between 0 and limit-1. Limit must be greater than 0 and equal to or less than RAND_MAX, which is generally 2147483647. The underlying pseudo-random number generator is not cryptographically secure.

Module: core

control <idx> <command>¶

Description: removes an idx from the party line and sends all future input to the Tcl command given. The command will be called with two parameters: the idx and the input text. The command should return 0 to indicate success and 1 to indicate that it relinquishes control of the user back to the bot. If the input text is blank (“â€), it indicates that the connection has been dropped. Also, if the input text is blank, never call killdcc on it, as it will fail with “invalid idxâ€.

Returns: nothing

Module: core

sendnote <from> <to[@bot]> <message>¶

Description: simulates what happens when one user sends a note to another

Returns:

0

the send failed

1

the note was delivered locally or sent to another bot

2

the note was stored locally

3

the user’s notebox is too full to store a note

4

a Tcl binding caught the note

5

the note was stored because the user is away

Module: core

encrypt <key> <string>¶

Returns: encrypted string (using the currently loaded encryption module), encoded into ASCII using base-64. As of v1.8.4, the default blowfish encryption module can use either the older ECB mode (currently used by default for compatibility reasons), or the more recent and more-secure CBC mode. You can explicitly request which encryption mode to use by prefixing the encryption key with either “ecb:†or “cbc:â€, or by using the blowfish-use-mode setting in the config file. Note: the default encryption mode for this function is planned to transition from ECB to CBC in v1.9.0.

Module: encryption

decrypt <key> <encrypted-base64-string>¶

Returns: decrypted string (using the currently loaded encryption module). If the default blowfish encryption module is used, this automatically picks the right decryption mode. You may still prefix the key with “ecb:†or “cbc:†or use the blowfish-use-mode setting in the config file (see the encrypt command for more detailed information).

Module: encryption

encpass <password>¶

Returns: encrypted string (using the currently loaded encryption module)

Module: encryption

die [reason]¶

Description: causes the bot to log a fatal error and exit completely. If no reason is given, “EXIT†is used.

Returns: none

Module: core

unames¶

Returns: the current operating system the bot is using

Module: core

dnslookup <ip-address/hostname> <proc> [[arg1] [arg2] … [argN]]¶

Description: This issues an asynchronous dns lookup request. The command will block if dns module is not loaded; otherwise it will either return immediately or immediately call the specified proc (e.g. if the lookup is already cached).

As soon as the request completes, the specified proc will be called as follows:

<proc> <ipaddress> <hostname> <status> [[arg1] [arg2] … [argN]]

status is 1 if the lookup was successful and 0 if it wasn’t. All additional parameters (called arg1, arg2 and argN above) get appended to the proc’s other parameters.

Returns: nothing

Module: core

md5 <string>¶

Returns: the 128 bit MD5 message-digest of the specified string

Module: core

callevent <event>¶

Description: triggers the evnt bind manually for a certain event. You can call arbitrary events here, even ones that are not pre-defined by Eggdrop. For example: callevent rehash, or callevent myownevent123.

Returns: nothing

Module: core

traffic¶

Returns: a list of sublists containing information about the bot’s traffic usage in bytes. Each sublist contains five elements: type, in-traffic today, in-traffic total, out-traffic today, out-traffic total (in that order).

Module: core

modules¶

Returns: a list of sublists containing information about the bot’s currently loaded modules. Each sublist contains three elements: module, version, and dependencies. Each dependency is also a sublist containing the module name and version.

Module: core

loadmodule <module>¶

Description: attempts to load the specified module.

Returns: “Already loaded.†if the module is already loaded, “†if successful, or the reason the module couldn’t be loaded.

Module: core

unloadmodule <module>¶

Description: attempts to unload the specified module.

Returns: “No such module†if the module is not loaded, “†otherwise.

Module: core

loadhelp <helpfile-name>¶

Description: attempts to load the specified help file from the help/ directory.

Returns: nothing

Module: core

unloadhelp <helpfile-name>¶

Description: attempts to unload the specified help file.

Returns: nothing

Module: core

reloadhelp¶

Description: reloads the bot’s help files.

Returns: nothing

Module: core

restart¶

Description: rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list.

Returns: nothing

Module: core

rehash¶

Description: rehashes the bot

Returns: nothing

Module: core

stripcodes <strip-flags> <string>¶

Description: strips specified control characters from the string given. strip-flags can be any combination of the following:

c

remove all color codes

b

remove all boldface codes

r

remove all reverse video codes

u

remove all underline codes

a

remove all ANSI codes

g

remove all ctrl-g (bell) codes

o

remove all ordinary codes (ctrl+o, terminates bold/color/..)

i

remove all italics codes

*

remove all of the above

Returns: the stripped string.

Module: core

matchaddr <hostmask> <address>¶

Description: checks if the address matches the hostmask given. The address should be in the form nick!user@host.

Returns: 1 if the address matches the hostmask, 0 otherwise.

Module: core

matchcidr <block> <address> <prefix>¶

Description: performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time.

Example: matchcidr 192.168.0.0 192.168.1.17 16

Returns: 1 if the address matches the block prefix, 0 otherwise.

Module: core

matchstr <pattern> <string>¶

Description: checks if pattern matches string. Only two wildcards are supported: ‘*’ and ‘?’. Matching is case-insensitive. This command is intended as a simplified alternative to Tcl’s string match.

Returns: 1 if the pattern matches the string, 0 if it doesn’t.

Module: core

rfcequal <string1> <string2>¶

Description: Checks if two strings are equal. Case is ignored, and this uses RFC1459 matching {}|~ == []^, depending on the rfc_compliant setting.

Returns: 1 if equal, 0 if not.

Module: core

status [type]¶

Description: provides eggdrop status information similar to the .status command in partyline. The available types of information are:

cpu

total cpu time spent by eggdrop

mem

dynamically allocated memory excluding the Tcl interpreter

cache

user entries cache hits (in %)

ipv6

shows whether IPv6 support was compiled in

Returns: the requested information type or all information if type isn’t specified. The format is a flat list of name-value pairs.

Module: core

istls <idx>¶

Description: checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only.

Returns: 1 if the idx is a TLS connection, 0 if it’s plaintext.

Module: core

starttls <idx>¶

Description: establishes a secure (using TLS) connection over idx. The TLS connection should be first negotiated over the plaintext link, or using other means. Both parties must switch to TLS simultaneously. This command is available on TLS-enabled bots only.

Returns: nothing

Module: core

tlsstatus <idx>¶

Description: provides information about an established TLS connection This includes certificate and cipher information as well as protocol version. This command is available on TLS-enabled bots only.

Returns: a flat list of name-value pairs

Module: core

Global Variables¶

NOTE: All config file variables are also global.

botnick¶

Value: the current nickname the bot is using (for example: “Valisâ€, “Valis0â€, etc.)

Module: server

botname¶

Value: the current nick!user@host that the server sees (for example: “Valis!valis@crappy.comâ€)

Module: server

server¶

Value: the current server’s real name (what server calls itself) and port bot is connected to (for example: “irc.math.ufl.edu:6667â€) Note that this does not necessarily match the servers internet address.

Module: server

serveraddress¶

Value: the current server’s internet address (hostname or IP) and port bot is connected to. This will correspond to the entry in server list (for example: “eu.undernet.org:6667â€). Note that this does not necessarily match the name server calls itself.

Module: server

version¶

Value: current bot version “1.1.2+pl1 1010201â€; first item is the text version, to include a patch string if present, and second item is a numerical version

Module: core

numversion*¶

Value: the current numeric bot version (for example: “1010201â€). Numerical version is in the format of “MNNRRPPâ€, where:

M

major release number

NN

minor release number

RR

sub-release number

PP

patch level for that sub-release

Module: core

uptime¶

Value: the unixtime value for when the bot was started

Module: core

server-online¶

Value: the unixtime value when the bot connected to its current server, or ‘0’ if the bot is currently disconnected from a server.

Module: server

lastbind¶

Value: the last command binding which was triggered. This allows you to identify which command triggered a Tcl proc.

Module: core

isjuped¶

Value: 1 if bot’s nick is juped(437); 0 otherwise

Module: server

handlen¶

Value: the value of the HANDLEN define in src/eggdrop.h

Module: core

config¶

Value: the filename of the config file Eggdrop is currently using

Module: core

configureargs¶

Value: a string (not list) of configure arguments in shell expansion (single quotes)

Module: core

language¶

Value: a string containing the language with the highest priority for use by Eggdrop. This commonly reflects what is added with addlang in the config file

Module: core

Binds¶

You can use the ‘bind’ command to attach Tcl procedures to certain events. For example, you can write a Tcl procedure that gets called every time a user says “danger†on the channel. When a bind is triggered, ALL of the Tcl procs that are bound to it will be called. Raw binds are triggered before builtin binds, as a builtin bind has the potential to modify args.

Stackable binds¶

Some bind types are marked as “stackableâ€. That means that you can bind multiple commands to the same trigger. Normally, for example, a bind such as ‘bind msg - stop msg:stop’ (which makes a msg-command “stop†call the Tcl proc “msg:stopâ€) will overwrite any previous binding you had for the msg command “stopâ€. With stackable bindings, like ‘msgm’ for example, you can bind the same command to multiple procs.

Removing a bind¶

To remove a bind, use the ‘unbind’ command. For example, to remove the bind for the “stop†msg command, use ‘unbind msg - stop msg:stop’.

Flag Masks¶

In the Bind Types section (and other commands, such as matchattr), you will see several references to the “flags†argument. The “flags†argument takes a flag mask, which is a value that represents the type of user that is allowed to trigger the procedure associated to that bind. The flags can be any of the standard Eggdrop flags (o, m, v, etc). Additionally, when used by itself, a “-†or “*†can be used to skip processing for a flag type. A flag mask has three sections to it- global, channel, and bot flag sections. Each section is separated by the | or & logical operators ( the | means “OR†and the & means “AND; if nothing proceeds the flag then Eggdrop assumes it to be an OR). Additionally, a ‘+’ and ‘-’ can be used in front of a flag to check if the user does (+) have it, or does not (-) have it.

The easiest way to explain how to build a flag mask is by demonstration. A flag mask of “v†by itself means “has a global v flagâ€. To also check for a channel flag, you would use the flag mask “v|vâ€. This checks if the user has a global “v†flag, OR a channel “v†flag (again, the | means “OR†and ties the two types of flags together). You could change this mask to be “v&vâ€, which would check if the user has a global “v†flag AND a channel “v†flag. Lastly, to check if a user ONLY has a channel flag, you would use “*|v†as a mask, which would not check global flags but does check if the user had a channel “v†flag.

You will commonly see flag masks for global flags written “ovâ€; this is the same as “|ov†or “*|ovâ€.

Some additional examples:

Flag Mask

Action

m, +m, m|*

Checks if the user has the m global flag

+mn

Checks if the user has the m OR n global flag

|+mn

Checks if the user has the m OR n channel flag

|+mn #foo

Checks if the user has the m OR n channel flag for #foo

&+mn

Checks if the user has the m AND n channel flag

&mn #foo

Checks if the user has the m AND n channel flag for #foo

|+o #foo

Checks if the user has the o channel flag for #foo

+o|+n #foo

Checks if the user has the o global flag OR the n channel flag for #foo

+m&+v #foo

Checks if the user has the m global flag AND the v channel flag for #foo

-m

Checks if the user does not have the m global flag

|-n #foo

Checks if the user does not have the n channel flag for #foo

+m|-n #foo

Checks if the user has the global m flag OR does not have a channel n flag for #foo

-n&-m #foo

Checks if the user does not have the global n flag AND does not have the channel m flag for #foo

||+b

Checks if the user has the bot flag b

As a side note, Tcl scripts historically have used a ‘-’ to skip processing of a flag type (Example: -|o). It is unknown where and why this practice started, but as a style tip, Eggdrop developers recommend using a ‘*’ to skip processing, so as not to confuse a single “-†meaning “skip processing†with a preceding “-ov†which means “not these flagsâ€.

Bind Types¶

The following is a list of bind types and how they work. Below each bind type is the format of the bind command, the list of arguments sent to the Tcl proc, and an explanation.

  1. MSG

bind msg <flags> <command> <proc>

procname <nick> <user@host> <handle> <text>

Description: used for /msg commands. The first word of the user’s msg is the command, and everything else becomes the text argument.

Module: server

  1. DCC

bind dcc <flags> <command> <proc>

procname <handle> <idx> <text>

Description: used for partyline commands; the command is the first word and everything else becomes the text argument. The idx is valid until the user disconnects. After that, it may be reused, so be careful about storing an idx for long periods of time.

Module: core

  1. FIL

bind fil <flags> <command> <proc>

procname <handle> <idx> <text>

Description: the same as DCC, except this is triggered if the user is in the file area instead of the party line

Module: filesys

  1. PUB

bind pub <flags> <command> <proc>

procname <nick> <user@host> <handle> <channel> <text>

Description: used for commands given on a channel. The first word becomes the command and everything else is the text argument.

Module: irc

  1. MSGM (stackable)

bind msgm <flags> <mask> <proc>

procname <nick> <user@host> <handle> <text>

Description: matches the entire line of text from a /msg with the mask. This is useful for binding Tcl procs to words or phrases spoken anywhere within a line of text. If the proc returns 1, Eggdrop will not log the message that triggered this bind. MSGM binds are processed before MSG binds. If the exclusive-binds setting is enabled, MSG binds will not be triggered by text that a MSGM bind has already handled.

Module: server

  1. PUBM (stackable)

bind pubm <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <text>

Description: just like MSGM, except it’s triggered by things said on a channel instead of things /msg’d to the bot. The mask is matched against the channel name followed by the text and can contain wildcards. If the proc returns 1, Eggdrop will not log the message that triggered this bind. PUBM binds are processed before PUB binds. If the exclusive-binds setting is enabled, PUB binds will not be triggered by text that a PUBM bind has already handled.

Examples:
bind pubm * “#eggdrop Hello*†myProc

Listens on #eggdrop for any line that begins with “Helloâ€

bind pubm * “% Hello*†myProc

Listens on any channel for any line that begins with “Helloâ€

bind pubm * “% !command†myProc

Listens on any channel for a line that ONLY contains “!commandâ€

Module: irc

  1. NOTC (stackable)

bind notc <flags> <mask> <proc>

procname <nick> <user@host> <handle> <text> <dest>

Description: dest will be a nickname (the bot’s nickname, obviously) or a channel name. mask is matched against the entire text of the notice and can contain wildcards. It is considered a breach of protocol to respond to a /notice on IRC, so this is intended for internal use (logging, etc.) only. Note that server notices do not trigger the NOTC bind. If the proc returns 1, Eggdrop will not log the message that triggered this bind.

New Tcl procs should be declared as:

proc notcproc {nick uhost hand text {dest ""}} {
  global botnick; if {$dest == ""} {set dest $botnick}
  ...
}

for compatibility.

Module: server

  1. JOIN (stackable)

bind join <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel>

Description: triggered by someone joining the channel. The mask in the bind is matched against “#channel nick!user@host†and can contain wildcards.

Module: irc

  1. PART (stackable)

bind part <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <msg>

Description: triggered by someone leaving the channel. The mask is matched against “#channel nick!user@host†and can contain wildcards. If no part message is specified, msg will be set to “â€.

New Tcl procs should be declared as:

proc partproc {nick uhost hand chan {msg ""}} { ... }

for compatibility.

Module: irc

  1. SIGN (stackable)

bind sign <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <reason>

Description: triggered by a signoff, or possibly by someone who got netsplit and never returned. The signoff message is the last argument to the proc. Wildcards can be used in the mask, which is matched against ‘#channel nick!user@host’. If a “*†is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per signoff, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with SIGN as the keyword.

Module: irc

  1. TOPC (stackable)

bind topc <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <topic>

Description: triggered by a topic change. mask can contain wildcards and is matched against ‘#channel <new topic>’.

Module: irc

  1. KICK (stackable)

bind kick <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <target> <reason>

Description: triggered when someone is kicked off the channel. The mask is matched against ‘#channel target reason’ where the target is the nickname of the person who got kicked (can contain wildcards). The proc is called with the nick, user@host, and handle of the kicker, plus the channel, the nickname of the person who was kicked, and the reason.

Module: irc

  1. NICK (stackable)

bind nick <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <newnick>

Description: triggered when someone changes nicknames. The mask is matched against ‘#channel newnick’ and can contain wildcards. Channel is “*†if the user isn’t on a channel (usually the bot not yet in a channel). If a “*†is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per nick change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with NICK as the keyword.

Module: irc

  1. MODE (stackable)

bind mode <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <mode-change> <target>

Description: mode changes are broken down into their component parts before being sent here, so the <mode-change> will always be a single mode, such as “+m†or “-oâ€. target will show the argument of the mode change (for o/v/b/e/I) or Ҡif the set mode does not take an argument. The bot’s automatic response to a mode change will happen AFTER all matching Tcl procs are called. The mask will be matched against ‘#channel +/-modes’ and can contain wildcards.

If it is a server mode, nick will be “â€, user@host is the server name, and handle is *.

Note that “target†was added in 1.3.17 and that this will break Tcl scripts that were written for pre-1.3.17 Eggdrop that use the mode binding. Also, due to a typo, mode binds were broken completely in 1.3.17 but were fixed in 1.3.18. Mode bindings are not triggered at all in 1.3.17.

One easy example (from guppy) of how to support the “target†parameter in 1.3.18 and later and still remain compatible with older Eggdrop versions is:

Old script looks as follows:

bind mode - * mode_proc
proc mode_proc {nick uhost hand chan mode} { ... }

To make it work with 1.3.18+ and stay compatible with older bots, do:

bind mode - * mode_proc_fix
proc mode_proc_fix {nick uhost hand chan mode {target ""}} {
  if {$target != ""} {append mode " $target"}
  mode_proc $nick $uhost $hand $chan $mode
}
proc mode_proc {nick uhost hand chan mode} { ... }

Module: irc

  1. CTCP (stackable)

bind ctcp <flags> <keyword> <proc>

procname <nick> <user@host> <handle> <dest> <keyword> <text>

Description: dest will be a nickname (the bot’s nickname, obviously) or channel name. keyword is the ctcp command (which can contain wildcards), and text may be empty. If the proc returns 0, the bot will attempt its own processing of the ctcp command.

Module: server

  1. CTCR (stackable)

bind ctcr <flags> <keyword> <proc>

procname <nick> <user@host> <handle> <dest> <keyword> <text>

Description: just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg)

Module: server

  1. RAW (stackable)

bind raw <flags> <mask> <proc>

procname <from> <keyword> <text>

IMPORTANT: While not necessarily deprecated, this bind has been supplanted by the RAWT bind, which supports the IRCv3 message-tags capability, as of 1.9.0. You probably want to be using RAWT, not RAW.

Description: The mask can contain wildcards and is matched against the keyword, which is either a numeric, like “368â€, or a keyword, such as “PRIVMSGâ€. “from†will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. If the proc returns 1, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases), although RAWT binds are processed before RAW binds (and thus, a RAW bind cannot block a RAWT bind).

Module: server

  1. BOT

bind bot <flags> <command> <proc>

procname <from-bot> <command> <text>

Description: triggered by a message coming from another bot in the botnet. The first word is the command and the rest becomes the text argument; flags are ignored.

Module: core

  1. CHON (stackable)

bind chon <flags> <mask> <proc>

procname <handle> <idx>

Description: when someone first enters the party-line area of the bot via dcc chat or telnet, this is triggered before they are connected to a chat channel (so, yes, you can change the channel in a ‘chon’ proc). mask is matched against the handle and supports wildcards. This is NOT triggered when someone returns from the file area, etc.

Module: core

  1. CHOF (stackable)

bind chof <flags> <mask> <proc>

procname <handle> <idx>

Description: triggered when someone leaves the party line to disconnect from the bot. mask is matched against the handle and can contain wildcards. Note that the connection may have already been dropped by the user, so don’t send output to the idx.

Module: core

  1. SENT (stackable)

bind sent <flags> <mask> <proc>

procname <handle> <nick> <path/to/file>

Description: after a user has successfully downloaded a file from the bot, this binding is triggered. mask is matched against the handle of the user that initiated the transfer and supports wildcards. nick is the actual recipient (on IRC) of the file. The path is relative to the dcc directory (unless the file transfer was started by a script call to ‘dccsend’, in which case the path is the exact path given in the call to ‘dccsend’).

Module: transfer

  1. RCVD (stackable)

bind rcvd <flags> <mask> <proc>

procname <handle> <nick> <path/to/file>

Description: triggered after a user uploads a file successfully. mask is matched against the user’s handle. nick is the IRC nickname that the file transfer originated from. The path is where the file ended up, relative to the dcc directory (usually this is your incoming dir).

Module: transfer

  1. CHAT (stackable)

bind chat <flags> <mask> <proc>

procname <handle> <channel#> <text>

Description: when a user says something on the botnet, it invokes this binding. Flags are ignored; handle could be a user on this bot (“DronePupâ€) or on another bot (“Eden@Wildeâ€) and therefore you can’t rely on a local user record. The mask is checked against the entire line of text and supports wildcards. Eggdrop passes the partyline channel number the user spoke on to the proc in “channel#â€.

NOTE: If a BOT says something on the botnet, the BCST bind is invoked instead.

Module: core

  1. LINK (stackable)

bind link <flags> <mask> <proc>

procname <botname> <via>

Description: triggered when a bot links into the botnet. botname is the botnetnick of the bot that just linked in; via is the bot it linked through. The mask is checked against the botnetnick of the bot that linked and supports wildcards. flags are ignored.

Module: core

  1. DISC (stackable)

bind disc <flags> <mask> <proc>

procname <botname>

Description: triggered when a bot disconnects from the botnet for whatever reason. Just like the link bind, flags are ignored; mask is matched against the botnetnick of the bot that unlinked. Wildcards are supported in mask.

Module: core

  1. SPLT (stackable)

bind splt <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel>

Description: triggered when someone gets netsplit on the channel. Be aware that this may be a false alarm (it’s easy to fake a netsplit signoff message on some networks); mask may contain wildcards and is matched against ‘#channel nick!user@host’. Anyone who is SPLT will trigger a REJN or SIGN within the next wait-split (defined in the config file) seconds.

Module: irc

  1. REJN (stackable)

bind rejn <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel>

Description: someone who was split has rejoined. mask can contain wildcards, and is matched against ‘#channel nick!user@host’.

Module: irc

  1. FILT (stackable)

bind filt <flags> <mask> <proc>

procname <idx> <text>

Description: party line and file system users have their text sent through filt before being processed. ‘mask’ is a text mask that can contain wildcards and is used for matching text sent on the partyline. If the proc returns a blank string, the partyline texr is continued to be parsed as-is. Otherwise, the bot will instead use the text returned from the proc for continued parsing.

Module: core

  1. NEED (stackable)

bind need <flags> <mask> <proc>

procname <channel> <type>

Description: this bind is triggered on certain events, like when the bot needs operator status or the key for a channel. The types are: op, unban, invite, limit, and key; the mask is matched against ‘#channel type’ and can contain wildcards. flags are ignored.

Example:

bind need - "% op" needop < handles only need op
bind need - "*" needall   < handles all needs

Module: irc

  1. FLUD (stackable)

bind flud <flags> <type> <proc>

procname <nick> <user@host> <handle> <type> <channel>

Description: any floods detected through the flood control settings (like ‘flood-ctcp’) are sent here before processing. If the proc returns 1, no further action is taken on the flood; if the proc returns 0, the bot will do its normal “punishment†for the flood. The flood types are: pub, msg, join, or ctcp (and can be masked to “*†for the bind); flags are ignored.

Module: server

  1. NOTE (stackable)

bind note <flags> <mask> <proc>

procname <from> <to> <text>

Description: incoming notes (either from the party line, someone on IRC, or someone on another bot on the botnet) are checked against these binds before being processed. The mask is matched against the receiving handle and supports wildcards. If the proc returns 1, Eggdrop will not process the note any further. Flags are ignored.

Module: core

  1. ACT (stackable)

bind act <flags> <mask> <proc>

procname <handle> <channel#> <action>

Description: when someone does an action on the botnet, it invokes this binding. flags are ignored; the mask is matched against the text of the action and can support wildcards.

Module: core

  1. WALL (stackable)

bind wall <flags> <mask> <proc>

procname <from> <msg>

Description: when the bot receives a wallops, it invokes this binding. flags are ignored; the mask is matched against the text of the wallops msg. Note that RFC shows the server name as a source of the message, whereas many IRCds send the nick!user@host of the actual sender, thus, Eggdrop will not parse it at all, but simply pass it to bind in its original form. If the proc returns 1, Eggdrop will not log the message that triggered this bind.

Module: server

  1. BCST (stackable)

bind bcst <flags> <mask> <proc>

procname <botname> <channel#> <text>

Description: when a bot broadcasts something on the botnet (see ‘dccbroadcast’ above), it invokes this binding. flags are ignored; the mask is matched against the message text and can contain wildcards. ‘channel’ argument will always be ‘-1’ since broadcasts are not directed to any partyline channel.

It is also invoked when a BOT (not a person, as with the CHAT bind) ‘says’ something on a channel. In this case, the ‘channel’ argument will be a valid channel, and not ‘-1’.

Module: core

  1. CHJN (stackable)

bind chjn <flags> <mask> <proc>

procname <botname> <handle> <channel#> <flag> <idx> <user@host>

Description: when someone joins a botnet channel, it invokes this binding. The mask is matched against the channel and can contain wildcards. flag is one of: * (owner), + (master), @ (op), or % (botnet master). Flags are ignored.

Module: core

  1. CHPT (stackable)

bind chpt <flags> <mask> <proc>

procname <botname> <handle> <idx> <channel#>

Description: when someone parts a botnet channel, it invokes this binding. The mask is matched against the channel and can contain wildcards. Flags are ignored.

Module: core

  1. TIME (stackable)

bind time <flags> <mask> <proc>

procname <minute 00-59> <hour 00-23> <day 01-31> <month 00-11> <year 0000-9999>

Description: allows you to schedule procedure calls at certain times. mask matches 5 space separated integers of the form: “minute hour day month yearâ€. The month var starts at 00 (Jan) and ends at 11 (Dec). Minute, hour, day, month have a zero padding so they are exactly two characters long; year is four characters. Flags are ignored.

Module: core

  1. AWAY (stackable)

bind away <flags> <mask> <proc>

procname <botname> <idx> <text>

Description: triggers when a user goes away or comes back on the botnet. text is the reason that has been specified (text is Ҡwhen returning). mask is matched against the botnet-nick of the bot the user is connected to and supports wildcards. flags are ignored.

Module: core

  1. LOAD (stackable)

bind load <flags> <mask> <proc>

procname <module>

Description: triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored.

Module: core

  1. UNLD (stackable)

bind unld <flags> <mask> <proc>

procname <module>

Description: triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards; flags are ignored.

Module: core

  1. NKCH (stackable)

bind nkch <flags> <mask> <proc>

procname <oldhandle> <newhandle>

Description: triggered whenever a local user’s handle is changed (in the userfile). mask is matched against the user’s old handle and can contain wildcards; flags are ignored.

Module: core

  1. EVNT (stackable)

bind evnt <flags> <type> <proc>

procname <type> [arg]

Description: triggered whenever one of these events happen. flags are ignored. Pre-defined events triggered by Eggdrop are:

sighup            - called on a kill -HUP <pid>
sigterm           - called on a kill -TERM <pid>
sigill            - called on a kill -ILL <pid>
sigquit           - called on a kill -QUIT <pid>
save              - called when the userfile is saved
rehash            - called just after a rehash
prerehash         - called just before a rehash
prerestart        - called just before a restart
logfile           - called when the logs are switched daily
loaded            - called when the bot is done loading
userfile-loaded   - called after userfile has been loaded
connect-server    - called just before we connect to an IRC server
preinit-server    - called immediately when we connect to the server
init-server       - called when we actually get on our IRC server
disconnect-server - called when we disconnect from our IRC server
fail-server       - called when an IRC server fails to respond
hidden-host       - called after the bot's host is hidden by the server
got-chanlist      - called after Eggdrop receives the channel userlist from the server. Passes a second [arg] value to the Tcl proc

Note that Tcl scripts can trigger arbitrary events, including ones that are not pre-defined or used by Eggdrop.

Module: core

  1. LOST (stackable)

bind lost <flags> <mask> <proc>

procname <handle> <nick> <path> <bytes-transferred> <length-of-file>

Description: triggered when a DCC SEND transfer gets lost, such as when the connection is terminated before all data was successfully sent/received. This is typically caused by a user abort.

Module: transfer

  1. TOUT (stackable)

bind tout <flags> <mask> <proc>

procname <handle> <nick> <path> <bytes-transferred> <length-of-file>

Description: triggered when a DCC SEND transfer times out. This may either happen because the dcc connection was not accepted or because the data transfer stalled for some reason.

Module: transfer

  1. OUT (stackable)

bind out <flags> <mask> <proc>

procname <queue> <message> <queued|sent>

Description: triggered whenever output is sent to the server. Normally the event will occur twice for each line sent: once before entering a server queue and once after the message is actually sent. This allows for more flexible logging of server output and introduces the ability to cancel the message. Mask is matched against “queue statusâ€, where status is either ‘queued’ or ‘sent’. Queues are: mode, server, help, noqueue. noqueue is only used by the putnow tcl command.

Module: server

  1. CRON (stackable)

bind cron <flags> <mask> <proc>

procname <minute 0-59> <hour 0-23> <day 1-31> <month 1-12> <weekday 0-6>

Description: similar to bind TIME, but the mask is evaluated as a cron expression, e.g. “16/2 */2 5-15 7,8,9 4â€. It can contain up to five fields: minute, hour, day, month, weekday; delimited by whitespace. Week days are represented as 0-6, where Sunday can be either 0 or 7. Symbolic names are not supported. The bind will be triggered if the mask matches all of the fields, except that if both day and weekday are not ‘*’, only one of them is required to match. If any number of fields are omitted at the end, the match will proceed as if they were ‘*’. All cron operators are supported. Please refer to the crontab manual for their meanings. Flags are ignored.

Module: core

  1. LOG (stackable)

bind log <flags> <mask> <proc>

procname <level> <channel> <message>

Description: triggered whenever a message is sent to a log. The mask is matched against “channel textâ€. The level argument to the proc will contain the level(s) the message is sent to, or ‘*’ if the message is sent to all log levels at once. If the message wasn’t sent to a specific channel, channel will be set to ‘*’.

Module: core

  1. TLS (stackable)

bind tls <flags> <mask> <proc>

procname <idx>

Description: triggered for tcp connections when a ssl handshake has completed and the connection is secured. The mask is matched against the idx of the connection.

Module: core

  1. DIE (stackable)

bind die <flags> <mask> <proc>

procname <shutdownreason>

Description: triggered when eggdrop is about to die. The mask is matched against the shutdown reason. The bind won’t be triggered if the bot crashes or is being terminated by SIGKILL.

Module: core

  1. IRCAWAY (stackable)

bind ircaway <flags> <mask> <proc>

procname <nick> <user> <hand> <channel> <msg>

Description: triggered when Eggdrop receives an AWAY message for a user from an IRC server, ONLY if the away-notify capability is enabled via CAP (the server must supports this capability, see the ‘cap’ Tcl command for more info on requesting capabilities). “Normal†away messages (301 messages) will not trigger this bind, for those you should instead use a RAWT bind. The mask for the bind is in the format “#channel nick!user@hostname†(* to catch all nicknames). nick is the nickname of the user that triggered the bind, user is the nick!user@host of the user, handle is the handle of the user on the bot (- if the user is not added to the bot), channel is the channel the user was found on (read on for more info on this) and msg is the contents of the away message, if any. If a “*†is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per nick change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with AWAY as the keyword.

Module: irc

  1. INVT (stackable)

bind invt <flags> <mask> <proc>

procname <nick> <user@host> <channel> <invitee>

Description: triggered when eggdrop received an INVITE message. The mask for the bind is in the format “#channel nicknameâ€, where nickname (not a hostmask) is that of the invitee. For the proc, nick is the nickname of the person sending the invite request, user@host is the user@host of the person sending the invite, channel is the channel the invitee is being invited to, and invitee is the target (nickname only) of the invite. The invitee argument was added to support the IRCv3 invite-notify capability, where the eggdrop may be able to see invite messages for other people that are not the eggdrop.

  1. RAWT (stackable)

bind rawt <flags> <mask> <proc>

procname <from> <keyword> <text> <tags>

Description: similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The mask can contain wildcards and is matched against the keyword which is either a numeric, like “368â€, or a keyword, such as “PRIVMSG†or “TAGMSGâ€. “from†will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. “tag†is a dictionary (flat key/value list) of the message tags with Ҡfor empty values (e.g. “account eggdrop realname LamestBotâ€). If the proc returns 1, Eggdrop will not process the line any further, to include not being processed by a RAW bind (this could cause unexpected behavior in some cases). As of 1.9.0, it is recommended to use the RAWT bind instead of the RAW bind.

  1. ACCOUNT (stackable)

bind account <flags> <mask> <proc>

procname <nick> <user> <hand> <chan> <account>

Description: this bind will trigger when eggdrop detects a change in the authentication status of a user’s service account. The mask for the bind is in the format “#channel nick!user@hostname.com account†and accepts wildcards. account is either the account name the user is logging in to or “*†if the user is not logged in to an account.

NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking but this bind could be triggered late or never on account changes. Please see doc/ACCOUNTS for additional information.

  1. ISUPPORT (stackable)

bind isupport <flags> <mask> <proc>

procname <key> <isset> <value>

Description: triggered when the value of an isupport key changes. The mask is matched against the isupport key. If the value is not set, isset is 0 and the value is the empty string. Because the empty string is valid value, use isset to distinguish empty string values from a key being unset. The bind is called before the change is processed, so [isupport isset]/[isupport get] return the old value. A return value other than 0 makes Eggdrop ignore the change and revert to the old value. After a disconnect from the server, all isupport values are reset to default, but $::server will be empty, so that case can be caught and ignored.

Module: server

  1. MONITOR (stackable)

bind monitor <flags> <nick> <proc>

procname <nick> <online>

Description: triggered when a server sends a MONITOR status change of a target either coming online or disconnecting (not all servers support MONITOR). flags are ignored, nick is the nickname of the intended MONITOR target and can be used with wildcards. For the proc, nick is the nickname connecting or disconnecting, and online is ‘0’ if the nickname disconnected, or ‘1’ if the nickname connected.

Module: irc

  1. CHGHOST

bind chghost <flags> <mask> <proc>

procname <nick> <old user@host> <handle> <channel> <new user@host>

Description: triggered when a server sends an IRCv3 spec CHGHOST message to change a user’s hostmask. The new host is matched against mask in the form of “#channel nick!user@host†and can contain wildcards. The specified proc will be called with the nick of the user whose hostmask changed; the hostmask the affected user had before the change, the handle of the affected user (or * if no handle is present), the channel the user was on when the bind triggered, and the new hostmask of the affected user. This bind will trigger once for each channel the user is on.

Return Values¶

Several bindings pay attention to the value you return from the proc(using ‘return <value>’). Usually, they expect a 0 or 1, and returning an empty return is interpreted as a 0. Be aware if you omit the return statement, the result of the last Tcl command executed will be returned by the proc. This will not likely produce the results you intended (this is a “feature†of Tcl).

Here’s a list of the bindings that use the return value from procs they trigger:

  1. MSG Return 1 to make Eggdrop log the command as:

    (nick!user@host) !handle! command
    
  2. DCC Return 1 to make Eggdrop log the command as:

    #handle# command
    
  3. FIL Return 1 to make Eggdrop log the command as:

    #handle# files: command
    
  4. PUB Return 1 to make Eggdrop log the command as:

    <<nick>> !handle! command
    
  5. CTCP Return 1 to ask the bot not to process the CTCP command on its own. Otherwise, it would send its own response to the CTCP (possibly an error message if it doesn’t know how to deal with it).

  6. FILT Return Ҡto indicate the text has been processed, and the bot should just ignore it. Otherwise, it will treat the text like any other.

  7. FLUD Return 1 to ask the bot not to take action on the flood. Otherwise it will do its normal punishment.

  8. RAW Return 1 to ask the bot not to process the server text. This can affect the bot’s performance by causing it to miss things that it would normally act on – you have been warned.

  9. CHON Return 1 to ask the bot not to process the partyline join event.

  10. CHOF Return 1 to ask the bot not to process the partyline part event.

  11. WALL Return 1 to make Eggdrop not log the message that triggered this bind.

  12. NOTE Return 1 to make Eggdrop not process the note any further. This includes stacked note bindings that would be processed after this one, as well as the built-in eggdrop note handling routines.

  13. MSGM Return 1 to make Eggdrop not log the message that triggered this bind.

  14. PUBM Return 1 to make Eggdrop not log the message that triggered this bind.

  15. NOTC Return 1 to make Eggdrop not log the message that triggered this bind.

  16. OUT Return 1 to make Eggdrop drop the message instead of sending it. Only meaningful for messages with status “queuedâ€.

  17. EVNT Return 1 to make Eggdrop not to take the default action for the event. Used for signal type events, ignored for others.

  18. TLS Return 1 to disable verbose ssl information for the handshake.

  19. RAWT Return 1 to ask the bot not to process the server text. This can affet the bot’s performance by causing it to miss things that it would normally act on – you have been warned. Again.

Control Procedures¶

Using the ‘control’ command, you can put a DCC connection (or outgoing TCP connection) in control of a script. All text received from the connection is sent to the proc you specify. All outgoing text should be sent with ‘putdcc’.

The control procedure is called with these parameters:

procname <idx> <input-text>

This allows you to use the same proc for several connections. The idx will stay the same until the connection is dropped. After that, it will probably get reused for a later connection.

To indicate that the connection has closed, your control procedure will be called with blank text (the input-text will be “â€). This is the only time it will ever be called with Ҡas the text, and it is the last time your proc will be called for that connection. Don’t call killdcc on the idx when text is blank, it will always fail with “invalid idxâ€.

If you want to hand control of your connection back to Eggdrop, your proc should return 1. Otherwise, return 0 to retain control.

TCP Connections¶

Eggdrop allows you to make two types of TCP (“telnetâ€) connections: outgoing and incoming. For an outgoing connection, you specify the remote host and port to connect to. For an incoming connection, you specify a port to listen on.

All of the connections are event driven. This means that the bot will trigger your procs when something happens on the connection, and your proc is expected to return as soon as possible. Waiting in a proc for more input is a no-no.

To initiate an outgoing connection, use:

set idx [connect <hostname> <[+]port>]

For SSL connections, prefix the port with a plus sign.

$idx now contains a new DCC entry for the outgoing connection.

All connections use non-blocking (commonly called “asynchronousâ€, which is a misnomer) I/O. Without going into a big song and dance about asynchronous I/O, what this means to you is:

  • assume the connection succeeded immediately

  • if the connection failed, an EOF will arrive for that idx

The only time a ‘connect’ will return an error is if you give it a hostname that can’t be resolved (this is considered a “DNS errorâ€). Otherwise, it will appear to have succeeded. If the connection failed, you will immediately get an EOF.

Right after doing a ‘connect’ call, you should set up a ‘control’ for the new idx (see the section above). From then on, the connection will act just like a normal DCC connection that has been put under the control of a script. If you ever return “1†from the control proc (indicating that you want control to return to Eggdrop), the bot will just close the connection and dispose of it. Other commands that work on normal DCC connections, like ‘killdcc’ and ‘putdcc’, will work on this idx, too. The ‘killdcc’ command will fail with “invalid idx†if you attempt to use it on a closed socket.

To create a listen port, use:

listen <[+]port> script <proc>

By default, a listen port will allow both plaintext and SSL connections. To restrict a port to allow only SSL connections, prefix the port with a plus sign.

Procs should be declared as:

<procname> <newidx>

For example:

listen 6687 script listen:grab

proc listen:grab {newidx} {
  control $newidx listen:control
}

When a new connection arrives in port 6687, Eggdrop will create a new idx for the connection. That idx is sent to ‘listen:grab’. The proc immediately puts this idx under control. Once ‘listen:grab’ has been called, the idx behaves exactly like an outgoing connection would.

Secure connection can be also established after a connection is active. You can connect/listen normally and switch later using the ‘starttls’ command. Your script should first inform the other side of the connection that it wants to switch to SSL. How to do this is application specific.

The best way to learn how to use these commands is to find a script that uses them and follow it carefully. However, hopefully this has given you a good start.

Match Characters¶

Many of the bindings allow match characters in the arguments. Here are the four special characters:

?

matches any single character

*

matches 0 or more characters of any type

%

matches 0 or more non-space characters (can be used to match a single word) (This character only works in binds, not in regular matching)

~

matches 1 or more space characters (can be used for whitespace between words) (This char only works in binds, not in regular matching)

\*

matches a literal *, but please note that Tcl needs escaping as well, so a bind would have to use “\*†or {*} for a mask argument

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/twitchinfo.html0000664000175000017500000003510614703073435017245 0ustar geogeo Twitch — Eggdrop 1.10.0 documentation

Twitch¶

This module attempts to provide connectivity with the Twitch gaming platform. While Twitch provides an IRC gateway to connect with it’s streaming service, it does not claim to (and certainly does not) follow the IRC RFC in any meaningful way. The intent of this module is not to provide the full spectrum of management functions typically associated with Eggdrop; instead it focuses around the following key functions:

  • Logging of general and Twitch-specific events (raids, blocks, bit donations)

  • Tracking userstate and roomstate values

  • Adding Tcl event binds for a number of Twitch events

Disclaimer¶

We should also make clear that Eggdrop is in no way affiliated with Twitch in any way, and Twitch fully controls their own platform, to include the IRC gateway. This was just a fun project implemented at the request of some users to interact with the Twitch IRC development gateway as it existed at the time of development. At any time, Twitch could choose to alter or discontinue their IRC connectivity, thereby rendering this Eggdrop module useless. Eggdrop developers are also unable to offer technical support for Twitch-specific issues encountered while using this module.

Registering with Twitch¶

  1. Register an account with Twitch. At the time of writing, this is done by visiting Twitch and clicking on the Sign Up button.

  2. Generate a token to authenticate your bot with Twitch. At the time of writing, this is done by visiting the Twitch OAuth generator while logged in to the account you just created. The token will be an alphanumeric string and should be treated like a password (…because it is). Make note of it, and keep it safe!

Editing the config file¶

  1. Find the options to add a server in the server section of the config file. Remove the sample servers listed and add the following line in their place, replacing the alphanumeric string after ‘oauth:’ with the token you created when registering with Twitch in the previous section. Pretending your Twitch token from the previous step is ‘j9irk4vs28b0obz9easys4w2ystji3u’, it should look like this:

    server add irc.chat.twitch.tv 6667 oauth:j9irk4vs28b0obz9easys4w2ystji3u
    

Make sure you leave the ‘oauth:’ there, including the ‘:’.

  1. Spoiler alert- this step tells you to do nothing, but we’re including it for the sake of thoroughness. We know you are the ideal IRC user and have read all the docs for Twitch already, and noticed that Eggdrop has to request capabilities from the Twitch via a CAP request, something that is normally set in the config file. Good news! The Twitch module does this for you already, automatically. No need to edit the cap-request setting in the config. Moving on!

  2. Find the Twitch section of the config file, and enable the loading of the twitch module by removing the ‘#’ in front of the loadmodule command. It should look like this when you are done:

    loadmodule twitch
    
  3. Start your bot as usual, and good luck!

Twitch web UI functions¶

Twitch is normally accessed via a web UI, and uses commands prefixed with a . or a / to interact with the channel. The Twitch module adds the partyline command twcmd to replicate those Twitch-specific commands. For example, to grant VIP status to a user via Tcl, you would use the command .twcmd vip username. or to restrict chat to subscribers, you would use .twcmd subscribers (Note: no . or / is needed as a prefix to the Twitch command). In other words, .twcmd in Tcl is the interface to the standard Twitch set of commands available through the web UI (Also available as a Tcl command).

Twitch IRC limitations¶

There are a few things you should know about how Twitch provides service through the IRC gateway that affects how well Eggdrop can function:

  • Twitch does not broadcast JOINs or PARTs for channels over 1,000 users. This renders tracking users on a channel unreliable.

  • Twitch does not broadcast MODE changes for moderator status. This (mostly) renders tracking the status of users infeasible.

  • Twitch stores bans on its servers (and does not accept MODE +b), making the Eggdrop ban list (and exempts/invites) mostly useless

  • Twitch does not allow clients to issue MODE +o/-o commands, preventing Eggdrop from op’ing users through the traditional method

In light of these limitations, Eggdrop developers made an intentional decision to leave some non-compatible capabilities present with the Twitch module, most notably on the Tcl side. For example, if functionality such as the Tcl topic bind were to be removed, already-written scripts that had that feature in them would simply not load, rendering the entire Tcl script useless. By leaving these capabilities in, the hope is that existing Tcl scripts can still be used with Twitch, even if in a degraded capacity. As such, do be careful with the scripts you load as you may face errors you had not encountered before.

eggdrop-1.10.0/doc/html/using/partyline.html0000664000175000017500000002203614703073435017074 0ustar geogeo The Party Line — Eggdrop 1.10.0 documentation

Last revised: December 31, 2001

The Party Line¶

The most important way you will communicate with your bot is through the party line. The party line is accessible via DCC chat or telnet. It’s pretty much just a miniature, lag-less IRC (see doc/BOTNET), but it also consists of a console through which you can watch channel activity and give commands.

To enter the party line, DCC chat or open a telnet connection to your bot. It should ask for your password if you’ve set one. If you don’t have one set, use the /msg <bot> PASS <new password> command to set one.

The party line is actually split up into 200,000 “channelsâ€. The console is available from each channel, but you can only talk to people who are on your current channel (just like IRC). Channel 0 is the main party line, while others are typically reserved for private conversations. Channels 1-99,999 are botnet wide chat channels and any user joining that channel anywhere on the botnet will be able to chat with you. Channels *0-*99,999 are local channels (only people on the bot you are on can chat with you on these channels).

Console commands start with a dot (.), similar to the slash (/) used for IRC commands. At any time, you can type “.help all†to get a list of all possible commands. To find out what a command does, use “.help <command>â€. For example: “.help channelâ€.

When you’re on the party line, anything you type that doesn’t start with a dot (.), a comma (,), or an apostrophe (’) is considered to be broadcast to everyone else, just like talking on a channel. A message prefixed with a comma goes only to other bot owners (+n). A message prefixed with an apostrophe is sent to all users on the local bot only. You can change channels with the “.chat†command or even leave all channels with “.chat offâ€.

Copyright (C) 2002 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/core.html0000664000175000017500000012131414703073435016014 0ustar geogeo Eggdrop Core Settings — Eggdrop 1.10.0 documentation

Last revised: August 29, 2023

Eggdrop Core Settings¶

This file describes the syntax and all the settings of your Eggdrop configuration file. Please note that you don’t need to set all of these variables to make your bot work properly.

Executable Path¶

The first line in an Eggdrop configuration file should contain a fully qualified path to your Eggdrop executable. It has to be implemented in the way the example shows to make the config file work as a shell script.

Example:

#! /path/to/eggdrop

Basic Settings¶

You can change the basic Eggdrop appearance and behavior in this section.

set username “lamestâ€

This setting defines the username the bot uses on IRC. This setting has no effect if an ident daemon is running on your bot’s machine.

set admin “Lamer <email: lamer@lamest.lame.org>â€

This setting defines which contact person should be shown in .status, /msg help, and other places. You really should include this information.

set network “SomeIrcNetworkâ€

This setting is used only for info to share with others on your botnet. Set this to the IRC network your bot is connected to.

set timezone “ESTâ€

This setting defines which timezone is your bot in. It’s used for internal routines as well as for logfile timestamping and scripting purposes. The timezone string specifies the name of the timezone and must be three or more alphabetic characters. For example, Central European Time(UTC+1) should be “CETâ€.

set offset “5â€

The offset setting specifies the time value to be added to the local time to get Coordinated Universal Time (UTC aka GMT). The offset is positive if the local timezone is west of the Prime Meridian and negative if it is east. The value (in hours) must be between -23 and 23. For example, if the timezone is UTC+1, the offset is -1.

set env(TZ) “$timezone $offset†(disabled by default)

If you don’t want to use the timezone setting for scripting purposes only, but instead everywhere possible, then use this setting.

set vhost4 “99.99.0.0â€
set vhost4 “virtual.host.comâ€
If you’re using virtual hosting (your machine has more than 1 IP), you may want to specify the particular IP to bind to. You can specify either by hostname or by IP. Note that this is not used for listening. Use the ‘listen’ command to specify the listening address.
set vhost6 “2001:db8:618:5c0:263::â€
set vhost6 “my.ipv6.host.comâ€
IPv6 vhost to bind to for outgoing IPv6 connections. You can set it to any valid IPv6 address or hostname, resolving to an IPv6 address. Note that this is not used for listening. Use the ‘listen’ command to specify the listening address.
set prefer-ipv6 “1â€

Prefer IPv6 over IPv4 for connections and dns resolution. If the preferred protocol family is not supported, other possible families will be tried.

addlang “englishâ€

If you want to have your Eggdrop messages displayed in another language, change this command to match your preferences. An alternative would be to set the environment variable EGG_LANG to that value.

Languages included with Eggdrop: Danish, English, French, Finnish, German.

Log Files¶

Eggdrop is capable of logging various things, from channel chatter to partyline commands and file transfers.

Logfiles are normally kept for 24 hours. Afterwards, they will be renamed to “(logfilename).yesterdayâ€. After 48 hours, they will be overwritten by the logfile of the next day.

set max-logs 20

This is the maximum number of concurrent logfiles that can be opened for writing at one time. At most, this value should be the maximum number of channels you expect to create log files for. There is no value for ‘infinity’; very few cases should ever require more than 20. A decrease to this value while running will require a restart (not rehash) of the bot. However, don’t decrease it below 5.

set max-logsize 0

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 set to 0 (OFF).

set raw-log 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 incoming botnet traffic via console/log mode ‘t’, raw outgoing botnet traffic via console/log mode ‘u’, raw outgoing share traffic via console/log mode ‘g’, and raw incoming 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.

logfile <logflags> <channel> “logs/logfileâ€

This setting tells the bot what should be logged, from where, and to which file.

Logfile flags:

b

information about bot linking and userfile sharing

c

commands

d

misc debug information

g

raw outgoing share traffic

h

raw incoming share traffic

j

joins, parts, quits, and netsplits on the channel

k

kicks, bans, and mode changes on the channel

l

linked bot messages

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 incoming botnet traffic

u

raw outgoing 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 “*â€.

Examples:

logfile mco * "logs/eggdrop.log"
logfile jpk #lamest "logs/lamest.log"

In ‘eggdrop.log’, put private msgs/ctcps, commands, misc info, and errors from any channel.

In ‘lamest.log’, log all joins, parts, kicks, bans, public chatter, and mode changes from #lamest.

set log-time 1

Use this feature to timestamp entries in the log file.

set timestamp-format “[%H:%M:%S]â€

Set the following to the timestamp for the logfile entries. Popular times might be “[%H:%M]†(hour, min), or “[%H:%M:%S]†(hour, min, sec). Read ‘man strftime’ for more formatting options. Keep it below 32 chars.

set keep-all-logs 0

If you want to keep your logfiles forever, turn this setting on. All logfiles will get the 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 switch-logfiles-at 300

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

set quiet-save 0

“Writing user file…†and “Writing channel file…†messages won’t be logged anymore if this option is enabled. If you set it to 2, the “Backing up user file…†and “Backing up channel file…†messages will also not be logged. In addition to this, you can disable the “Switching logfiles…†and the new date message at midnight, by setting this to 3.

set logfile-suffix “.%d%b%Yâ€

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.

Console Settings¶

set console “mkcoblxsâ€

This is the default console mode. It uses the same event flags as the log files do. The console channel is automatically set to your “primary†channel, which is set in the modules section of the config file. Masters can change their console channel and modes with the ‘.console’ command.

File and Directory Settings¶

set userfile “LamestBot.userâ€

Specify here the filename your userfile should be saved as.

set pidfile “pid.LamestBotâ€

Specify here the filename Eggdrop will save its pid to. If no pidfile is specified, pid.(botnet-nick) will be used.

set help-path “help/â€

Specify here where Eggdrop should look for help files. Don’t modify this setting unless you know what you’re doing!

set text-path “text/â€

Specify here where Eggdrop should look for text files. This is used for certain Tcl and DCC commands.

set motd “text/motdâ€

The MOTD (Message Of The day) is displayed when people dcc chat or telnet to the bot. Look at doc/TEXT-SUBSTITUTIONS for options.

set telnet-banner “text/bannerâ€

This banner will be displayed on telnet connections. Look at doc/text-substitutions.doc for options.

set userfile-perm 0600

This specifies what permissions the user, channel, and notes files should be set to. The octal values are the same as for the chmod system command.

To remind you:

|      u  g  o           u  g  o           u  g  o
|0600  rw-------   0400  r--------   0200  -w-------    u - user
|0660  rw-rw----   0440  r--r-----   0220  -w--w----    g - group
|0666  rw-rw-rw-   0444  r--r--r--   0222  -w--w--w-    o - others

Note that the default 0600 is the most secure one and should only be changed if you need your files for shell scripting or other external applications.

set mod-path “modules/â€

This path specifies the path were Eggdrop should look for its modules. If you run the bot from the compilation directory, you will want to set this to “â€. If you use ‘make install’ (like all good kiddies do ;), this is a fine default. Otherwise, use your head :).

Botnet/Dcc/Telnet Settings¶

Settings in this section should be unimportant for you until you deal with botnets (multiple Eggdrops connected together to maximize efficiency). You should read doc/BOTNET before modifying these settings.

set botnet-nick “LlamaBot†(disabled by default)

If you want to use a different nickname on the botnet than you use on IRC (i.e. if you’re on an un-trusted botnet), un-comment this line and set it to the nick you would like to use.

listen <port> <mode>

This opens a telnet port by which you and other bots can interact with the Eggdrop by telneting in.

There are more options for the listen command in doc/tcl-commands.doc. Note that if you are running more than one bot on the same machine, you will want to space the telnet ports at LEAST 5 apart, although 10 is even better.

Valid ports are typically anything between 1025 and 65535 assuming the port is not already in use.

If you would like the bot to listen for users and bots in separate ports, use the following format:

listen 3333 bots
listen 4444 users

If you wish to use only one port, use this format:

listen 3333 all

You can setup a SSL port by prepending a plus sign to it:

listen +5555 all

You need to un-comment this line and change the port number in order to open the listen port. You should not keep this set to 3333.

set remote-boots 2

This setting defines whether or not people can boot users on the Eggdrop from other bots in your botnet. Valid settings are:

0

allow no outside boots

1

allow boots from sharebots

2

allow any boots

set share-unlinks 1

This setting prohibits Eggdrop to unlink from share bots if an remote bots tells so.

set protect-telnet 0

This setting will drop telnet connections not matching a known host.

set dcc-sanitycheck 0

This setting will make the bot ignore DCC chat requests which appear to have bogus information on the grounds that the user may have been trying to make the bot connect to somewhere that will get it into trouble, or that the user has a broken client, in which case the connect wouldn’t work anyway.

set ident-timeout 5

This setting defines the time in seconds the bot should wait for ident reply before the lookup fails. The default ident on timeout is ‘telnet’.

set require-p 0

Define here whether or not a +o user still needs the +p flag to dcc the bot.

set open-telnets 0

If you want people allow to telnet in and type ‘NEW’ to become a new user, set this to 1. This is similar to the ‘hello’ msg command. The protect-telnet setting must be set to 0 to use this.

set stealth-telnets 0

If you don’t want Eggdrop to identify itself as an Eggdrop on a telnet connection, set this setting to 1. Eggdrop will display ‘Nickname’ instead.

set use-telnet-banner 0

If you want Eggdrop to display a banner when telneting in, set this setting to 1. The telnet banner is set by ‘set telnet-banner’.

set connect-timeout 15

This setting defines a time in seconds that the bot should wait before a dcc chat, telnet, or relay connection times out.

set dcc-flood-thr 3

Specify here the number of lines to accept from a user on the partyline within 1 second before they are considered to be flooding and therefore get booted.

set telnet-flood 5:60

Define here how many telnet connection attempts in how many seconds from the same host constitute a flood. The correct format is Attempts:Seconds.

set paranoid-telnet-flood 1

If you want telnet-flood to apply even to +f users, set this setting to 1.

set resolve-timeout 15

Set here the amount of seconds before giving up on hostname/address lookup (you might want to increase this if you are on a slow network).

Advanced Settings¶

set firewall “!sun-barr.ebay:3666â€

Set this to your socks host if your Eggdrop sits behind a firewall. If you use a Sun “telnet passthru†firewall, prefix the host with a “!â€.

set nat-ip “127.0.0.1â€

If you have a NAT firewall (you box has an IP in one of the following ranges: 192.168.0.0-192.168.255.255, 172.16.0.0-172.31.255.255, 10.0.0.0-10.255.255.255 and your firewall transparently changes your address to a unique address for your box) or you have IP masquerading between you and the rest of the world, and /dcc chat, /ctcp chat or userfile sharing aren’t working, enter your outside IP here. This IP is used for transfers only, and has nothing to do with the vhost4/6 or listen settings. You may still need to set them.

set reserved-portrange 2010:2020

If you want all dcc file transfers to use a particular portrange either because you’re behind a firewall, or for other security reasons, set it here.

set ignore-time 15

Set the time in minutes that temporary ignores should last.

set hourly-updates 00

Define here what Eggdrop considers ‘hourly’. All calls to it, including such things as note notifying or userfile saving, are affected by this.

Example:

set hourly-updates 15

The bot will save its userfile 15 minutes past every hour.

set owner “MrLame, MrsLameâ€

Un-comment this line and set the list of owners of the bot. You NEED to change this setting.

set notify-newusers “$ownerâ€

Who should a note be sent to when new users are learned?

set default-flags “hpâ€

Enter the flags that all new users should get by default. See ‘.help whois’ on the partyline for a list of flags and their descriptions.

set whois-fields “url birthdayâ€

Enter all user-defined fields that should be displayed in a ‘.whois’. This will only be shown if the user has one of these extra fields. You might prefer to comment this out and use the userinfo1.0.tcl script which provides commands for changing all of these.

#unbind dcc n tcl *dcc:tcl

#unbind dcc n set *dcc:set

Uncomment these two lines if you wish to disable the .tcl and .set commands. If you select your owners wisely, you should be okay leaving these enabled.

set must-be-owner 1

If you enable this setting, only permanent owners (owner setting) will be able to use .tcl and .set. Moreover, if you want to only let permanent owners use .dump, then set this to 2.

unbind dcc n simul *dcc:simul

Comment out this line to add the ‘simul’ partyline command (owners can manipulate other people on the party line). Please select owners wisely and use this command ethically!

set max-dcc 50

Set here the maximum number of dcc connections you will allow. You can increase this later, but never decrease it.

set allow-dk-cmds 1

Enable this setting if you want +d & +k users to use commands bound as -|-.

set dupwait-timeout 5

If your Eggdrop rejects bots that actually have already disconnected from another hub, but the disconnect information has not yet spread over the botnet due to lag, use this setting. The bot will wait dupwait-timeout seconds before it checks again and then finally reject the bot.

set cidr-support 0

Enables cidr support for b/e/I modes if set to 1. This means the bot will understand and match modes in cidr notation, and will be able to put and enforce such bans or unban itself, if banned with a cidr mask. Do NOT set this, if your network/server does not support cidr!

SSL Settings¶

Settings in this section take effect when eggdrop is compiled with TLS support.

set ssl-privatekey “eggdrop.keyâ€

File containing your private key, needed for the SSL certificate (see below). You can create one issuing the following command:

openssl genrsa -out eggdrop.key 4096

It will create a 4096 bit RSA key, strong enough for eggdrop. This is required for SSL hubs/listen ports, secure file transfer and /ctcp botnick schat For your convenience, you can type ‘make sslcert’ after ‘make install’ and you’ll get a key and a certificate in your DEST directory.

set ssl-certificate “eggdrop.crtâ€

Specify the filename where your SSL certificate is located. If you don’t set this, eggdrop will not be able to act as a server in SSL connections, as with most ciphers a certificate and a private key are required on the server side. Must be in PEM format. If you don’t have one, you can create it using the following command:

openssl req -new -key eggdrop.key -x509 -out eggdrop.crt -days 365

This is required for SSL hubs/listen ports, secure file transfer and /ctcp botnick schat For your convenience, you can type ‘make sslcert’ after ‘make install’ and you’ll get a key and a certificate in your DEST directory.

set ssl-verify-depth 9

Sets the maximum depth for the certificate chain verification that shall be allowed for ssl. When certificate verification is enabled, any chain exceeding this depth will fail verification.

set ssl-capath “/etc/ssl/â€
set ssl-cafile “â€
Specify the location at which CA certificates for verification purposes are located. These certificates are trusted. If you don’t set this, certificate verification will not work.
set ssl-ciphers “â€

Specify the list of ciphers (in order of preference) allowed for use with ssl. The cipher list is one or more cipher strings separated by colons, commas or spaces. Unavailable ciphers are silently ignored unless no usable cipher could be found. For the list of possible cipher strings and their meanings, please refer to the ciphers(1) manual. Note: if you set this, the value replaces any ciphers OpenSSL might use by default. To include the default ciphers, you can put DEFAULT as a cipher string in the list. For example:

set ssl-ciphers "DEFAULT ADH"

… will make eggdrop allow the default OpenSSL selection plus anonymous DH ciphers.

set ssl-ciphers "ALL"

… will make eggdrop allow all ciphers supported by OpenSSL, in a reasonable order.

set ssl-cert-auth 0

Enable certificate authorization. Set to 1 to allow users and bots to identify automatically by their certificate fingerprints. Setting it to 2 to will force fingerprint logins. With a value of 2, users without a fingerprint set or with a certificate UID not matching their handle won’t be allowed to login on SSL enabled telnet ports. Fingerprints must be set in advance with the .fprint and .chfinger commands. NOTE: this setting has no effect on plain-text ports.

You can control SSL certificate verification using the following variables. All of them are flag-based. You can set them by adding together the numbers for all exceptions you want to enable. By default certificate verification is disabled and all certificates are assumed to be valid.

The options are the following:

0

disable verification

1

enable certificate verification

2

allow self-signed certificates

4

don’t check peer common or alt names

8

allow expired certificates

16

allow certificates which are not valid yet

32

allow revoked certificates

set ssl-verify-dcc 0

Control certificate verification for DCC chats (only /dcc chat botnick)

set ssl-verify-bots 0

Control certificate verification for linking to hubs

set ssl-verify-clients 0

Control certificate verification for SSL listening ports. This includes leaf bots connecting, users telneting in and /ctcp bot chat.

Modules¶

After the core settings, you should start loading modules. Modules are loaded by the command “loadmodule <module>â€. Eggdrop looks for modules in the directory you specified by the module-path setting in the files and directories section.

Please note that for different configurations, different modules are needed. Four examples:

Channel Security Bot:

This bot needs the channels, blowfish, console, dns, irc, and (if you like) ctcp modules loaded. More is not needed and makes the bot slower.

Public IRC Bot:

A public bot should have all modules available loaded since they provide all functions for everyday use.

Secure Filesys Bot:

This bot needs all normal IRC operating modules, but not the notes, seen, ctcp or share modules.

Limbo Bot:

A limbo bot (serves as a botnet hub outside IRC) just needs the channels, console, dns, and maybe notes or share modules loaded. Of course, an encryption module needs to be loaded here, too.

Scripts¶

The scripts section should be placed at the end of the config file. All modules should be loaded and their variables should be set at this point.

source scripts/script.tcl

This line loads script.tcl from the scripts directory inside your Eggdrop’s directory. All scripts should be put there, although you can place them where you like as long as you can supply a fully qualified path to them.

Some commonly loaded scripts are alltools.tcl and action.fix.tcl.

The appropriate source lines are:

source scripts/alltools.tcl
source scripts/action.fix.tcl

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/botnet.html0000664000175000017500000006341314703073435016364 0ustar geogeo Botnet Sharing and Linking — Eggdrop 1.10.0 documentation

Botnet Sharing and Linking

Botnet Sharing and Linking¶

The purpose of this document is to show you what a botnet is and how it could be useful to you. It also covers botflags userfile sharing.

What is a botnet?¶

A botnet consists of two or more bots linked together. This can allow bots to op each other securely, control floods efficiently, and share user lists, ban lists, exempt/invite lists, and ignore lists (if sharing is enabled).

Terms¶

The following are some common terms used in this document:

Botnet

A botnet consists of two or more bots connected together.

Link

Link is the term used to describe a bot connecting to another bot.

Hub

A bot is described as a hub-bot if one or more bots are linked to it.

Leaf

A leaf is a non-hub bot connecting to a hub-bot. A leaf has only one other bot connected to it, its hub. Leaf bots can be assigned the “l†botflag to prevent other bots from linking to them.

Link Bot

A link-bot is a bot that is linked to another bot. It may or may not be a hub-bot.

Share

Share is the term used to describe the sharing of user records.

Share Bot

A share-bot is a bot which shares user records with one or more linked bots.

Aggressive Share

Aggressive share is a term used to describe the direction of sharing user-files. Aggressive share bots will SEND userfiles to another passive bot.

Passive Share

Passive share is a term used to describe the direction of sharing user-files. Passive share bots will accept userfiles from an aggressive share bot.

Address

The physical address, containing the address and port of the bot. For example: lame.org:3333. You can change a bot’s address with:

.chaddr <botname> <address> <port#>[/<relay-port#>]
Relay Port

The relay port number of the bot is defined in the config file. Note that you can define one port for bots and another for user connections.

Relay

A relay connection is used to relay (jump) to another bot via telnet or DCC chat. You can relay to another bot even if the remote bot is not linked. You can use:

.relay <botname>

to relay to another bot.

Port

The telnet port is used by the bot to communicate with other bots and/or users. Note that you can define separate ports for user and bot connections.

Example bottrees¶

BotA
  |-+BotB
  |==BotC
  |=+BotD
  `--BotC

Legend: * – means the bots are linked, but not sharing userfiles * -+ means the bots are sharing userfiles * == means the bots have an encrypted link between them, and are not sharing userfiles * =+ means the bots have an encrypted link between them, and are sharing userfiles

Bot Flags¶

Flags are attributes that determine what a bot can or is allowed to do. Flags can be either global (such as +s) or channel specific (such as |+s #lamest). See ‘.help botattr’ for help with setting these flags.

The following is a list of valid bot flags:

a

alternate (automatically link to this bot if the hub bot can’t be linked)

b

ban sharing (passive bot is allowed to share bans with aggressive bot)

c

channel sharing (passive bot is allowed to share channel changes with aggressive bot)

d

share aggressively (SEND userfile to a passive bot), limited sharing (passive bot is NOT allowed to share anything)

e

exempt sharing (passive bot is allowed to share exempts with aggressive bot)

g

global share (share all channels)

h

hub (automatically link to this bot)

i

isolate (isolate the party line across a bot link)

j

invite sharing (passive bot is allowed to share invites with aggressive bot)

l

leaf (bot is not allowed to link in other bots)

n

ignore sharing (passive bot is allowed to share ignores with aggressive bot)

p

share passively (ACCEPT userfile from an aggressive bot)

r

reject (bot will not be allowed to link)

s

share aggressively (SEND userfile to a passive bot), unlimited sharing (passive bot is allowed to share anything)

u

user sharing (passive bot is allowed to share user changes with aggressive bot)

0-9

user defined flags

Adding and linking bots¶

With the common terms out of the way, we can start with the process of linking two bots. Before you start, you need to know the address and port of each bot you wish to link.

Here is an example scenario:

BotA is on lame.org listening on port 3333, and BotB is on irc.org listening on port 4444. First, you have to add each Bot to the other’s userfile. On BotA, you would type ‘.+bot BotB irc.org 4444’. If BotB is on a common channel with BotA, BotB’s hostmask is automatically added. Otherwise, you have to add the hostmask manually with the ‘.+host’ command. On BotB, you would type ‘.+bot BotA lame.org 3333’.

At this point, you can link the two bots by typing ‘.link BotA’ on BotB (or ‘.link BotB’ on BotA). The bots will now give themselves random passwords which are not stored encrypted in the userfile. Note that you can link as many bots as you wish to your botnet.

Using botflags¶

Botflags are needed to assign special functions and tasks to your bots. Bot flags are set with the ‘.botattr’ command. See ‘.help botattr’ for help with this command. The following is a list of botflags and their functions:

“h†(hub)

If you want your bot(s) to automatically link/relink, you can assign the +h botflag each bot’s hub. Note that if you set multiple bots +h, the bot only attempts to link to one.

“a†(alternate)

If your bots are, for some reason, unable to link to their hub, they will attempt to connect to an alternate hub. You can assign a bot as an alternate hub by giving it the +a botflag.

“l†(leaf)

This flag, assigned to a link bot, will prevent the link bot from linking other bots to your botnet.

“r†(reject)

If you assign this flag to a link bot, the link bot will not be allowed to link to the botnet.

“i†(isolate)

This flag isolates a link bot’s partyline from the rest of the botnet. Anything said on the link bot’s partyline won’t appear on the rest of the botnet.

“s†(SEND userfile to)
+s Giving a link bot this flag will make the bot share aggressively

with the link bot. See ‘Aggressive Share’ in section 2 of this document for more information on aggressive sharing.

“|s†(channel-specific sharing)

+s bots need this flag for each channel you want to share.

“p†(ACCEPT userfile from)

Giving a link bot this flag will make the bot share passively with the link bot. See ‘Passive Share’ in section 2 of this document for more information on passive sharing.

“g†(global share)

This flag allows the sharing of all channels with a link bot.

“0-9†(user-defined)

These 10 flags are user-defined can be used by scripters.

Making bots share user records¶

Before you start preparing your bots for sharing, make sure that you’ve loaded the transfer and share modules. You also have to ensure that each channel you wish to share is set +shared (see ‘.help chanset’ and ‘.help chaninfo’).

By using specific botflags, you can cause your bot to share aggressively with some link bots, and passively with others. For sharing to work, flags must be set properly on both the passive and the aggressive bots. An aggressive bot will not share userfiles with another aggressive bot; a passive bot will not share userfiles with another passive bot.

First off, let’s say we have two bots we want to link. We will call one Lamestbot, and the other Lameshare. The first thing that needs to be done is each bot needs the other bot added to its user record. Your botnet should have a hub bot. This will have them connect automatically whenever they are started. Without a hub, you would have to manually link them with the .link command. For this situation we will make Lamestbot the hub for our small botnet. Let’s also use a channel called #eggdrop as the one we want to share user channel flags with. Do the following:

On Lamestbot:

.+bot Lameshare eggdrop.com 3333

This command adds a user record to Lamestbot for Lameshare. Lameshare is running from eggdrop.com and is on port 3333. If Lameshare were to have a separate port for users/relays we would just add a ‘/’ and the port number, i.e. 3333/5555:

.botattr Lameshare +s

This tells us that Lamestbot will only send user files to Lameshare; Lameshare will not send them to it:

.botattr Lameshare |s #eggdrop

This sets up sharing of the channel flags for #eggdrop between the bots. Without this, they will not share channel flags only global flags for the users

On Lameshare:

.+bot Lamestbot best.com 3333/5555

Again this will add a user on Lameshare called Lamestbot with the domain of best.com. The bot has two ports, 3333 for bot communications and 5555 for users/relays:

.botattr Lamestbot +hp

This command sets Lamestbot as the hub and also as a passive share, which means Lameshare will accept user files from Lamestbot::

.botattr Lamestbot |s #eggdrop

This sets #eggdrop as a share channel

Our botnet:

Lamestbot
  `-+Lameshare

Let’s add a third bot called beldin to this scenario:

On Lamestbot:

.+bot beldin llama.com 3333

.botattr beldin s|s #eggdrop

Notice how i piped (the | character) the channel flag, also saving time.)

Also note that you don’t have to add beldin on Lameshare. Since they are already sharing, it was added automatically. The one thing that you should note is that no bot flags will be shared. If you set beldin as +s (Aggressive share) on the hub (Lamestbot) he will not be set on the other bots as that. The same with the channel +s flag. All other flags will be shared such as the o, f, etc. Now that we have three bots, we can also set up one as an alternate hub. The alternate hub is the bot that the bots will auto-connect to in the event the hub goes down or is unreachable.

Let’s make beldin an alternate hub for our little botnet.

On Lameshare:

.botattr beldin +a

That’s all there is to it. Again, since bot flags are not shared, you would have to add the bot flag +a for beldin on them all. The only ones you would not have to do this on are beldin and the hub (Lamestbot). Of course, if you had more bots, you would have to add beldin as a +a on them, but you would not do it on the hub or beldin.

Our botnet:

Lamestbot
  |-+beldin
  `-+Lameshare

Using certificates to authenticate Eggdrops¶

Eggdrops can use certificates to authenticate when linking to each other instead of a password. First, you must ensure you have set the appropriate certificates in the ssl-privatekey and ssl-certificate settings in the config file, and then enable the ssl-cert-auth setting. Next, add the certificate on the partyline by using .fprint + to add the fingerprint for the certificate currently in use, or .fprint <SHA1 fingerprint> to manually add a fingerprint. Once the config file settings are set 0and fingerprints are added on the partyline, Eggdrops will attempt to use their certificates instead of passwords for authentication.

Copyright (C) 1999 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/using/python.html0000664000175000017500000005441214703073435016411 0ustar geogeo Using the Python Module — Eggdrop 1.10.0 documentation

Using the Python Module¶

In Eggdrop 1.10.0, Eggdrop was shipped with a Python module that, similar to the existing core Tcl capability, allows Eggdrop to run python scripts.

System Requirements¶

Similar to Tcl requirements, Eggdrop requires both python and python development libraries to be installed on the host machine. On Debian/Ubuntu machines, this requires the packages python-dev AND python-is-python3 to be installed. The python-is-python3 updates symlinks on the host system that allow Eggdrop to find it.

The minimum supported Python version is 3.8 and we do require the Global Interpreter Lock for thread safety, even if you use latest Python.

Loading Python¶

Put this line into your Eggdrop configuration file to load the python module:

loadmodule python

To load a python script from your config file, place the .py file in the scripts/ folder and add the following line to your config:

pysource scripts/myscript.py

If you need to install dependencies we recommend using virtual environments, see https://docs.python.org/3/library/venv.html for more details.

To create the virtual environment in a hidden directory called .venv (only necessary once):

cd eggdrop && python3 -m venv .venv

To install a python package in the above .venv directory (in this example, the requests package):

cd eggdrop && source .venv/bin/activate && pip install requests

Starting eggdrop with activated venv (must be run every time for proper functionality):

cd eggdrop && source .venv/bin/activate && ./eggdrop

You always need to start Eggdrop with the activated venv to set the necessary environment variables.

Reloading Python Scripts¶

Unfortunately, reloading python scripts with rehash like Tcl scripts is currently unsupported. Scripts can unbind their existing binds and re-bind them on being loaded again (see the bind section). For now, you should restart your bot when the Python scripts change.

You can (should?) also write scripts that manually unload their binds upon a reshash, example code looks like this:

# Create a list to track the join binds if ‘JOIN_BINDS’ in globals():

for joinbind in JOIN_BINDS:

joinbind.unbind()

del JOIN_BINDS

JOIN_BINDS = list()

<…>

# Create the binds in the script like this JOIN_BINDS.append(bind(“joinâ€, “*â€, “*â€, joinGreetUser)) JOIN_BINDS.append(bind(“joinâ€, “oâ€, “*â€, joinGreetOp))

Multithreading and async¶

pysource loads a Python script in the main Eggdrop thread but is free to use both async Python and threads.

Eggdrop Python Commands¶

The Python module is built to use the existing core Tcl commands integrated into Eggdrop via the eggdrop.tcl module. To call an existing Tcl command from Python, you can either load the entire catalog by running import eggdrop.tcl, or be more specific by from eggdrop.tcl import putserv, putlog, chanlist, etc.

Arguments to the Tcl functions are automatically converted as follows:

  • None is converted to an empty Tcl object (the empty string, "")

  • List and Tuple is converted to a Tcl list

  • Dict is converted to a Tcl dictionary

  • Everything else is converted to a string using the str() method

Return values from Tcl functions must be manually converted:

  • "" the empty string is automatically converted to None

  • everything else is returned as string

  • Tcl list as string can be converted to a Python List using parse_tcl_list

  • Tcl dictionary as string can be converted to a Python Dict using parse_tcl_list

bind <arguments>¶

An important difference to note is that Eggdrop Python has its own bind command implemented. You will generally want to create binds using the Python bind command and not import bind from eggdrop.tcl because a Python bind will call a Python function, whereas using the Tcl bind will call a Tcl function (not one from the script you are writing).

The python version of the bind command is used to create a bind that triggers a python function. The python bind takes the same arguments as the Tcl binds, but here each argument is passed individually. For example, a bind that would look like bind pub * !foo myproc in Tcl is written as bind("pub", "*", "!foo", myproc). For more information on Eggsrop bind argument syntax please see Bind Types. The eggdrop.tcl.bind command should not be used as it will attempt to call a Tcl proc.

The bind command returns a PythonBind object that has an unbind method:

x = bind("pub", "*", "!foo", myproc)
x.unbind()

parse_tcl_list <string>¶

When a python script calls a Tcl command that returns a list via the eggdrop.tcl module, the return value will be a Tcl-formatted list- also simply known as a string. The parse_tcl_list command will convert the Tcl-formatted list into a Python list, which can then freely be used within the Python script.

parse_tcl_dict <string>¶

When a python script calls a Tcl command that returns a dict via the eggdrop.tcl module, the return value will be a Tcl-formatted dict- also simply known as a string. The parse_tcl_dict command will convert the Tcl-formatted dict into a Python list, which can then freely be used within the Python script.

Writing an Eggdrop Python script¶

Some example scripts, complete with documentation, are included with the Python module that ships with Eggdrop (src/mod/python.mod/scripts). These scripts are included to help demonstrate script formatting and usage. The scripts are:

bestfriend.py¶

This example script demonstrates how to use the parse_tcl_list() python command to convert a list returned by a Tcl command into a list that is usable by Python.

greet.py¶

This is a very basic script that demonstrates how a Python script with binds can be run by Eggdrop.

imdb.py¶

This script shows how to use an existing third-party module to extend a Python script, in this case retrieving information from imdb.com.

listtls.py¶

This script demonstrates how to use parse-tcl_list() and parse_tcl_dict() to convert a list of dicts provided by Tcl into something that is usable by Python.

urltitle.py¶

This script shows how to use an existing third-party module to extend a Python script, in this case using an http parser to collect title information from a provided web page.

Header section¶

Python is able to call any Tcl command by importing the eggdrop module. For example, to use the putlog command in a python script, you would import it as:

from eggdrop.tcl import putlog

and then call it using:

putlog("This is a logged message")

An important difference to note is that Eggdrop Python has its own bind command implemented. You will generally want to create binds using the Python bind command and not import bind from eggdrop.tcl because a Python bind will call a Python function, whereas using the Tcl bind will call a Tcl function (not one from the script you are writing).

Copyright (C) 2000 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/html/index.html0000664000175000017500000010272314703073435015051 0ustar geogeo Eggdrop, an open source IRC bot — Eggdrop 1.10.0 documentation

Eggdrop, an open source IRC bot¶

Eggdrop is a free, open source software program built to assist in managing an IRC channel. It is the world’s oldest actively-maintained IRC bot and was designed to be easily used and expanded on via it’s ability to run Tcl scripts. Eggdrop can join IRC channels and perorm automated tasks such as protecting the channel from abuse, assisting users obtain their op/voice status, provide information and greetings, host games, etc.

Some things you can do with Eggdrop¶

Eggdrop has a large number of features, such as:

How to get Eggdrop¶

The Eggdrop project source code is hosted at https://github.com/eggheads/eggdrop. You can clone it via git, or alternatively a copy of the current stable snapshot is located at https://geteggdrop.com. Additional information can be found on the official Eggdrop webpage at https://www.eggheads.org. For more information, see Installing Eggdrop

How to install Eggdrop¶

Installation Pre-requisites¶

Eggdrop requires Tcl (and its development header files) to be present on the system it is compiled on. It is also strongly encouraged to install openssl (and its development header files) to enable TLS-protected network communication.

Installation¶

A guide to quickly installing Eggdrop can be found here.

Where to find more help¶

The Eggheads development team can be found lurking on #eggdrop on the Libera network (irc.libera.chat).

Using Eggdrop

eggdrop-1.10.0/doc/html/searchindex.js0000664000175000017500000036570014703073435015715 0ustar geogeoSearch.setIndex({"alltitles": {".binds python": [[21, "binds-python"]], ".cancel [file] \u2026": [[16, "cancel-file-file"]], ".cd ": [[16, "cd-directory"]], ".cp ": [[16, "cp-source-dst"]], ".desc ": [[16, "desc-file-description"]], ".files": [[16, "files"]], ".filestats [clear]": [[16, "filestats-user-clear"]], ".filesys module": [[16, "id1"]], ".get [nickname]": [[16, "get-filename-nickname"]], ".hide [files] \u2026": [[16, "hide-file-files"]], ".ln ": [[16, "ln-bot-filepath-localfile"]], ".ls [filemask]": [[16, "ls-filemask"]], ".mkdir [flags [channel]]": [[16, "mkdir-dir-flags-channel"]], ".mv ": [[16, "mv-source-dest"]], ".optimize": [[16, "optimize"]], ".pending": [[16, "pending"]], ".pwd": [[16, "pwd"]], ".quit": [[16, "quit"]], ".rmdir ": [[16, "rmdir-dir"]], ".share [files] \u2026": [[16, "share-file-files"]], ".stats": [[16, "stats"]], ".unhide": [[16, "unhide"]], ".unshare [file] \u2026": [[16, "unshare-file-file"]], "About": [[42, "about"], [43, "about"], [50, "about"]], "About Eggdrop": [[0, null], [2, null]], "Account tracking in Eggdrop": [[36, null]], "Add a Host to a User": [[31, "add-a-host-to-a-user"]], "Add a User": [[31, "add-a-user"]], "Adding Bind Functionality": [[8, "adding-bind-functionality"]], "Adding a New Bind Type to the Bind Table": [[8, "adding-a-new-bind-type-to-the-bind-table"]], "Adding a Partyline Command": [[32, "adding-a-partyline-command"]], "Adding a Tcl Bind": [[32, "adding-a-tcl-bind"]], "Adding a Tcl Command": [[32, "adding-a-tcl-command"]], "Adding and linking bots": [[39, "adding-and-linking-bots"]], "Additional Information": [[34, "additional-information"]], "Additional functions": [[29, "additional-functions"]], "Advanced Settings": [[40, "advanced-settings"]], "Advanced Tips": [[51, null]], "Assign Permission Flags": [[31, "assign-permission-flags"]], "Assoc Module": [[9, null], [48, "assoc-module"]], "Authenticating with NickServ": [[31, "authenticating-with-nickserv"]], "Auto-starting Eggdrop": [[4, "auto-starting-eggdrop"]], "Automatically restarting an Eggdrop": [[31, "automatically-restarting-an-eggdrop"]], "Autoscripts File Structure": [[37, "autoscripts-file-structure"]], "Autoscripts usage": [[37, "autoscripts-usage"]], "Background": [[46, "background"]], "Bans, Invites, and Exempts": [[38, null]], "Basic Settings": [[40, "basic-settings"]], "Best-Effort Account Tracking": [[36, "best-effort-account-tracking"]], "Bind Flags": [[8, "bind-flags"]], "Bind Return Values": [[8, "bind-return-values"]], "Bind Types": [[48, "bind-types"], [52, "bind-types"]], "Binds": [[48, "binds"], [52, "binds"]], "Blowfish Module": [[10, null]], "Boring legal stuff": [[1, null]], "Bot Flags": [[39, "bot-flags"]], "Botnet": [[5, "botnet"], [50, "botnet"]], "Botnet Sharing and Linking": [[39, null]], "Botnet/Dcc/Telnet Settings": [[40, "botnet-dcc-telnet-settings"]], "C Binding": [[8, "c-binding"]], "C Handler": [[8, "c-handler"]], "CTCP CHAT/CHAT4/CHAT6": [[42, "ctcp-chat-chat4-chat6"]], "CTCP Module": [[14, null]], "Calling the Bind": [[32, "calling-the-bind"]], "Can I compile Eggdrop without dynamic modules? (Static compile)": [[7, "can-i-compile-eggdrop-without-dynamic-modules-static-compile"]], "Channel Commands": [[48, "channel-commands"]], "Channel Settings": [[11, "channel-settings"]], "Channels Module": [[11, null]], "Checking Account-tracking Status": [[36, "checking-account-tracking-status"]], "Command Line": [[4, "command-line"]], "Commands": [[52, "commands"]], "Common First Steps": [[31, null]], "Common first steps": [[31, "id1"]], "Compress Module": [[12, null], [48, "compress-module"]], "Config file changes": [[5, "config-file-changes"]], "Config file setup": [[16, "config-file-setup"]], "Configuration": [[33, "configuration"]], "Configuration File Preparation - Generating Keys": [[34, "configuration-file-preparation-generating-keys"]], "Configuration File Preparation - Listening with TLS": [[34, "configuration-file-preparation-listening-with-tls"]], "Configure Channel Settings": [[31, "configure-channel-settings"]], "Connecting to a TLS-enabled IRC server": [[34, "connecting-to-a-tls-enabled-irc-server"]], "Connecting to an Eggdrop listening with TLS": [[34, "connecting-to-an-eggdrop-listening-with-tls"]], "Console Module": [[13, null]], "Console Settings": [[40, "console-settings"]], "Control Procedures": [[48, "control-procedures"]], "Crontab Method (Old)": [[31, "crontab-method-old"]], "Cygwin Requirements (Windows)": [[3, "cygwin-requirements-windows"]], "DCC Commands": [[48, "dcc-commands"]], "DNS Module": [[15, null]], "Default Channel Values": [[11, "default-channel-values"]], "Defining bind arguments": [[32, "defining-bind-arguments"]], "Determining if a Server Supports Account Capabilities": [[36, "determining-if-a-server-supports-account-capabilities"]], "Development hints": [[37, "development-hints"]], "Disclaimer": [[53, "disclaimer"]], "Do I still need to \u2018loadmodule\u2019 modules?": [[7, "do-i-still-need-to-loadmodule-modules"]], "Docker": [[4, "docker"]], "Documentation": [[4, "documentation"], [5, "documentation"]], "Download locations": [[33, "download-locations"]], "Editing the config file": [[33, "editing-the-config-file"], [53, "editing-the-config-file"]], "Eggdrop Autoscripts": [[37, null]], "Eggdrop Bind Internals": [[8, null]], "Eggdrop Core Settings": [[40, null]], "Eggdrop Features": [[41, null]], "Eggdrop Module Information": [[7, null]], "Eggdrop Modules": [[2, null]], "Eggdrop Python Commands": [[47, "eggdrop-python-commands"]], "Eggdrop Tcl Commands": [[48, null]], "Eggdrop Twitch Tcl Commands": [[52, null]], "Eggdrop, an open source IRC bot": [[2, null]], "Enable/Disable Channel Settings": [[11, "enable-disable-channel-settings"]], "Enabling Eggdrop Account Tracking": [[36, "enabling-eggdrop-account-tracking"]], "Enabling TLS Security on Eggdrop": [[34, null]], "Enabling hybrid configuration": [[46, "enabling-hybrid-configuration"]], "Enabling solo configuration": [[46, "enabling-solo-configuration"]], "Encryption/Hashing": [[46, null]], "Errata": [[43, "errata"]], "Example bottrees": [[39, "example-bottrees"]], "Executable Path": [[40, "executable-path"]], "Explaining the Linking/Sharing Process": [[35, "explaining-the-linking-sharing-process"]], "FTP": [[4, "ftp"]], "File and Directory Settings": [[40, "file-and-directory-settings"]], "File placement": [[37, "file-placement"]], "Filesys Module": [[16, null], [48, "filesys-module"]], "Flag Masks": [[48, "flag-masks"]], "Flags": [[52, "flags"]], "General Workflow To Create a New Bind": [[8, "general-workflow-to-create-a-new-bind"]], "Getting the source": [[33, "getting-the-source"]], "Git Development Snapshot": [[4, "git-development-snapshot"]], "Global Variables": [[48, "global-variables"]], "Header section": [[47, "header-section"]], "History": [[33, "history"]], "How to Get Eggdrop": [[4, "how-to-get-eggdrop"]], "How to Upgrade": [[5, "how-to-upgrade"]], "How to Write an Eggdrop Module": [[29, null]], "How to get Eggdrop": [[2, "how-to-get-eggdrop"]], "How to install Eggdrop": [[2, "how-to-install-eggdrop"]], "How to install a module": [[7, "how-to-install-a-module"]], "How to share userfiles- the super-short version": [[35, "how-to-share-userfiles-the-super-short-version"]], "Hybrid Configuration": [[46, "hybrid-configuration"]], "IPv6 support": [[42, null]], "IRC": [[50, "irc"]], "IRC Module": [[18, null]], "IRCv3 support": [[43, null]], "Ident Module": [[17, null]], "Installation": [[2, "installation"], [33, "installation"], [42, "installation"], [50, "installation"]], "Installation Pre-requisites": [[2, "installation-pre-requisites"]], "Installing Eggdrop": [[2, null], [3, null]], "Join a Channel": [[31, "join-a-channel"]], "Keeping Logs": [[51, "keeping-logs"]], "Keys, certificates and authentication": [[50, "keys-certificates-and-authentication"]], "Limitations": [[26, "limitations"]], "Loading Python": [[21, "loading-python"], [47, "loading-python"]], "Log Files": [[40, "log-files"]], "Log on to the partyline": [[31, "log-on-to-the-partyline"]], "MODULE_close ()": [[29, "module-close"]], "MODULE_expmem": [[29, "module-expmem"]], "MODULE_report": [[29, "module-report"]], "MODULE_start": [[29, "module-start"]], "MODULE_table": [[29, "module-table"]], "Making bots share user records": [[39, "making-bots-share-user-records"]], "Manifest.json": [[37, "manifest-json"]], "Match Characters": [[48, "match-characters"]], "Minimum Requirements": [[4, "minimum-requirements"]], "Miscellaneous Commands": [[48, "miscellaneous-commands"]], "Modifying Default Strings": [[51, "modifying-default-strings"]], "Modularizing Your Config File": [[51, "modularizing-your-config-file"]], "Module Header": [[32, "module-header"]], "Module requirements": [[29, "module-requirements"]], "Modules": [[3, "modules"], [5, "modules"], [40, "modules"]], "Modules included with Eggdrop": [[6, null]], "Multithreading and async": [[47, "multithreading-and-async"]], "Must-read changes for Eggdrop v1.10": [[5, "must-read-changes-for-eggdrop-v1-10"]], "No show?": [[33, "no-show"]], "Notes Module": [[19, null], [48, "notes-module"]], "Notice": [[4, "notice"]], "Obtaining Help": [[4, "obtaining-help"]], "On the Hub Bot": [[35, "on-the-hub-bot"]], "On the Leaf Bot": [[35, "on-the-leaf-bot"]], "Output Commands": [[48, "output-commands"]], "PBKDF2 Module": [[20, null], [48, "pbkdf2-module"]], "Partyline Commands": [[21, "partyline-commands"]], "Partyline commands": [[26, "partyline-commands"]], "Partyline usage": [[16, "partyline-usage"]], "Patching Eggdrop": [[45, null]], "Pre-requisites": [[34, "pre-requisites"]], "Prerequisites": [[33, "prerequisites"]], "Protecting Botnet Communications": [[34, "protecting-botnet-communications"]], "Python Module": [[21, null]], "Quick Startup": [[3, "quick-startup"], [4, "quick-startup"]], "README": [[4, null]], "Registering with Twitch": [[53, "registering-with-twitch"]], "Reloading Python Scripts": [[47, "reloading-python-scripts"]], "Removing a bind": [[48, "removing-a-bind"]], "Renaming commands": [[51, "renaming-commands"]], "Required Code": [[32, "required-code"]], "Required Server Capabilities": [[36, "required-server-capabilities"]], "Return Values": [[48, "return-values"]], "SSL Settings": [[40, "ssl-settings"]], "SSL/TLS Settings": [[50, "ssl-tls-settings"]], "Scripts": [[5, "scripts"], [40, "scripts"], [50, "scripts"]], "Secure (TLS) Links": [[39, "secure-tls-links"]], "Secure DCC": [[50, "secure-dcc"]], "Seen Module": [[22, null]], "Self-logging": [[51, "self-logging"]], "Server Module": [[23, null]], "Setting Up Eggdrop": [[33, null]], "Setting up SASL authentication": [[31, "setting-up-sasl-authentication"]], "Settings": [[42, "settings"]], "Share Module": [[24, null]], "Sharing Userfiles": [[35, null]], "Solo configuration": [[46, "solo-configuration"]], "Some things you can do with Eggdrop": [[2, "some-things-you-can-do-with-eggdrop"]], "Stackable Binds: HT_STACKABLE": [[8, "stackable-binds-ht-stackable"]], "Stackable binds": [[48, "stackable-binds"]], "Starting the Eggdrop": [[33, "starting-the-eggdrop"]], "Submitting a patch via GitHub": [[45, "submitting-a-patch-via-github"]], "Summary": [[8, "summary"]], "Supported CAP capabilities": [[43, "supported-cap-capabilities"]], "System Pre-Requisites": [[4, "system-pre-requisites"]], "System Requirements": [[21, "system-requirements"], [47, "system-requirements"]], "Systemd Method (Newer Systems)": [[31, "systemd-method-newer-systems"]], "TCP Connections": [[48, "tcp-connections"]], "TLS support": [[50, null]], "Tcl API": [[26, "tcl-api"]], "Tcl Commands": [[5, "tcl-commands"], [21, "tcl-commands"], [37, "tcl-commands"]], "Tcl File": [[37, "tcl-file"]], "Tcl Interface": [[46, "tcl-interface"]], "Terms": [[39, "terms"]], "Textfile Substitutions": [[49, null]], "The Party Line": [[44, null]], "The super-short version": [[33, "the-super-short-version"]], "Transfer Module": [[25, null]], "Triggering any Bind": [[8, "triggering-any-bind"]], "Tutorials": [[2, null]], "Twitch": [[53, null]], "Twitch IRC limitations": [[53, "twitch-irc-limitations"]], "Twitch Module": [[26, null]], "Twitch web UI functions": [[53, "twitch-web-ui-functions"]], "Upgrading": [[4, "upgrading"]], "Upgrading Eggdrop": [[5, null]], "Uptime Module": [[27, null]], "Usage": [[42, "usage"], [43, "usage"], [46, "usage"], [50, "usage"]], "User Record Manipulation Commands": [[48, "user-record-manipulation-commands"]], "Users and Flags": [[54, null]], "Using Accounts with Tcl Scripts": [[36, "using-accounts-with-tcl-scripts"]], "Using Eggdrop": [[2, null]], "Using botflags": [[39, "using-botflags"]], "Using certificates to authenticate Eggdrops": [[39, "using-certificates-to-authenticate-eggdrops"]], "Using the Bind in Tcl": [[8, "using-the-bind-in-tcl"]], "Using the Python Module": [[47, null]], "Value-based Channel Settings": [[11, "value-based-channel-settings"]], "Variables in Your Config": [[51, "variables-in-your-config"]], "WHOX": [[36, "whox"]], "What are modules?": [[7, "what-are-modules"]], "What is Eggdrop?": [[4, "what-is-eggdrop"]], "What is a botnet?": [[39, "what-is-a-botnet"]], "What to do with a module?": [[29, "what-to-do-with-a-module"]], "Where to find more help": [[2, "where-to-find-more-help"]], "Woobie Module": [[28, null]], "Writing a Basic Eggdrop Module": [[32, null]], "Writing an Eggdrop Python script": [[47, "writing-an-eggdrop-python-script"]], "Writing an Eggdrop Script": [[30, null]], "account-notify": [[36, "account-notify"]], "account-tag": [[36, "account-tag"]], "account2nicks [channel]": [[48, "account2nicks-account-channel"]], "accounttracking": [[48, "accounttracking"]], "addbot
[botport [userport]]": [[48, "addbot-handle-address-botport-userport"]], "addchanrec ": [[48, "addchanrec-handle-channel"]], "adduser [hostmask]": [[48, "adduser-handle-hostmask"]], "and": [[48, "and"]], "assoc [name]": [[48, "assoc-chan-name"]], "backup": [[48, "backup"]], "banlist [channel]": [[48, "banlist-channel"]], "bind ": [[47, "bind-arguments"]], "bind [proc-name]": [[48, "bind-type-flags-keyword-mask-proc-name"]], "binds [type/mask]": [[48, "binds-type-mask"]], "boot [reason]": [[48, "boot-user-bot-reason"]], "botattr [changes [channel]]": [[48, "botattr-handle-changes-channel"]], "botishalfop [channel]": [[48, "botishalfop-channel"]], "botisop [channel]": [[48, "botisop-channel"]], "botisvoice [channel]": [[48, "botisvoice-channel"]], "botlist": [[48, "botlist"]], "botname": [[48, "botname"]], "botnick": [[48, "botnick"]], "botonchan [channel]": [[48, "botonchan-channel"]], "bots": [[48, "bots"]], "callevent ": [[48, "callevent-event"]], "cap [arg]": [[48, "cap-ls-values-req-enabled-raw-arg"]], "chanbans ": [[48, "chanbans-channel"]], "chandname2name ": [[48, "chandname2name-channel-dname"]], "chanexempts ": [[48, "chanexempts-channel"]], "chaninvites ": [[48, "chaninvites-channel"]], "chanlist [flags][<&|>chanflags]": [[48, "chanlist-channel-flags-chanflags"]], "channame2dname ": [[48, "channame2dname-channel-name"]], "channel add [option-list]": [[48, "channel-add-name-option-list"]], "channel get [setting]": [[48, "channel-get-name-setting"]], "channel info ": [[48, "channel-info-name"]], "channel remove ": [[48, "channel-remove-name"]], "channel set ": [[48, "channel-set-name-options"]], "channels": [[48, "channels"]], "chansettype ": [[48, "chansettype-setting"]], "chattr [changes [channel]]": [[48, "chattr-handle-changes-channel"]], "chhandle ": [[48, "chhandle-old-handle-new-handle"]], "clean

Common First Steps¶

Log on to the partyline¶

Now that your bot is online, you’ll want to join the partyline to further use the bot. First, read what it tells you when you started it up:

STARTING BOT IN USERFILE CREATION MODE.
Telnet to the bot and enter 'NEW' as your nickname.
OR go to IRC and type:  /msg BotNick hello
This will make the bot recognize you as the master.

You can either telnet to the bot, or connect to the bot using DCC Chat. To telnet, you’ll either need a program like Putty (Windows), or you can do it from the command line of your shell using the telnet command:

telnet <IP of bot> <listen port>

You can find the IP and port the bot is listening on by a) remembering what you set in the config file ;) or b) reading the display the bot presented when it started up. Look for a line that looks similar to this:

Listening for telnet connections on 2.4.6.9:3183 (all).

This tells you that the bot is listening on IP 2.4.6.9, port 3183. If you see 0.0.0.0 listed, that means Eggdrop is listening on all available IPs on that particular host.

If you choose not to telnet to connect to the partyline, you can either /dcc chat BotNick or /ctcp BotNick chat. If one of those methods does not work for you, try the other. Once you’re on the bot for the first time, type .help for a short list of available commands, or .help all for a more thorough list.

Common first steps¶

To learn more about any of these commands, type .help <command> on the partyline. It will provide you the syntax you need, as well as a short description of how to use the command.

Join a Channel¶

To tell the Eggdrop to join a channel, use:

.+chan #channel

Add a User¶

To add a user to the bot, use:

.+user <handle>

Add a Host to a User¶

The handle is the name that the bot uses to track a user. No matter what nickname on IRC a user uses, a single handle is used to track the user by their hostmask. To add a hostmask of a user to a handle, use:

.+host <handle> <hostmask>

where the hostmask is in the format of <nick>!<ident>@hostname.com . Wildcards can be used; common formats are *!*@hostname.com for static hosts, or *!ident@*.foo.com for dynamic hostnames.

Assign Permission Flags¶

To assign an access level to a user, first read .help whois for a listing of possible access levels and their corresponding flags. Then, assign the desired flag to the user with:

.chattr <+flag> <handle>

So to grant a user the voice flag, you would do:

.chattr +v handle

It is important to note that, when on the partyline, you want to use the handle of the user, not their current nickname.

Configure Channel Settings¶

Finally, Eggdrop is often used to moderate and control channels. This is done via the .chanset command. To learn more about the (numerous!) settings that can be used to control a channel, read:

.help chaninfo

Common uses involve setting channels modes. This can be done with the chanmode channel setting:

.chanset #channel chanmode +snt

which will enforce the s, n, and t flags on a channel.

Automatically restarting an Eggdrop¶

A common question asked by users is, how can I configure Eggdrop to automatically restart should it die, such as after a reboot? Historically, Eggdrop relied on the host’s crontab system to run a script (called botchk) every ten minutes to see if the eggdrop is running. If the eggdrop is not running, the script will restart the bot, with an optional email sent to the user informing them of the action. Newer systems come with systemd, which can provide better real-time monitoring of processes such as Eggdrop. You probably want to use systemd if your system has it.

Crontab Method (Old)¶

  1. Enter the directory you installed your Eggdrop to. Most commonly, this is ~/eggdrop (also known as /home/<username>/eggdrop).

  2. Just humor us- run ./scripts/autobotchk without any arguments and read the options available to you. They’re listed there for a reason!

  3. If you don’t want to customize anything via the options listed in #2, you can install a crontab job to start Eggdrop simply by running:

    ./scripts/autobotchk yourEggdropConfigNameHere.conf
    
  4. Review the output of the script, and verify your new crontab entry by typing:

    crontab -l
    

By default, it should create an entry that looks similar to:

0,10,20,30,40,50 * * * * /home/user/bot/scripts/YourEggdrop.botchk 2>&1

This will run the generated botchk script every ten minutes and restart your Eggdrop if it is not running during the check. Also note that if you run autobotchk from the scripts directory, you’ll have to manually specify your config file location with the -dir option. To remove a crontab entry, use crontab -e to open the crontab file in your system’s default editor and remove the crontab line.

Systemd Method (Newer Systems)¶

  1. Enter the directory you installed your Eggdrop to. Most commonly, this is ~/eggdrop (also known as /home/<username>/eggdrop).

  2. Install the systemd job for Eggdrop simply by running:

    ./scripts/autobotchk yourEggdropConfigNameHere.conf -systemd
    
  3. Note the output at the end of the script informing you of the command you can use to start/stop the Eggdrop in thee future. For example, to manually start the Eggdrop, use:

    systemctl --user start <botname>.service
    

To stop Eggdrop, use:

systemctl --user stop <botname>.service

To rehash (not reload) Eggdrop, use:

systemctl --user reload <botname>.service

(Yes, we acknowledge the confusion that the systemd reload command will execute the Eggdrop ‘.rehash’ command, not the ‘.reload’ command. Unfortunately, systemd did not consult us when choosing its commands!)

To prevent Eggdrop from automatically running after a system start, use:

systemctl --user disable <botname>.service

To re-enable Eggdrop automatically starting after a system start, use:

systemctl --user enable <botname>.service

Authenticating with NickServ¶

Many IRC features require you to authenticate with NickServ to use them. You can do this from your config file by searching for the line:

#  putserv "PRIVMSG NickServ :identify <password>"

in your config file. Uncomment it by removing the ‘#’ sign and then replace <password> with your password. Your bot will now authenticate with NickServ each time it joins a server.

Setting up SASL authentication¶

Simple Authentication and Security Layer (SASL) is becoming a prevalant method of authenticating with IRC services such as NickServ prior to your client finalizing a connection to the IRC server, eliminating the need to /msg NickServ to identify yourself. In other words, you can authenticate with NickServ and do things like receive a cloaked hostmask before your client ever appears on the IRC server. Eggdrop supports three methods of SASL authentication, set via the sasl-mechanism setting:

  • PLAIN: To use this method, set sasl-mechanism to 0. This method passes the username and password (set in the sasl-username and sasl-password config file settings) to the IRC server in plaintext. If you only connect to the IRC server using a connection protected by SSL/TLS this is a generally safe method of authentication; however you probably want to avoid this method if you connect to a server on a non-protected port as the exchange itself is not encrypted.

  • ECDSA-NIST256P-CHALLENGE: To use this method, set sasl-mechanism to 1. This method uses a public/private keypair to authenticate, so no username/password is required. Not all servers support this method. If your server does support this, you you must generate a certificate pair using:

    openssl ecparam -genkey -name prime256v1 -out eggdrop-ecdsa.pem
    

    You will need to determine your public key fingerprint by using:

    openssl ec -noout -text -conv_form compressed -in eggdrop-ecdsa.pem | grep '^pub:' -A 3 | tail -n 3 | tr -d ' \n:' | xxd -r -p | base64
    

    Then, authenticate with your NickServ service and register your public certificate with NickServ. You can view your public key On Libera for example, it is done by:

    /msg NickServ set pubkey <fingerprint string from above goes here>
    
  • EXTERNAL: To use this method, set sasl-mechanism to 2. This method allows you to use other TLS certificates to connect to the IRC server, if the IRC server supports it. An EXTERNAL authentication method usually requires you to connect to the IRC server using SSL/TLS. There are many ways to generate certificates; one such way is generating your own certificate using:

    openssl req -new -x509 -nodes -keyout eggdrop.key -out eggdrop.crt
    

You will need to determine your public key fingerprint by using:

openssl x509 -in eggdrop.crt -outform der | sha1sum -b | cut -d' ' -f1

Then, ensure you have those keys loaded in the ssl-privatekey and ssl-certificate settings in the config file. Finally, to add this certificate to your NickServ account, type:

/msg NickServ cert add <fingerprint string from above goes here>
eggdrop-1.10.0/doc/html/tutorials/module.html0000664000175000017500000007735614703073435017272 0ustar geogeo Writing a Basic Eggdrop Module — Eggdrop 1.10.0 documentation

Writing a Basic Eggdrop Module¶

An Eggdrop module is a piece of C code that can be loaded (or unloaded) onto the core Eggdrop code. A module differs from a Tcl script in that modules must be compiled and then loaded, whereas scripts can be edited and loaded directly. Importantly, a module can be written to create new Eggdrop-specific Tcl commands and binds that a user can then use in a Tcl script. For example, the server module loaded by Eggdrop is what creates the “jump†Tcl command, which causes tells the Eggdrop to jump to the next server in its server list.

There are a few required functions a module must perform in order to properly work with Eggdrop

Module Header¶

A module should include license information. This tells other open source users how they are allowed to use the code. Eggdrop uses GPL 2.0 licensing, and our license information looks like this:

/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/

Required Code¶

For this section, you don’t necessarily need to understand what it is doing, but this code is required for a module to function. If you want to learn more about this, check out How to Write an Eggdrop Module

You’ll next want to name your module:

#define MODULE_NAME "woobie"

Declare your own function tables (again, you don’t need to understand this part; you just need to copy/paste it):

#undef global
static Function *global = NULL, *server_funcs = NULL;
EXPORT_SCOPE char *woobie_start();

Next are two memory-related functions used by the core Eggdrop .status and .module commands:

static int woobie_expmem()
{
  int size = 0;

  return size;
}

static void woobie_report(int idx, int details)
{
  if (details) {
    int size = woobie_expmem();

    dprintf(idx, "    Using %d byte%s of memory\n", size,
            (size != 1) ? "s" : "");
  }
}

This function is called when Eggdrop loads the module:

char *woobie_start(Function *global_funcs)
{
  global = global_funcs;

  /* Register the module. */
  module_register(MODULE_NAME, woobie_table, 2, 1);
  /*                                            ^--- minor module version
   *                                         ^------ major module version
   *                           ^-------------------- module function table
   *              ^--------------------------------- module name
   */

  if (!module_depend(MODULE_NAME, "eggdrop", 108, 0)) {
    module_undepend(MODULE_NAME);
    return "This module requires Eggdrop 1.8.0 or later.";
  }

This next function is used to unload the module:

static char *woobie_close()
{
  module_undepend(MODULE_NAME);
  return NULL;
}

This creates a function table that is exported to Eggdrop. In other words, these are commands that are made available to the Eggdrop core and other modules. At minimum, the following functions must be exported:

static Function woobie_table[] = {
  (Function) woobie_start,
  (Function) woobie_close,
  (Function) woobie_expmem,
  (Function) woobie_report,
};

At this point, you should have a module that compiles and can be loaded by Eggdrop- but doesn’t really do anything yet. We’ll change that in the next section!

Adding a Partyline Command¶

A partyline command function accepts three arguments- a pointer to the user record of the user that called the command; the idx the user was on when calling the command; and a pointer to the arguments appended to the command. A command should immediately log that it was called to the LOG_CMDS log level, and then run its desired code. This simple example prints “WOOBIE†to the partyline idx of the user that called it:

static int cmd_woobie(struct userrec *u, int idx, char *par)
{
  putlog(LOG_CMDS, "*", "#%s# woobie", dcc[idx].nick);
  dprintf(idx, "WOOBIE!\n");
  return 0;
}

If you add partyline commands, you need to create a table which links the new command name to the function it should call. This can be done like so:

static cmd_t mywoobie[] = {
  /* command  flags  function     tcl-name */
  {"woobie",  "",    cmd_woobie,  NULL},
  {NULL,      NULL,  NULL,        NULL}  /* Mark end. */
};

The tcl-name field can be a name for a Tcl command that will also call the partyline command, or it can be left as NULL.

Adding a Tcl Command¶

Eggdrop uses the Tcl C API library to interact with the Tcl interpreter. Learning this API is outside the scope of this tutorial, but this example Tcl command will echo the provided argument:

static int tcl_echome STDVAR {
  BADARGS(2, 2, " arg");

  if (strcmp(argv[1], "llama") {
    Tcl_AppendResult(irp, "You said: ", argv[1], NULL);
    return TCL_OK;
  } else {
    Tcl_AppendResult(irp, "illegal word!");
    return TCL_ERROR;
  }
}

A few notes on this example. BADARGS is a macro that checks the input provided to the Tcl command. The first argument BADARGS accepts is the minimum number of parameters the Tcl command must accept (including the command itself). The second argument is the maximum number of parameters that BADARGS will accept. The third argument is the help text that will be displayed if these boundaries are exceeded. For example, BADARGS(2, 4, “ name ?date? ?place?â€) requires at least one argument to be passed, and a maximum of three arguments. Eggdrop code style is to enclose optional arguments between qusetion marks in the help text.

Similar to adding a partyline command, you also have to create a function table for a new Tcl command:

static tcl_cmds mytcl[] = {
  {"echome",           tcl_echome},
  {NULL,                   NULL}   /* Required to mark end of table */
};

And now the newly-created Tcl command ‘echome’ is available for use in a script!

Adding a Tcl Bind¶

A Tcl bind is a command that is activated when a certain condition is met. With Eggdrop, these are usually linked to receiving messages or other IRC events. To create a bind, you must first register the bind type with Eggdrop when the module is loaded (you added the woobie_start() and woobie_close functions earlier, you still need all that earlier code in here as well):

static p_tcl_bind_list H_woob;

...

char *woobie_start(Function *global_funcs)
{
  ...
  H_woob = add_bind_table("woobie", HT_STACKABLE, woobie_2char);
}

And then remove the binds when the module is unloaded:

static char *woobie_close()
{
  ...
  del_bind_table(H_woob);
}

Here, “woobie†is the name of the bind (similar to the PUB, MSG, JOIN types of binds you already see in tcl-commands.doc). HT_STACKABLE means you can have multiple binds of this type. “woobie_2char†defines how many arguments the bind will take, and we’ll talk about that next.

Defining bind arguments¶

The following code example defines a bind that will take two arguments:

static int woobie_2char STDVAR
{
  Function F = (Function) cd;

  BADARGS(3, 3, " nick chan");

  CHECKVALIDITY(woobie_2char);
  F(argv[1], argv[2]);
  return TCL_OK;
}

And this example defines a bind that will take three arguments:

static int woobie_3char STDVAR
{
  Function F = (Function) cd;

  BADARGS(4, 4, " foo bar moo");

  CHECKVALIDITY(woobie_3char);
  F(argv[1], argv[2], argv[3]);
  return TCL_OK;
}

Like before, BADARGS still checks that the number of arguments passed is correct, and outputs help text if it is not. The rest is boilerplate code to pass the arguments when the bind is called.

Calling the Bind¶

To call the bind, Eggdrop coding style is to name that function “check_tcl_bindnameâ€. So here, whenever we reach a point in code that should trigger the bind, we’ll call check_tcl_woobie() and pass the arguments we defined- in this case, two arguments that woobie_2char was created to handle. Here is some sample code:

check_tcl_woobie(chan, nick);


static int check_tcl_woobie(char *chan, char *nick, char *userhost) {
  int x;
  char mask[1024];
  struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 };

  snprintf(mask, sizeof mask, "%s %s!%s",
                                chan, nick, userhost);
  Tcl_SetVar(interp, "_woob1", nick ? (char *) nick : "", 0);
  Tcl_SetVar(interp, "_woob2", chan, 0);
  x = check_tcl_bind(H_woob, mask, &fr, " $_woob1 $_woob2",
        MATCH_MASK | BIND_STACKABLE);
  return (x == BIND_EXEC_LOG);
}

Now that we have encountered a condition that triggers the bind type (in code by calling check_tcl_woobie() ), we need to check it against the binds the user has loaded in scripts and see if it matches those conditions. This is done with check_tcl_bind(), called with the bind type, the userhost of the user, the flag record of the user if it exists, the bind arguments, and bind options. We can configure how we want to check the triggering action against the bind, and we can further use the return value from check_tcl_bind() to take additional action by Eggdrop. You can read more about the specific values used in check_tcl_bind in Triggering any Bind

eggdrop-1.10.0/doc/html/tutorials/setup.html0000664000175000017500000010217214703073435017126 0ustar geogeo Setting Up Eggdrop — Eggdrop 1.10.0 documentation

Setting Up Eggdrop¶

This guide was based off perhaps the most helpful Eggdrop website ever written, egghelp.org by slennox. As happens with life, slennox has moved on and no longer updates it, but the information here is still incredibly useful. We have updated his setup page here and hope it will continue to prove useful to our users

Prerequisites¶

Make sure Tcl AND it’s dev packages are installed on your system. On Debian-based systems, this is done with:

sudo apt-get install tcl tcl-dev

It is also STRONGLY recommended to have openssl installed, to enable SSL/TLS protection:

sudo apt-get install openssl libssl-dev

The super-short version¶

You can read the Installation section for a more detailed explanation of these steps.

  1. Download the current version of Eggdrop to your shell via FTP, or simply type: wget geteggdrop.com -O eggdrop-1.10.0.tar.gz

  2. Next, from the commandline of the shell, ensure you are in the same directory that you downloaded the tar file into

  3. Type: tar zxvf eggdrop-1.10.0.tar.gz

  4. Type: cd eggdrop-1.10.0

  5. Type ./configure

  6. Type make config

  7. Type make

  8. Type make install

  9. Type cd ~/eggdrop

  10. For a quick start, edit the eggdrop-basic.conf file. To take advantage of all Eggdrop’s features, we recommend using eggdrop.conf instead. It is also a good idea to rename the file to something easy to remember and specific to your bot, like botnick.conf.

  11. Type ./eggdrop -m <config file>

Getting the source¶

History¶

The current supported version of Eggdrop is the 1.10.x tree. Only the current major version (1.10.x) is supported; earlier major versions are not.

The most current version of Eggdrop, and the one appropriate for most users, is the current 1.10 series. It added many features such as SASL support, multi-ip listening, and a new password hashing module. It is the most complete, feature-rich, and functional version of Eggdrop. If you’re just starting out with Eggdrop, you should use 1.10.0.

Prior to that, the 1.8 series added several major features, to include IPv6 support and SSL/TLS connections. 1.6.21, which is now over 10 years old, was the last release of the 1.6 series. Because Eggdrop remained at the 1.6.21 patchlevel for several years it is still often run by users who have become comfortable with that version and don’t wish to move to a newer version- however, it is getting harder and harder to continue running 1.6 bots on modern Linux systems. Tcl scripts written for bots as far back as the 1.6 series generally work on all later versions of Eggdrop as well, so if you haven’t already- upgrade!

The 1.10 Eggdrop tree is currently under active development and the most recent changes are available in daily snapshots for users to download for testing. While the development snapshot will contain the most current, up-to-date features of Eggdrop, it is not yet considered stable and users stand a higher chance of encountering bugs during use. If you do use it and find a bug, it is highly encouraged to report it via the Eggheads GitHub issues page.

Download locations¶

The developers distribute Eggdrop via two main methods: FTP, and GitHub. For FTP, it is packaged in tarball format (with the .tar.gz filename extension), with the version number in the filename. The Eggdrop 1.10.0 source, for example, would be named eggdrop-1.10.0.tar.gz.

The Eggheads FTP is a repository for the current version of Eggdrop, as well as the most current development snapshot and previous stable releases.

Eggdrop also maintains a GitHub page where you can download the development snapshot or a stable version, via either git commandline or by downloading a tarball. To download via git, type git clone https://github.com/eggheads/eggdrop.git, then cd eggdrop. This gives you the development version. To switch to the most recent stable version, type git checkout stable/1.10. You can then skip to step 4 in the Installation section below.

Installation¶

Installing Eggdrop is a relatively simple process provided your shell has the required tools for successful compilation. On most commercial shell accounts which allow Eggdrop bots you won’t have any problems with installation, but on some private boxes or a shell on your ISP you may experience errors during compilation.

Below is a step by step guide to the installation process. These instructions apply to 1.10 bots. It assumes you will be installing eggdrop-1.10.0.tar.gz, so just change the numbers if you are installing another version.

  1. Put the Eggdrop source on your shell using one of the specified download locations, either by downloading the current version of Eggdrop to your local system and then uploading it to the shell via FTP, or downloading it directly to the shell via the shell’s FTP client, git, wget, or curl. You don’t need to put the .tar.gz file in its own directory (it’ll be done automatically in the next step).

  2. SSH to the shell (if you haven’t already), and type tar zxvf eggdrop-1.10.0.tar.gz (if this doesn’t work, try gunzip eggdrop-1.10.0.tar.gz then tar xvf eggdrop-1.10.0.tar). This will extract the Eggdrop source into its installation directory, named eggdrop-1.10.0.

  3. Type cd eggdrop-1.10.0 switch to the directory the Eggdrop source was extracted to.

  4. Type ./configure (that’s a period followed by a slash followed by the word ‘configure’). This makes sure the shell has all the right tools for compiling Eggdrop, and helps Eggdrop figure out how to compile on the shell.

  5. When configure is done, type make config. This sets up which modules are to be compiled. For a more efficient installation, you can use make iconfig to select the modules to compile, but if you’re not sure just use make config.

  6. Type make. This compiles the Eggdrop. The process takes a brief moment on fast systems, longer on slow systems.

  7. Type make install DEST=~/botdir. This will install Eggdrop into a directory named ‘botdir’ in your home directory. You can change ‘botdir’ to anything you like. Note that in some cases you may need to specify the full path, e.g. make install DEST=/home/cooldude/botdir, using the ~ character in make install won’t always work. You can get the full path by typing pwd.

  8. You can safely delete the installation directory named eggdrop-1.10.0 (to do this, type cd ~ then rm -rf eggdrop-1.10.0) that was created previously, although some people may find it handy to keep that directory for performing additional or future installations of the same version without recompiling.

That’s it! Eggdrop is now installed into its own directory on the shell. It’s time to edit the configuration files to make Eggdrop work the way you want it to.

Configuration¶

You will need to edit the configuration file before you can start up your Eggdrop. You can find the example configuration file in the directory you extracted the Eggdrop source to, under the name ‘eggdrop.conf’. If you downloaded Eggdrop to your system, you can unzip the tarball (.tar.gz) file to its own directory using 7-Zip or a similar program, and view the example config file, botchk file, and all the documentation files locally. You can use Notepad to edit these files, although it’s sometimes desirable to use an editor that supports the Unix file format such as EditPlus. To edit the file once it is on your shell, a program such as ‘nano’ or ‘vim’ is recommended.

Editing the config file¶

Eggdrop comes with two versions of the configuration file- eggdrop.conf and eggdrop-basic.conf. While it is recommended that users edit a copy of eggdrop.conf to take advantage of all the features Eggdrop has to offer, using eggdrop-basic.conf to start will be a quicker path for some. Still, it is recommended that you come back to the full config file at some point to see what you are missing.

It is first recommended to rename the sample config to something other than “eggdrop.confâ€. Giving it the name of the bot’s nick (e.g. NiceBot.conf) is quite common. In the config file, you set up the IRC servers you want the bot to use and set Eggdrop’s options to suit your needs. Eggdrop has many options to configure, and editing the configuration file can take some time. I recommend you go over the entire config file to ensure the bot will be configured properly for your needs. All of the options in the config file have written explanations - be sure to read them carefully. Some of them can be a little bit vague, though.

To comment out a line (prevent the bot from reading that line), you can add a ‘#’ in front of a line. When you come to a line that you need to edit, one popular option is to comment out the original and add your new line right below it. This preserves the original line as an example. For example:

# Set the nick the bot uses on IRC, and on the botnet unless you specify a
# separate botnet-nick, here.
#set nick "Lamestbot"
set nick LlamaBot

Below are some of the common settings used for Eggdrop:

set username:

if your shell runs identd (most do), then you should set this to your account login name.

set vhost4:

you’ll need to set this if you want your bot to use a vhost. This setting lets you choose which IP to use if your shell has multiple. Use vhost4 for an IPv4 address (ie, 1.2.3.4) See also: vhost6

set vhost6:

the same as vhost4, only for IPv6 addresses (ie, 5254:dead:b33f::1337:f270).

logfile:

keeping logs is a good idea. Generally, you should have one log for bot stuff, and one log for each of your channels. To capture bot stuff, add the line logfile mcobxs * "botnick.log" to the config. To capture channel stuff, add logfile jkp #donkeys "#donkeys.log", logfile jkp #horses "#horses.log", etc. Make sure you remove the sample logfile lines for the channel #lamest. If you’d like to put your logfiles in their own directory, specify the directory in the log name (e.g. logfile jkp #donkeys "logs/#donkeys.log" to write the logfiles in the /logs directory).

listen 3333 all:

you will almost certainly want to change this, as 3333 will probably be in use if there are other Eggdrops running on the machine. Generally, you can choose any port from 1024 to 65535, but the 49152-65535 range is best as these are the private/dynamic ports least likely to be reserved by other processes. You can choose not to have a port by commenting this line out, but that will prevent any telnet connections to the bot (you won’t be able to use the bot as a hub, won’t be able to telnet to the bot yourself, and the bot won’t respond to /ctcp botnick CHAT requests).

set protect-telnet:

setting this to 1 is strongly recommended for security reasons.

set require-p:

this is a useful feature allowing you to give party line access on a user-specific basis. I recommend setting it to 1.

set stealth-telnets:

when you telnet to your bot, it will usually display the bot’s nickname and version information. You probably don’t want people seeing this info if they do a port scan on the bot’s shell. Setting this to 1 will prevent the bot from displaying its nickname and version when someone telnets to it.

set notify-newusers:

set this to the nick you will have on the bot. This setting isn’t really used if you have learn-users switched off.

set owner:

you should only put one person in this list - yourself. Set it to the nick you will have on the bot. Do NOT leave it set to the default “MrLame, MrsLameâ€.

set default-flags:

these are the flags automatically given to a user when they introduce themselves to the bot (if learn-users is on) or when they’re added using .adduser. If you don’t want the user to be given any flags initially, set this to “†or “-“.

set must-be-owner:

if you have the .tcl and .set commands enabled, you should definitely set this to 1. In 1.3.26 and later, you can set it to 2 for even better security.

set chanfile:

the chanfile allows you to store ‘dynamic’ channels so that the bot rejoins the channel if restarted. Dynamic channels are those you make the bot join using the .+chan command - they aren’t defined in the config file. The chanfile is good if you frequently add/remove channels from the bot, but can be a pain if you only like to add/remove channels using the config file since settings stored in the chanfile with overwrite those set in the config. You can choose not to use a chanfile by setting it to “â€.

set nick:

this is what you use to specify your bot’s nickname. I recommend against using [ ] { } character’s in the bot’s nick, since these can cause problems with some Tcl scripts, but if you’d like to use them, you’ll need to precede each of those characters with a backslash in the setting, e.g. if you wanted your bot to have the nick [NiceBot], use set nick "\[NiceBot\]".

set altnick:

if you want to use [ ] { } characters in the bot’s alternate nick, follow the backslash rule described previously.

server add:

you should specify multiple servers in this list, in case the bot is unable to connect to the first server. The format for this list is shown below:

server add you.need.to.change.this:6667
server add another.example.com:7000:password
server add [2001:db8:618:5c0:263::]:6669:password
server add ssl.example.net:+6697
set learn-users:

this is an important setting that determines how users will be added to your Eggdrop. If set to 1, people can add themselves to the bot by sending ‘hello’ to it (the user will be added with the flags set in default-flags). If set to 0, users cannot add themselves - a master or owner must add them using the .adduser command.

set dcc-block:

although the example config file recommends you set this to 0 (turbo-dcc), this may cause DCC transfers to abort prematurely. If you’ll be using DCC transfers a lot, set this to 1024.

Finally, be sure to remove the ‘die’ commands from the config (there are two of them ‘hidden’ in various places), or the bot won’t start. Once you’ve finished editing the config file, make sure you rename it to something other than “eggdrop.conf†if you haven’t already. Then, if you edited the config file locally, upload the config file to the directory you installed the bot.

Starting the Eggdrop¶

Phew! Now that you’ve compiled, installed, and configured Eggdrop, it’s time to start it up. Switch to the directory to which you installed the bot, cross your fingers, and type ./eggdrop -m <config> (where <config> is the name you gave to the config file). Eggdrop should start up, and the bot should appear on IRC within a few minutes. The -m option creates a new userfile for your bot, and is only needed the first time you start your Eggdrop. In future, you will only need to type ./eggdrop <config> to start the bot. Make sure you take the time to read what it tells you when you start it up!

Once your bot is on IRC, it’s important that you promptly introduce yourself to the bot. Msg it the ‘hello’ command you specified in the config file, e.g. /msg <botnick> hello. This will make you the bot’s owner. Once that’s done, you need to set a password using /msg <botnick> pass <password>. You can then DCC chat to the bot.

Now that your Eggdrop is on IRC and you’ve introduced yourself as owner, it’s time to learn how to use your Eggdrop!

No show?¶

If your bot didn’t appear on IRC, you should log in to the shell and view the bot’s logfile (the default in the config file is “logs/eggdrop.logâ€).

Additionally, you can kill the bot via the command line (kill pid, the pid is shown to you when you started the bot or can be viewed by running ps x) and then restart it with the -mnt flag, which will launch you directly into the partyline, to assist with troubleshooting. Note that if you use the -t flag, the bot will not persist and you will kill it once you quit the partyline.

If you’re still unsure what the problem is, try asking in #eggdrop on Libera, and be sure to include any relevant information from the logfile. Good luck!

eggdrop-1.10.0/doc/html/tutorials/tlssetup.html0000664000175000017500000003577514703073435017667 0ustar geogeo Enabling TLS Security on Eggdrop — Eggdrop 1.10.0 documentation

Enabling TLS Security on Eggdrop¶

There are several ways TLS encryption can protect communication between your Eggdrop and the world. This guide will walk you through a few common scenarios and how to properly set up TLS protection.

Sidenote: Despite SSL (Secure Socket Layer) encryption being deprecated and no longer secure, the term “SSL†is a bit of an anachronism and still commonly used interchangeably with TLS (Transport Layer Security). If you see the term “SSL†used to describe a secure connection method, to include with within Eggdrop’s own documentation and configuration files, it is probably safe to assume it is actually referring to the secure TLS protocol. If you talk to someone and they use the term “SSL†be sure to correct them, we’re sure they will definitely appreciate it :)

Pre-requisites¶

Your server must have OpenSSL (or an equivalent fork) installed. Most commonly this is done through your OS’s package manager. Both the main package as well as the development headers must be installed. On a Debian/Ubuntu distro, this can be done by running:

apt-get install openssl libssl-dev

where openssl is the main package binaries, and libssl-dev are the development headers. Without these packages, TLS protection is not possible.

You can check if your Eggdrop properly detected the installation of OpenSSL by either reviewing the ./configure output for the following line:

checking for openssl/ssl.h... yes

Or, for an Eggdrop that is already running, you can join the partyline and type:

.status

and look for:

TLS support is enabled.

Connecting to a TLS-enabled IRC server¶

Many, if not most, IRC servers offer connection ports that add TLS protection around the data. Eggdrop uses a ‘+’ symbol in front of the port to denote a port as a TLS-enabled port. To add a server in the config file that supports TLS, add it as normal but simply prefix the port with a ‘+’. For example, if irc.pretendNet.org says it offers TLS on port 7000, you would add it to your configuration file as:

server add irc.pretendNet.org +7000

No other action is necessary.

Protecting Botnet Communications¶

Eggdrop has the ability to protect botnet (direct bot to bot) communications with TLS.

Configuration File Preparation - Generating Keys¶

If an Eggdrop is going to listen/accept connections on a TLS port (more on that in a moment), it must have a public/private certificate pair generated and configured. For most users, a self-signed certificate is sufficient for encryption (a certificate signed by a certificate authority would be more secure, but obtaining one is outside the scope of this tutorial. However, the implementation of a signed keypair is no different than a self-signed pair). To generate a self-signed key pair, enter the Eggdrop source directory (the directory you first compiled Eggdrop from, usually named eggdrop-X.Y.Z) and type:

make sslcert

The wizard will walk you through generating a keypair and will, by default, install to ~/eggdrop (the install location can be changed by “make sslcert DEST=/path/to/eggdrop/installâ€

In your config file, uncomment the “ssl-privatekey†and “ssl-certificate†settings. Eggdrop will look in the directory it is running from (~/eggdrop by default) for the files listed; add an absolute path if you installed them outside of Eggdrop’d directory.

Configuration File Preparation - Listening with TLS¶

Now you need to tell Eggdrop to accept TLS connections. As an example, to listen with TLS on port 5555 on all available IPs, add to the config file:

listen +5555 all

(There are numerous ways to format the listen command; read the config file and documentation for other alternatives)

Connecting to an Eggdrop listening with TLS¶

To connect to a bot listening with TLS, prefix the port number with a ‘+’. For example:

.+bot HubBot 1.2.3.4 +5555

will use TLS to connect to 1.2.3.4 on port 5555 the next time a connection is attempted to HubBot.

Additional Information¶

For additional information and a more thorough explanation of Eggdrop’s TLS implementation, please read the TLS docs

eggdrop-1.10.0/doc/html/tutorials/userfilesharing.html0000664000175000017500000003401014703073435021153 0ustar geogeo Sharing Userfiles — Eggdrop 1.10.0 documentation

Sharing Userfiles¶

One of the great features of Eggdrop is bot linking, allowing you to create your own ‘botnet’. A botnet can consist of two linked bots to as many as hundreds of linked bots. If you’re using an Eggdrop for channel management, the most important feature of linked bots is userfile sharing. With userfile sharing, the bots can keep their user lists, ban lists, and ignore lists in sync with one another. A botnet also has many other possible capabilities, such as allowing bots to op one another securely, and making all bots join a channel with one command.

Linking bots can be a confusing process for first timers, but it’s quite simple if you know how. The first thing you need to do is chose a hub bot. The hub is the main bot which all the other bots on the botnet (which will become leaf bots) connect to. Even if you are only using two bots, it’s best to use one as a hub bot, and the other as a leaf. The hub bot should be the most reliable bot on your botnet, running on a fast, stable, and secure shell - so keep that in mind when deciding which bot will be the hub.

Once you’ve decided on the hub, it’s time to set up the linking.

How to share userfiles- the super-short version¶

(This example steps assume Eggdrop has been compiled with TLS support, and you are sharing all channels)

On the Hub Bot¶

# Ensure you know what ports your bot is listening on, this is set in the config and those ports will be used in the example below. For this example, our config looks like:

listen +3333/+4444 all

# On the hub (for this example, the Hub is called Hubalicious), add the leaf bot (for this example, the Leaf is called LeifErikson) with .+bot LeifErikson <IP_address_of_LiefErikson> +4444/+3333 <LiefErikson_hostmask>.

# On the hub, give the leaf bot the appropriate leaf sharing flags with .botattr LiefErikson +gs.

On the Leaf Bot¶

# Ensure you know what ports your bot is listening on, this is set in the config and those ports will be used in the example below. For this example, our config looks like:

listen +5555/+6666 all

# Now on the leaf, add the hub bot with .+bot Hubalicious <IP_address_of_Hubalicious> +6666/+5555 <Hubalicious hostmask>.

# On the leaf, give the hub bot the appropriate hub and sharing flags with .botattr Hubalicious +ghp.

At this point, the leaf bot should attempt to connect to the hub bot within the next minute, or you can force the link connection with .link Hubalicious. You can also use .bottree to see your botnet structure.

Explaining the Linking/Sharing Process¶

Eggdrop bots can talk to each other for a variety of reasons. In order for an Eggdrop to talk to another Eggdrop for anything, they must link. This is done by adding a bot record the remote bot on the hub bot (In our example above, using .+bot LeifErikson on Hubalicious, and using .+bot Hubalicious on LiefErikson). Once the bot records are added, bots can be manually connected using the .link command.

In the example above, we add the +s bot flag to LiefErikson’s bot record on Hubalicious to tell Hubalicious that LiefErikson is not only allowed to connect, but is authorized to download the userfiles from Hubalicious. Similarly, we add the +p bot flag to Hubalicious’s bot record on LiefErikson to tell LiefErikson that Hubalicous is authorized to send userfiles to LiefErikson. The +h bot flag is added to Hubalicious’s bot record on LiefErikson so tell LiefErikson that Hubalicious is the hub, and it should always try to automatically connect to Hubalicious.

Lastly, the +g flag is used on both bot records to indicate that Hubalicious is authorized to send userfiles for all channels. This is a shortcut method to sharing all channels instead of setting the +shared channel setting on the hub for each channel userfile you wish the hub to share (set via .chanset), and using the |+s #channel bot flag for each channel userfile that the leaf is authorized to receive userfiles from the hub. As an example of channel-specific userfile sharing, you would use .botattr LiefErikson |+s #theforest on Hubalicious to set #theforest as a channel authorized to be shared to LiefErikson, and chanset #theforest +shared to tell LiefErikson to accept the channel userfile for #theforest.

One more commonly used flag is the +a flag. This flag specifies an alternate hub to connect to in case the primary hub goes down. The alternate hub should be linked to hub and maintain all channel userfiles the hub maintains to ensure there is no desynchronization while the hub bot is down. Should the hub bot go down, and assuming the +h flag is set for the hub on a leaf, the leafbost will automatically try to reconnect to the hub every minute, even if it makes a connection with the alternate hub in the meantime. An alternate hub is added the same as a hub, except swapping out the h for the a: .botattr AltRock +agp.

Now that you have a hub and leaf bot successfully connected and sharing userfiles, you can repeat the On the Leaf Bot section to add additional leafs to your hub.

eggdrop-1.10.0/doc/html/tutorials/firstscript.html0000664000175000017500000005067714703073435020356 0ustar geogeo Writing an Eggdrop Script — Eggdrop 1.10.0 documentation

Writing an Eggdrop Script¶

So you want to write an Eggdrop script, but you don’t really know where to begin. This file will give you a very basic idea about what Eggdrop scripting is like, using a very simple script that may help you get started with your own scripts.

This guide assumes you know a bit about Eggdrops and IRC. You should have already installed Eggdrop. The bot should not be on any important or busy channels (development bots can be annoying if your script has bugs). If you plan on doing a lot of development, enable the .tcl and .set commands, and make sure nobody else has access to your bot. The .tcl and .set commands are helpful in debugging and testing your code.

First, read through the script. Very few commands are listed here intentionally, but as you want to develop more advanced scripts, you will definitely want to get familiar with the core Tcl language commands, especially the string- and list-related commands, as well as Eggdrop’s own library of custom Tcl commands, located in tcl-commands.doc

If you have the .tcl command enabled, you can load a script by typing ‘.tcl source script/file.tcl’ to load it. Otherwise, add it to your config file like normal (examples to do so are at the bottom of the config file) and ‘.rehash’ or ‘.restart’ your bot.

Let’s look at a very basic example script that greets users as they join a channel:

# GreetScript.tcl
# Version: 1.0
# Author: Geo <geo@eggheads.org>
#
# Description:
# A simple script that greets users as they join a channel
#
### Config Section ###
# How would you like the bot to gree users?
# 0 - via public message to channel
# 1 - via private message
set pmsg 0
# What message would you like to send to users when they join?
set greetmsg "Hi! Welcome to the channel!"
### DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING! ###

bind join - * greet

proc greet {nick uhost hand chan} {
  global pmsg
  global greetmsg
  if {$pmsg} {
    putserv "PRIVMSG $nick :$greetmsg"
  } else {
    putserv "PRIVMSG $chan :$greetmsg"
  }
}

putlog "greetscript.tcl v1.0 by Geo"

Whew! There’s a lot going on here. You’ll generally see scripts broken into a few key parts- the header, the config section, and the code section. Ok, let’s go over this piece by piece. First, the header of the script:

# GreetScript.tcl
# Version: 1.0
# Author: Geo <geo@eggheads.org> or #eggdrop on Libera
#
# Description:
# A simple script that greets users as they join a channel

Any line prefixed by a # means it is comment, and thus ignored. You can type whatever you want, and it won’t matter. When writing scripts (especially if you want to give them to other people, it is good to use comments in the code to show what you’re doing. Here though, we use it to describe what the script is and, most importantly, who wrote it! Let’s give credit where credit is due, right? You may want to give users a way to contact you as well.

Next, let’s look at the configuration section:

### Config Section ###
# How would you like the bot to gree users?
# 0 - via public message to channel
# 1 - via private message
set pmsg 0
# What message would you like to send to users when they join?
set greetmsg "Hi! Welcome to the channel!"
### DO NOT EDIT BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING! ###

To make scripts easy to use, you’ll want to have a section that allows users to easily change the way the script operates, without having to edit the script itself. Here, we have two settings: one that controls which method the Eggdrop uses to greet a user, and a second with the message to greet the user with. Sure, we could hard-code that into the code section below, but in larger scripts that makes things harder to find, and also forces you to potentially have to make the same change multiple times in code. Why not make it simple and do it once, up top? Notice the settings do not have #s in front of them- they are variables that will be used by the script later on. And of course, the standard ominous warning not to change anything below!

Now, let’s look start to dissect the actual code!:

bind join - * greet

This is a bind. This sets up an action that Eggdrop will react to. You can read all the binds that Eggdrop uses here. Generally, we like to place all binds towards the top of the script so that they are together and easy to find. Now, let’s look at documentation of the bind join together.

bind JOIN

bind join <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel>

Description: triggered by someone joining the channel. The mask in the bind is matched against “#channel nick!user@host†and can contain wildcards.

So here, we can start to match the bind listed in the code to how it is described in the documentation. The first term after the bind command is ‘join’, showing that it is a join bind, which means the action we define here will take place each time a user joins a channel. The next term is ‘mask’, and it says it is in the form “#channel nick!user@hostâ€. This is where we can start to refine exactly when this bind is triggered. If we want it to work for every person joining every channel Eggdrop is on, then a simple ‘*’ will suffice here- that will match everything. If we wanted this bind to only work in #foo, then the mask would be “#foo *â€. If we wanted to greet users on every channel, but only those who are on AOL, the mask would be “* *!*@*.aol.comâ€. Finally the ‘proc’ argument is the name of the Tcl proc we want to call, where the code that actually does stuff is located.

So to sum up this line from the example script: When a user joins on any channel and with any hostmask, run the code located in proc ‘greet’.

Now that we told the Eggdrop what action to look for, we need to tell it what to do when that action occurs!:

proc greet {nick uhost hand chan} {

This is how we declare a Tcl proc. As we said above, this is where the magic happens. To set up the proc (this will look differently for different binds), lets refer back to the bind JOIN documentation. The second line shows procname <nick> <user@host> <handle> <channel>. Eggdrop does a lot of stuff in the background when a bind is triggered, and this is telling you how Eggdrop will present that information to you. Here, Eggdrop is telling you it is going to pass the proc you created four variables: One that contains the nickname of the person who triggered the bind (in this case, the user who joined), the user@host of that user, the handle of that user (if the user has one on the bot), and the channel that the bind was triggered on.

So let’s say someone with the nickname Geo with a hostmask of awesome@aol.com joined #sexystuff and that person is not added to the bot as a user. Eggdrop will pass 4 values to the variables you set up in that proc: The first variable will get the value “Geoâ€, the second “awesome@aol.comâ€, the third “*â€, and the fourth “#sexystuffâ€. (That third value was a trick, we didn’t talk about that- if the user is not added to the bot, handle will get a “*†as a value). Now, let’s use those variables!:

global pmsg
global greetmsg

This is a simple one- because we’re using variables declared in the main body of the script (remember way up top?), we have to tell this proc to use that variable, not not create a new local variable for this proc.

And finally, let’s actually send a message to the user:

if {pmsg}
  putserv "PRIVMSG $nick :$greetmsg"
} else {
  putserv "PRIVMSG $chan :$greetmsg"
}

Here, we’re going to check if pmsg is true (any value that is not 0) and, if yes, send a private message to the user. If pmsg is not true (it is 0), then we will send the message to the channel. You can see that the first putserv message sends a PRIVMSG message to $nick - this is the nickname of the user that joined, and that Eggdrop stored for us in the first variable of the proc, which we called ‘nick’. The second putserv message will send a PRIVMSG message to the $chan - this is the channel the user joined, and that Eggdrop stored for us in the fourth variable of the proc, which we called ‘chan’.

And finally: get the credit you deserve when the script loads!:

putlog "greetscript.tcl v1.0 by Geo"

Like your variables at the top of the script, this line is not inside a Tcl proc and will execute when the script is loaded. You can put this or any other initialization code you want to run.

And there you have it- your first script! Take this, modify it and experiment. A few challenges for you:

  • How can you configure which channel it should run on, without hard-coding it into the bind? (Maybe with a variable…)

  • How can you configure it to only message a user with the nickname “FancyPantsâ€? (Sounds like something a bind could handle)

  • How can you delay the message from sending by 5 seconds? (Hint: utimer)

  • How can you send different messages to different channels? (A new setting may be in order…)

  • How can you get the bot to not greet itself when it joins the channel? (Eggdrop stores its own nickname in a variable called $botnick)

  • How can you add the person joining the channel’s nickname to the greet message? (You can put variables inside variables…)

If you want to try these out, join #eggdrop on Libera and check your answers (and remember, there are dozens of ways to do this, so a) don’t be defensive of your choices, and b) take others’ answers with a grain of salt!)

Copyright (C) 2003 - 2024 Eggheads Development Team

eggdrop-1.10.0/doc/PARTYLINE0000664000175000017500000000346414703073435013404 0ustar geogeoLast revised: December 31, 2001 The Party Line The most important way you will communicate with your bot is through the party line. The party line is accessible via DCC chat or telnet. It's pretty much just a miniature, lag-less IRC (see doc/BOTNET), but it also consists of a console through which you can watch channel activity and give commands. To enter the party line, DCC chat or open a telnet connection to your bot. It should ask for your password if you've set one. If you don't have one set, use the /msg PASS command to set one. The party line is actually split up into 200,000 "channels". The console is available from each channel, but you can only talk to people who are on your current channel (just like IRC). Channel 0 is the main party line, while others are typically reserved for private conversations. Channels 1-99,999 are botnet wide chat channels and any user joining that channel anywhere on the botnet will be able to chat with you. Channels *0-*99,999 are local channels (only people on the bot you are on can chat with you on these channels). Console commands start with a dot (.), similar to the slash (/) used for IRC commands. At any time, you can type ".help all" to get a list of all possible commands. To find out what a command does, use ".help ". For example: ".help channel". When you're on the party line, anything you type that doesn't start with a dot (.), a comma (,), or an apostrophe (') is considered to be broadcast to everyone else, just like talking on a channel. A message prefixed with a comma goes only to other bot owners (+n). A message prefixed with an apostrophe is sent to all users on the local bot only. You can change channels with the ".chat" command or even leave all channels with ".chat off". Copyright (C) 2002 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/Makefile.in0000664000175000017500000001112714703073435014152 0ustar geogeo# Makefile for doc/ SHELL = @SHELL@ top_srcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ @SET_MAKE@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ DOCS = ABOUT BANS BOTNET BUG-REPORT COMPILE-GUIDE CONTENTS \ Changes1.9 FIRST-SCRIPT IPV6 IRCv3 LEGAL PARTYLINE PATCH-HOWTO \ PBKDF2 TLS TRICKS USERS Versions tcl-commands.doc twitch-tcl-commands.doc MAN1 = man1/eggdrop.1 WEB_ROOT = $(srcdir)/html/*.html WEB_ABOUT = $(srcdir)/html/about/*.html WEB_INSTALL = $(srcdir)/html/install/*.html WEB_MOD = $(srcdir)/html/modules/*.html WEB_TUT = $(srcdir)/html/tutorials/*.html WEB_USE = $(srcdir)/html/using/*.html WEB_STAT = $(srcdir)/html/_static/* SETTING_DOCS = core.settings CONTENTS SETTING_MOD_DOCS = $(srcdir)/settings/mod.* doofus: @echo "" @echo "Let's try this from the right directory..." @echo "" @cd .. && $(MAKE) all: $(DOCS) $(MAN1) clean: @rm -f *~ install: @if test ! -d $(DEST)/doc; then \ echo "Creating 'doc' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc >/dev/null; \ fi @if test ! -d $(DEST)/doc/man1; then \ echo "Creating 'doc/man1' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/man1 >/dev/null; \ fi @if test ! -d $(DEST)/doc/html; then \ echo "Creating 'doc/html' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/html >/dev/null; \ fi @if test ! -d $(DEST)/doc/html/about; then \ echo "Creating 'doc/html/about' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/html/about >/dev/null; \ fi @if test ! -d $(DEST)/doc/html/install; then \ echo "Creating 'doc/html/install' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/html/install >/dev/null; \ fi @if test ! -d $(DEST)/doc/html/modules; then \ echo "Creating 'doc/html/modules' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/html/modules >/dev/null; \ fi @if test ! -d $(DEST)/doc/html/tutorials; then \ echo "Creating 'doc/html/tutorials' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/html/tutorials >/dev/null; \ fi @if test ! -d $(DEST)/doc/html/using; then \ echo "Creating 'doc/html/using' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/html/using >/dev/null; \ fi @if test ! -d $(DEST)/doc/html/_static; then \ echo "Creating 'doc/html/_static' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/html/_static >/dev/null; \ fi @if test ! -d $(DEST)/doc/settings; then \ echo "Creating 'doc/settings' subdirectory."; \ $(top_srcdir)/misc/mkinstalldirs $(DEST)/doc/settings >/dev/null; \ fi @echo "Copying docs." @for i in $(DOCS); do \ $(INSTALL_DATA) $(srcdir)/$$i $(DEST)/doc/; \ done @for i in $(MAN1); do \ $(INSTALL_DATA) $(srcdir)/$$i $(DEST)/doc/man1/; \ done @for i in $(SETTING_DOCS); do \ $(INSTALL_DATA) $(srcdir)/settings/$$i $(DEST)/doc/settings/; \ done @if test "x`echo $(SETTING_MOD_DOCS)`" != "x$(SETTING_MOD_DOCS)"; then \ for i in `echo $(SETTING_MOD_DOCS)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/settings/; \ done; \ fi @if test "x`echo $(WEB_ROOT)`" != "x$(WEB_ROOT)"; then \ for i in `echo $(WEB_ROOT)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/html/; \ done; \ fi @if test "x`echo $(WEB_ABOUT)`" != "x$(WEB_ABOUT)"; then \ for i in `echo $(WEB_ABOUT)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/html/appendices; \ done; \ fi @if test "x`echo $(WEB_INSTALL)`" != "x$(WEB_INSTALL)"; then \ for i in `echo $(WEB_INSTALL)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/html/install; \ done; \ fi @if test "x`echo $(WEB_MOD)`" != "x$(WEB_MOD)"; then \ for i in `echo $(WEB_MOD)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/html/modules; \ done; \ fi @if test "x`echo $(WEB_TUT)`" != "x$(WEB_TUT)"; then \ for i in `echo $(WEB_TUT)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/html/tutorials; \ done; \ fi @if test "x`echo $(WEB_USE)`" != "x$(WEB_USE)"; then \ for i in `echo $(WEB_USE)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/html/using; \ done; \ fi @if test "x`echo $(WEB_STAT)`" != "x$(WEB_STAT)"; then \ for i in `echo $(WEB_STAT)`; do \ $(INSTALL_DATA) $$i $(DEST)/doc/html/_static; \ done; \ fi eggdrop-1.10.0/doc/Changes0.60000664000175000017500000002056714703073435013634 0ustar geogeoEggdrop Changes (starting with 0.6c) _____________________________________________________________________ 0.6r (April 4, 1994): # Released by: Robey [Robey Pointer ] - When switching servers, it used to think it was on the channel again even if it wasn't -- fixed - Used to crash when receiving really long one-word msgs -- fixed 0.6q (April 2, 1994): # Released by: Robey [Robey Pointer ] - 'pass' with 2 parameters changes your password now - 'info' with no parameters shows your current info - Host masking is better now - Master-command '.info' to retrieve someone's info - New msg command 'who' to show all users info 0.6p (April 1, 1994): # Released by: Robey [Robey Pointer ] - 'help' works a little better but is still sparse - 'pass', 'info', 'ident' cleaned up and show standard-looking console entries now - 'op' and 'invite' converted to standard console entries - Can't set your password too long now - New command '.match' to look up users by matching a nickname wildcard, or by attributes (precede with '+': ie, '+m' to find masters) 0.6o (March 31, 1994): # Released by: Robey [Robey Pointer ] - 'hello' actually programmed in :) - People recognized by the bot (who have a password set) can get a new hostmask recognized via msg: 'ident ' - People who get lost in netsplits aren't logged with log-joins=off now (oops) - New file misc.c created to better modularize the code - 'pass ' from someone the bot knows who doesn't have a password set, will set a password for them - 'info ' will set your join info, assuming the bot is using infofile 0.6n (March 30, 1994): # Released by: Robey [Robey Pointer ] - (happy birthday brandon!) - 'yes'/'no'/'true'/'false'/'y'/'n'/'t'/'f' can be used in SET - learn-users (new set variable) allows new members to the channel to send a 'hello' to the bot and get in the user list (if not already there) - Very pointless old helpbot code removed -- no plans for any helpbot support in the future 0.6m (March 28, 1994): # Released by: Robey [Robey Pointer ] - 'host unreachable' trapped now 0.6l (March 22, 1994): # Released by: Robey [Robey Pointer ] - New configfile variable 'infofile' for user info lines - New configfile set 'greet' to turn on/off auto-greet using the infofile (will check the infofile for a handle that matches the one found for the user joining, and if found, will dump that line to the channel) 0.6k (March 17, 1994): # Released by: Robey [Robey Pointer ] - Remembers what dcc directory you were last in (stored in user file) - Fixed extra-space bug in updating file list - Will show handle in '.channel' if it can find one for that user - Can change description now, but still can't add one - Time/date stamps notes in the notefile - desc works now 0.6j (March 16, 1994): # Released by: Robey [Robey Pointer ] - '.note' works for non-masters now (it was supposed to all along) - A '.note' while that user is online is treated like a private message -- that was always true -- but now it looks more like one - Ban list in '.channel' tries to conserve space now, and should show bans placed by servers (instead of claiming "unknown") - Acknowledges successful file receive and adds it to the incoming directory list now 0.6i (March 14, 1994): # Released by: Robey [Robey Pointer ] - Won't babble about how it's reversing illegal mode changes if it's not even op'd - mkdir/rmdir work now - 60 seconds flood instead of 1 for flood detect (and it works now) 0.6h (March 11, 1994): # Released by: Robey [Robey Pointer ] - Fixed dcc chat connection to IP numbers -- it works now (hostname lookup not required) - Config parameter 'dccdir' changed to 'dcc-path' (this is the start location of any file transfer user) - New config parameter 'dcc-incoming' which is the path to store uploaded files -- if you leave it undefined, nobody can upload - Made it so the master-only file system commands actually require you to be a master (oops) - New file system commands: 'import', 'hide', 'rm', 'mkdir', 'rmdir' for masters (file system is starting to become a bit more respectable) - Eggdrop will warn you if it doesn't understand (and therefore is going to ignore) a line in its config file - Extra frivolous command '.me' added (public actions) 0.6g (March 10, 1994): # Released by: Robey [Robey Pointer ] - Removed old clumsy and stupid ignore code - People on the ignore list only have msgs, notices, and ctcp's ignored now, not vital information like kicks, joins, etc (duh) - Flooding via msg or notice is activated by 5 from the same host in 1 second, and results in that host being added to the ignore list - Flooding a channel with msgs, notices, or nick changes is activated by 10 from the same host in 1 second, and results in a kick from the channel - Flooding via ctcp (to the bot or channel) is activated by 5 from the same host in 1 second, and results in that host being added to the ignore list, AND the user being kicked from the channel, if they are on it 0.6f (March 9, 1994): # Released by: Robey [Robey Pointer ] - New command line option -c when used with -n, which will dump a '.channel' and '.status' output to the terminal every 10 seconds - New command line option -t when used with -n, which makes the terminal appear as another member of the party line - Mode changes made by someone who gained ops via server (and isn't in the op-list) are reversed and a kick is sent out for them -- an auto-deop is sent out for each invalid server op but sometimes users can make quick mode changes before the deop propagates -- this controls the damage 0.6e (March 7, 1994): # Released by: Robey [Robey Pointer ] - Got rid of warning messages from net.c - Only shows nickname of person who placed the ban in '.channel' - Shortened date/time listing in '.channel' of when a user joined the channel -- now it's "15:45" or "14Mar" or "dunno" - No longer crashes horribly when it can't get the telnet port it wants (used to go into an infinite loop!) - The 'log' command now can be used as 'log ' which will show you log entries from mins ago until mins ago - Fixed ignore bug (ignore works now on users who also have an entry in the user list) - If it can't get the telnet port it wants, it will keep trying the next port till it's tried 20 -- THEN it will give up; ie configfile port 2000 could get assigned port 2000 through 2020 - Five msgs/etc from the same host in one second are now considered a flood and get that host put on the ignore list - Closes dcc sockets on dying now (oops!) 0.6d (March 3, 1994): # Released by: Robey [Robey Pointer ] - IP number connections were using negative values (eek!) - fixed - No more "mode change on nonexistent" when kickbanning - 'op' and 'deop' won't let you op/deop people not on the channel, or op a deop-listed person, or deop and op-listed person - Now supports server entries like 'hub.cs.jmu.edu:6665' to allow other ports besides 6667 - Can msg bot 'invite [pass]' to get invited to a +i channel - Separated a new file 'users.c' from 'chanprog.c' to keep modularity - New notes function... store notes for masters or op-listers when they're offline: configfile 'notefile ' -- command '.note ' - New command 'log [#]' will show the log file for the past # minutes (or default of 60 = 1 hour) 0.6c (March 2, 1994): # Released by: Robey [Robey Pointer ] - Tried to fix hostname lookup for dcc chat - will attempt to connect via IP number now - New +console,-console to turn on/off console for non-masters - Fixed (?) bus error when -ignore or -ban on the last ignore/ban - Using -master or +master on someone on the party line will now have an immediate effect (no more leaving & rejoining) eggdrop-1.10.0/doc/core.settings0000664000175000017500000005777214703073435014637 0ustar geogeoLast revised: August 29, 2023 Eggdrop Core Settings This file describes the syntax and all the settings of your Eggdrop configuration file. Please note that you don't need to set all of these variables to make your bot work properly. EXECUTABLE PATH The first line in an Eggdrop configuration file should contain a fully qualified path to your Eggdrop executable. It has to be implemented in the way the example shows to make the config file work as a shell script. Example: #! /path/to/eggdrop BASIC SETTINGS You can change the basic Eggdrop appearance and behavior in this section. set username "lamest" This setting defines the username the bot uses on IRC. This setting has no effect if an ident daemon is running on your bot's machine. set admin "Lamer " This setting defines which contact person should be shown in .status, /msg help, and other places. You really should include this information. set network "SomeIrcNetwork" This setting is used only for info to share with others on your botnet. Set this to the IRC network your bot is connected to. set timezone "EST" This setting defines which timezone is your bot in. It's used for internal routines as well as for logfile timestamping and scripting purposes. The timezone string specifies the name of the timezone and must be three or more alphabetic characters. For example, Central European Time(UTC+1) should be "CET". set offset "5" The offset setting specifies the time value to be added to the local time to get Coordinated Universal Time (UTC aka GMT). The offset is positive if the local timezone is west of the Prime Meridian and negative if it is east. The value (in hours) must be between -23 and 23. For example, if the timezone is UTC+1, the offset is -1. set env(TZ) "$timezone $offset" (disabled by default) If you don't want to use the timezone setting for scripting purposes only, but instead everywhere possible, then use this setting. set vhost4 "99.99.0.0" set vhost4 "virtual.host.com"   If you're using virtual hosting (your machine has more than 1 IP), you may want to specify the particular IP to bind to. You can specify either by hostname or by IP. Note that this is not used for listening. Use the 'listen' command to specify the listening address. set vhost6 "2001:db8:618:5c0:263::" set vhost6 "my.ipv6.host.com"   IPv6 vhost to bind to for outgoing IPv6 connections. You can set it to any valid IPv6 address or hostname, resolving to an IPv6 address. Note that this is not used for listening. Use the 'listen' command to specify the listening address. set prefer-ipv6 "1" Prefer IPv6 over IPv4 for connections and dns resolution. If the preferred protocol family is not supported, other possible families will be tried. addlang "english" If you want to have your Eggdrop messages displayed in another language, change this command to match your preferences. An alternative would be to set the environment variable EGG_LANG to that value. Languages included with Eggdrop: Danish, English, French, Finnish, German. LOG FILES Eggdrop is capable of logging various things, from channel chatter to partyline commands and file transfers. Logfiles are normally kept for 24 hours. Afterwards, they will be renamed to "(logfilename).yesterday". After 48 hours, they will be overwritten by the logfile of the next day. set max-logs 20 This is the maximum number of concurrent logfiles that can be opened for writing at one time. At most, this value should be the maximum number of channels you expect to create log files for. There is no value for 'infinity'; very few cases should ever require more than 20. A decrease to this value while running will require a restart (not rehash) of the bot. However, don't decrease it below 5. set max-logsize 0 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 set to 0 (OFF). set raw-log 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 incoming botnet traffic via console/log mode 't', raw outgoing botnet traffic via console/log mode 'u', raw outgoing share traffic via console/log mode 'g', and raw incoming 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. logfile "logs/logfile" This setting tells the bot what should be logged, from where, and to which file. Logfile flags: --- ------------------------------------------------------ b information about bot linking and userfile sharing c commands d misc debug information g raw outgoing share traffic h raw incoming share traffic j joins, parts, quits, and netsplits on the channel k kicks, bans, and mode changes on the channel l linked bot messages 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 incoming botnet traffic u raw outgoing 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 "*". Examples: logfile mco * "logs/eggdrop.log" logfile jpk #lamest "logs/lamest.log" In 'eggdrop.log', put private msgs/ctcps, commands, misc info, and errors from any channel. In 'lamest.log', log all joins, parts, kicks, bans, public chatter, and mode changes from #lamest. set log-time 1 Use this feature to timestamp entries in the log file. set timestamp-format "[%H:%M:%S]" Set the following to the timestamp for the logfile entries. Popular times might be "[%H:%M]" (hour, min), or "[%H:%M:%S]" (hour, min, sec). Read 'man strftime' for more formatting options. Keep it below 32 chars. set keep-all-logs 0 If you want to keep your logfiles forever, turn this setting on. All logfiles will get the 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 switch-logfiles-at 300 You can specify when Eggdrop should switch logfiles and start fresh. use military time for this setting. 300 is the default, and describes 03:00 (AM). set quiet-save 0 "Writing user file..." and "Writing channel file..." messages won't be logged anymore if this option is enabled. If you set it to 2, the "Backing up user file..." and "Backing up channel file..." messages will also not be logged. In addition to this, you can disable the "Switching logfiles..." and the new date message at midnight, by setting this to 3. set logfile-suffix ".%d%b%Y" 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. CONSOLE SETTINGS set console "mkcoblxs" This is the default console mode. It uses the same event flags as the log files do. The console channel is automatically set to your "primary" channel, which is set in the modules section of the config file. Masters can change their console channel and modes with the '.console' command. FILE AND DIRECTORY SETTINGS set userfile "LamestBot.user" Specify here the filename your userfile should be saved as. set pidfile "pid.LamestBot" Specify here the filename Eggdrop will save its pid to. If no pidfile is specified, pid.(botnet-nick) will be used. set help-path "help/" Specify here where Eggdrop should look for help files. Don't modify this setting unless you know what you're doing! set text-path "text/" Specify here where Eggdrop should look for text files. This is used for certain Tcl and DCC commands. set motd "text/motd" The MOTD (Message Of The day) is displayed when people dcc chat or telnet to the bot. Look at doc/TEXT-SUBSTITUTIONS for options. set telnet-banner "text/banner" This banner will be displayed on telnet connections. Look at doc/text-substitutions.doc for options. set userfile-perm 0600 This specifies what permissions the user, channel, and notes files should be set to. The octal values are the same as for the chmod system command. To remind you: | u g o u g o u g o |0600 rw------- 0400 r-------- 0200 -w------- u - user |0660 rw-rw---- 0440 r--r----- 0220 -w--w---- g - group |0666 rw-rw-rw- 0444 r--r--r-- 0222 -w--w--w- o - others Note that the default 0600 is the most secure one and should only be changed if you need your files for shell scripting or other external applications. set mod-path "modules/" This path specifies the path were Eggdrop should look for its modules. If you run the bot from the compilation directory, you will want to set this to "". If you use 'make install' (like all good kiddies do ;), this is a fine default. Otherwise, use your head :). BOTNET/DCC/TELNET SETTINGS Settings in this section should be unimportant for you until you deal with botnets (multiple Eggdrops connected together to maximize efficiency). You should read doc/BOTNET before modifying these settings. set botnet-nick "LlamaBot" (disabled by default) If you want to use a different nickname on the botnet than you use on IRC (i.e. if you're on an un-trusted botnet), un-comment this line and set it to the nick you would like to use. listen This opens a telnet port by which you and other bots can interact with the Eggdrop by telneting in. There are more options for the listen command in doc/tcl-commands.doc. Note that if you are running more than one bot on the same machine, you will want to space the telnet ports at LEAST 5 apart, although 10 is even better. Valid ports are typically anything between 1025 and 65535 assuming the port is not already in use. If you would like the bot to listen for users and bots in separate ports, use the following format: listen 3333 bots listen 4444 users If you wish to use only one port, use this format: listen 3333 all You can setup a SSL port by prepending a plus sign to it: listen +5555 all You need to un-comment this line and change the port number in order to open the listen port. You should not keep this set to 3333. set remote-boots 2 This setting defines whether or not people can boot users on the Eggdrop from other bots in your botnet. Valid settings are: --- ---------------------------- 0 allow no outside boots 1 allow boots from sharebots 2 allow any boots --- ---------------------------- set share-unlinks 1 This setting prohibits Eggdrop to unlink from share bots if an remote bots tells so. set protect-telnet 0 This setting will drop telnet connections not matching a known host. set dcc-sanitycheck 0 This setting will make the bot ignore DCC chat requests which appear to have bogus information on the grounds that the user may have been trying to make the bot connect to somewhere that will get it into trouble, or that the user has a broken client, in which case the connect wouldn't work anyway. set ident-timeout 5 This setting defines the time in seconds the bot should wait for ident reply before the lookup fails. The default ident on timeout is 'telnet'. set require-p 0 Define here whether or not a +o user still needs the +p flag to dcc the bot. set open-telnets 0 If you want people allow to telnet in and type 'NEW' to become a new user, set this to 1. This is similar to the 'hello' msg command. The protect-telnet setting must be set to 0 to use this. set stealth-telnets 0 If you don't want Eggdrop to identify itself as an Eggdrop on a telnet connection, set this setting to 1. Eggdrop will display 'Nickname' instead. set use-telnet-banner 0 If you want Eggdrop to display a banner when telneting in, set this setting to 1. The telnet banner is set by 'set telnet-banner'. set connect-timeout 15 This setting defines a time in seconds that the bot should wait before a dcc chat, telnet, or relay connection times out. set dcc-flood-thr 3 Specify here the number of lines to accept from a user on the partyline within 1 second before they are considered to be flooding and therefore get booted. set telnet-flood 5:60 Define here how many telnet connection attempts in how many seconds from the same host constitute a flood. The correct format is Attempts:Seconds. set paranoid-telnet-flood 1 If you want telnet-flood to apply even to +f users, set this setting to 1. set resolve-timeout 15 Set here the amount of seconds before giving up on hostname/address lookup (you might want to increase this if you are on a slow network). ADVANCED SETTINGS set firewall "!sun-barr.ebay:3666" Set this to your socks host if your Eggdrop sits behind a firewall. If you use a Sun "telnet passthru" firewall, prefix the host with a "!". set nat-ip "127.0.0.1" If you have a NAT firewall (you box has an IP in one of the following ranges: 192.168.0.0-192.168.255.255, 172.16.0.0-172.31.255.255, 10.0.0.0-10.255.255.255 and your firewall transparently changes your address to a unique address for your box) or you have IP masquerading between you and the rest of the world, and /dcc chat, /ctcp chat or userfile sharing aren't working, enter your outside IP here. This IP is used for transfers only, and has nothing to do with the vhost4/6 or listen settings. You may still need to set them. set reserved-portrange 2010:2020 If you want all dcc file transfers to use a particular portrange either because you're behind a firewall, or for other security reasons, set it here. set ignore-time 15 Set the time in minutes that temporary ignores should last. set hourly-updates 00 Define here what Eggdrop considers 'hourly'. All calls to it, including such things as note notifying or userfile saving, are affected by this. Example: set hourly-updates 15 The bot will save its userfile 15 minutes past every hour. set owner "MrLame, MrsLame" Un-comment this line and set the list of owners of the bot. You NEED to change this setting. set notify-newusers "$owner" Who should a note be sent to when new users are learned? set default-flags "hp" Enter the flags that all new users should get by default. See '.help whois' on the partyline for a list of flags and their descriptions. set whois-fields "url birthday" Enter all user-defined fields that should be displayed in a '.whois'. This will only be shown if the user has one of these extra fields. You might prefer to comment this out and use the userinfo1.0.tcl script which provides commands for changing all of these. #unbind dcc n tcl *dcc:tcl #unbind dcc n set *dcc:set Uncomment these two lines if you wish to disable the .tcl and .set commands. If you select your owners wisely, you should be okay leaving these enabled. set must-be-owner 1 If you enable this setting, only permanent owners (owner setting) will be able to use .tcl and .set. Moreover, if you want to only let permanent owners use .dump, then set this to 2. unbind dcc n simul *dcc:simul Comment out this line to add the 'simul' partyline command (owners can manipulate other people on the party line). Please select owners wisely and use this command ethically! set max-dcc 50 Set here the maximum number of dcc connections you will allow. You can increase this later, but never decrease it. set allow-dk-cmds 1 Enable this setting if you want +d & +k users to use commands bound as -|-. set dupwait-timeout 5 If your Eggdrop rejects bots that actually have already disconnected from another hub, but the disconnect information has not yet spread over the botnet due to lag, use this setting. The bot will wait dupwait-timeout seconds before it checks again and then finally reject the bot. set cidr-support 0 Enables cidr support for b/e/I modes if set to 1. This means the bot will understand and match modes in cidr notation, and will be able to put and enforce such bans or unban itself, if banned with a cidr mask. Do NOT set this, if your network/server does not support cidr! SSL SETTINGS Settings in this section take effect when eggdrop is compiled with TLS support. set ssl-privatekey "eggdrop.key" File containing your private key, needed for the SSL certificate (see below). You can create one issuing the following command: openssl genrsa -out eggdrop.key 4096 It will create a 4096 bit RSA key, strong enough for eggdrop. This is required for SSL hubs/listen ports, secure file transfer and /ctcp botnick schat For your convenience, you can type 'make sslcert' after 'make install' and you'll get a key and a certificate in your DEST directory. set ssl-certificate "eggdrop.crt" Specify the filename where your SSL certificate is located. If you don't set this, eggdrop will not be able to act as a server in SSL connections, as with most ciphers a certificate and a private key are required on the server side. Must be in PEM format. If you don't have one, you can create it using the following command: openssl req -new -key eggdrop.key -x509 -out eggdrop.crt -days 365 This is required for SSL hubs/listen ports, secure file transfer and /ctcp botnick schat For your convenience, you can type 'make sslcert' after 'make install' and you'll get a key and a certificate in your DEST directory. set ssl-verify-depth 9 Sets the maximum depth for the certificate chain verification that shall be allowed for ssl. When certificate verification is enabled, any chain exceeding this depth will fail verification. set ssl-capath "/etc/ssl/" set ssl-cafile ""   Specify the location at which CA certificates for verification purposes are located. These certificates are trusted. If you don't set this, certificate verification will not work. set ssl-ciphers "" Specify the list of ciphers (in order of preference) allowed for use with ssl. The cipher list is one or more cipher strings separated by colons, commas or spaces. Unavailable ciphers are silently ignored unless no usable cipher could be found. For the list of possible cipher strings and their meanings, please refer to the ciphers(1) manual. Note: if you set this, the value replaces any ciphers OpenSSL might use by default. To include the default ciphers, you can put DEFAULT as a cipher string in the list. For example: set ssl-ciphers "DEFAULT ADH" ... will make eggdrop allow the default OpenSSL selection plus anonymous DH ciphers. set ssl-ciphers "ALL" ... will make eggdrop allow all ciphers supported by OpenSSL, in a reasonable order. set ssl-cert-auth 0 Enable certificate authorization. Set to 1 to allow users and bots to identify automatically by their certificate fingerprints. Setting it to 2 to will force fingerprint logins. With a value of 2, users without a fingerprint set or with a certificate UID not matching their handle won't be allowed to login on SSL enabled telnet ports. Fingerprints must be set in advance with the .fprint and .chfinger commands. NOTE: this setting has no effect on plain-text ports. You can control SSL certificate verification using the following variables. All of them are flag-based. You can set them by adding together the numbers for all exceptions you want to enable. By default certificate verification is disabled and all certificates are assumed to be valid. The options are the following: ---- --------------------------------------------- 0 disable verification 1 enable certificate verification 2 allow self-signed certificates 4 don't check peer common or alt names 8 allow expired certificates 16 allow certificates which are not valid yet 32 allow revoked certificates ---- --------------------------------------------- set ssl-verify-dcc 0 Control certificate verification for DCC chats (only /dcc chat botnick) set ssl-verify-bots 0 Control certificate verification for linking to hubs set ssl-verify-clients 0 Control certificate verification for SSL listening ports. This includes leaf bots connecting, users telneting in and /ctcp bot chat. MODULES After the core settings, you should start loading modules. Modules are loaded by the command "loadmodule ". Eggdrop looks for modules in the directory you specified by the module-path setting in the files and directories section. Please note that for different configurations, different modules are needed. Four examples: Channel Security Bot: This bot needs the channels, blowfish, console, dns, irc, and (if you like) ctcp modules loaded. More is not needed and makes the bot slower. Public IRC Bot: A public bot should have all modules available loaded since they provide all functions for everyday use. Secure Filesys Bot: This bot needs all normal IRC operating modules, but not the notes, seen, ctcp or share modules. Limbo Bot: A limbo bot (serves as a botnet hub outside IRC) just needs the channels, console, dns, and maybe notes or share modules loaded. Of course, an encryption module needs to be loaded here, too. SCRIPTS The scripts section should be placed at the end of the config file. All modules should be loaded and their variables should be set at this point. source scripts/script.tcl This line loads script.tcl from the scripts directory inside your Eggdrop's directory. All scripts should be put there, although you can place them where you like as long as you can supply a fully qualified path to them. Some commonly loaded scripts are alltools.tcl and action.fix.tcl. The appropriate source lines are: source scripts/alltools.tcl source scripts/action.fix.tcl Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/0000775000175000017500000000000014703073435014774 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/_static/0000775000175000017500000000000014703073435016422 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/_static/eggman.png.gif0000664000175000017500000001052314703073435021133 0ustar geogeoGIF89aR|æU111{ÎÎÆÎœœœ !1rrrkckï÷ÿÎ¥”9ZkïÞÞµµ½·³·úùú{„„”{kKR^„­J99ååå5' !„Þ}“žïÞçççÞˆ}}óóôÖµœ1BRÎü))ËÏÏ)9B½µÆ¥ŒsB{”ðäß„{„cRB){Î¥¥­ï­ŒZRZÙÎÄï½” ÿþýüûúùø÷öõôóòñðïîíìëêéèçæåäãâáàßÞÝÜÛÚÙØ×ÖÕÔÓÒÑÐÏÎÍÌËÊÉÈÇÆÅÄÃÂÁÀ¿¾½¼»º¹¸·¶µ´³²±°¯®­¬«ª©¨§¦¥¤£¢¡ Ÿžœ›š™˜—–•”“’‘ŽŒ‹Š‰ˆ‡†…„ƒ‚€~}|{zyxwvutsrqponmlkjihgfedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!  !ùU,R|ÿ€U‚ƒ„…†‡ˆ„5‰‘’“‡'† ”žŸ ‚—Žƒ—S—¡¬­†T«„—8¥®»  º—/¼Ä» ƒ""Åͬ°T‚ÎÕ ÔU'ÖÝ”:7ÑÞåˆ ."äæÖTüýünXÐA¯Þ® hðǰa‚t¼f Á¿jä·Á@†‚%á"€ßl\I"B§’j|ä·bÉ•8•X€ ©b?6© Šsc°<Éó7€Š€¡E£Z¨”ˆ™ýR2ˆÊ•J dUOÈê!c׳À„FEÃÿÍžå*g•Bû :7ê ¤;pà'€D¿rûJ•X΂Ù‡+Þ¸ ‚õNX¤B¢$•ž'w­­œÊM†ÝÕ€r‚ù¥² 5ë¹L›Mºòm®Ô:£pI¨¿»"°‰¹Z4-ãMŽS!S²Ç³f ã•¶ý¹=à€  +ÖP û” \¸”©YñϪn྿{«•@v¸€K¼ÆK›­—?üe;<N€d 0tÅ c¡4PÒ¤xXvø¶Ñü=€“¸Ø4C?ÙæB|5Ä!,ÔpAÿ3ȶ€gl%Z€¡XyPPÄÃTD ¥È€‘ýh @àæ›( Pn´yþåéÞ%|%&$=@Ö£^p9Á0êÙ_!(P‚üì‚¢”úG€‚“€°UMË`ÞfY)¥*-”@{y0nƉ‚(º$%ØôSÌ9ªî±ºƒ?¤èÁ•–TBžQœà%]ýbMá’®«qE|ÇE“æd“Ì1o.ñ !C*gBƒi'§yÊLâòá„YÙÁ–…àô‡˜(Ñ™ žÏ¸ç…Eâøp’¡ œÉ°˜{‚ÀŠ@g윆(¯F¥fÙaA£à-çcabbØóŸ&2]î™^W´U©$ºbG)¢ÑÜ£* ,èÏåæR‚xõ ]S™$Š£•h±Rµ»MbJÓ 4eÿ€8A@#µ¤%<À‡·YÀâZ Î0 $ÿ¢Îdð’]ÜgN‘%kR˜]ø $ Àˆ.o3b´R `Ø0E³J[òh±\&WPÀŒb4ÀNy‹4û2gŒE(¡ÛæJ.S”™¨g?ÐËb a&TgT6XdD”ég„ÓŒØPö“çFèÉeÊI  N9ˆÃ< H%h5¢Ñ€yEvmÀ0êal …}êt@Ò̱£› T¢æéEú%žôà›ý€u®RÀ”5ÏKUD1Öχ˜ÕN«ÐŽ6T.¥ ÷Âö…! êPá*¤à[@ÿ˜B"%„´C2ÚÐÁT 1à€ —ìÕªüS4UH éX ¡Œ (r0ÈëŠ!þ$6pÉ $™z€ €A <°ØÅ K€AÚ.ÀϹ>ˆt¬b»Dv¯ÙQ@Z‚gÙBDƒLÁä#  ±X, `)¨@ &È@ >RÚB¼ ‚00ÜH>Fè¬b 0ÜæloÉÕâ@ #È®m1€©%HBâsÚJáº*Ût«@ÄçPÄqµŸ„ 2e# ”t L¨@.ŠqZø` ¡À0ÀëëzÚRðsu*[ˆ% ùlhž l˜ ´ûšíB†=oóÚÁî \!‘MŸe ø´¬Ý÷ËC)pXS˜;ñŽËzÕÈÂa)¼‹+.ÀÁ €b ¨p„ÛüÙ( ¶ŒDKHÜ€`ÆÉ" o‰Ç› 2˜ÂLjµH€»Ð&º·G Ì¢„à}‚à“ϲäƒ?\€ÕæŒx*¯Û| mÈËÿ÷˜ F]Yrѯ«]G¶ £<^ôOÏx#Y•B3>ÿC3+5÷:$Ú\|ŠN:zo.…$ì8,øn·ŒˆP Þ28€œ˜Ú Œ@Ö—ô0ð$! _QžB?>'wèv[Ö'oh¡"N\Ì€Þ‚ BN < ¨Ô|–ãyÚ뺃Žú D?«­ÙU0ó„`Kæ½îšÁÅÓµº/hÀ `“Ð6ÖÎm®h@ƒÚ WüŸÆ§ ¥‹ËÈ„)€2¨7wÂõ\ò×\°Bhæ,P%'fq+`1÷Gyf÷l}véÁ€¯Gs[ñP4X‚À63ç @ƒÑ}#ðnÂ%uQ‡ÿp `E%2Ø3£m >ón88\Þ¶ƒÐ)$`B&â! è€wCçl&m`Œ`bég`+ü% · ÀÄbJþ ÐNV1`dh•&`u„€øÀ[‡ð_ͨ1Ó¤µ Sf7Àðƒl‚µ”RæpZÁ¡'€’;;eggdrop-1.10.0/doc/sphinx_source/_static/eggdrop.css0000664000175000017500000000165114703073435020566 0ustar geogeo@import url("agogo.css"); div.header .headertitle { margin-bottom: 0px; font-family: "Palatino Linotype", serif; } div.header .headertitle a { color: #2F2F2F; } div.document { width: 85em; } div.header, div.content, div.footer { width: 97vw; /* unset to override agogo.css settings */ } div.content { display: flex; } div.sidebar .caption { font-weight: bold; color: #3465a4; } div.body .toctree-wrapper { display: none; font-size: 1px; } div.sidebar li.toctree-l1 a { background-color: initial; } div.footer, div.footer a { color: #034f84; } table { border-collapse: collapse; margin-bottom: 10px; margin-top: 10px; } th, td { padding-right: 4px; padding-left: 4px; border: 2px solid #87bdd8; } div.document li.toctree-l1 { margin-bottom: .5em; } div.document li.toctree-l1 a { color:black; } div.document ul { margin: 1.5em; list-style-type: circle; } div.cap eggdrop-1.10.0/doc/sphinx_source/_themes/0000775000175000017500000000000014703073435016420 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/_themes/eggdrop/0000775000175000017500000000000014703073435020047 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/_themes/eggdrop/theme.conf0000664000175000017500000000006114703073435022015 0ustar geogeo[theme] inherit = agogo stylesheet = eggdrop.css eggdrop-1.10.0/doc/sphinx_source/_themes/eggdrop/layout.html0000664000175000017500000000004314703073435022247 0ustar geogeo{%- extends "agogo/layout.html" %} eggdrop-1.10.0/doc/sphinx_source/_themes/agogo/0000775000175000017500000000000014703073435017514 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/_themes/agogo/theme.conf0000664000175000017500000000072614703073435021472 0ustar geogeo[theme] inherit = basic stylesheet = agogo.css pygments_style = tango [options] bodyfont = "Verdana", Arial, sans-serif headerfont = "Georgia", "Times New Roman", serif pagewidth = 90em documentwidth = 65em rightsidebar = false sidebarwidth = 18em bgcolor = #eeeeec headerbg = url(bgtop.png) top left repeat-x footerbg = url(bgfooter.png) top left repeat-x linkcolor = #ce5c00 headercolor1 = #204a87 headercolor2 = #3465a4 headerlinkcolor = #fcaf3e textalign = justify eggdrop-1.10.0/doc/sphinx_source/_themes/agogo/layout.html0000664000175000017500000000636114703073435021725 0ustar geogeo{# agogo/layout.html ~~~~~~~~~~~~~~~~~ Sphinx layout template for the agogo theme, originally written by Andi Albrecht. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. #} {%- extends "basic/layout.html" %} {% block header %} {% endblock %} {%- macro agogo_sidebar() %} {%- block sidebartoc %}

{{ _('Table of Contents') }}

{{ toctree() }} {%- endblock %} {%- block sidebarsearch %}

{{ _('Search') }}

{%- endblock %} {% endmacro %} {% block content %}
{%- if not theme_rightsidebar|tobool %} {%- endif %}
{%- block document %} {{ super() }} {%- endblock %}
{%- if theme_rightsidebar|tobool %} {%- endif %}
{% endblock %} {% block footer %} {% endblock %} {% block relbar1 %}{% endblock %} {% block relbar2 %}{% endblock %} eggdrop-1.10.0/doc/sphinx_source/_themes/agogo/static/0000775000175000017500000000000014703073435021003 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/_themes/agogo/static/agogo.css_t0000664000175000017500000002052614703073435023141 0ustar geogeo/* * agogo.css_t * ~~~~~~~~~~~ * * Sphinx stylesheet -- agogo theme. * * :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. * :license: BSD, see LICENSE for details. * */ * { margin: 0px; padding: 0px; } body { font-family: {{ theme_bodyfont }}; line-height: 1.4em; color: black; background-color: {{ theme_bgcolor }}; } /* Page layout */ div.header, div.content, div.footer { width: {{ theme_pagewidth }}; margin-left: auto; margin-right: auto; } div.header-wrapper { background: {{ theme_headerbg }}; border-bottom: 3px solid #2e3436; } /* Default body styles */ a { color: {{ theme_linkcolor }}; } div.bodywrapper a, div.footer a { text-decoration: underline; } .clearer { clear: both; } .left { float: left; } .right { float: right; } .line-block { display: block; margin-top: 1em; margin-bottom: 1em; } .line-block .line-block { margin-top: 0; margin-bottom: 0; margin-left: 1.5em; } h1, h2, h3, h4 { font-family: {{ theme_headerfont }}; font-weight: normal; color: {{ theme_headercolor2 }}; margin-bottom: .8em; } h1 { color: {{ theme_headercolor1 }}; } h2 { padding-bottom: .5em; border-bottom: 1px solid {{ theme_headercolor2 }}; } a.headerlink { visibility: hidden; color: #dddddd; padding-left: .3em; } h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink { visibility: visible; } img { border: 0; } div.admonition { margin-top: 10px; margin-bottom: 10px; padding: 2px 7px 1px 7px; border-left: 0.2em solid black; } p.admonition-title { margin: 0px 10px 5px 0px; font-weight: bold; } dt:target, .highlighted { background-color: #fbe54e; } /* Header */ div.header { padding-top: 10px; padding-bottom: 10px; } div.header .headertitle { font-family: {{ theme_headerfont }}; font-weight: normal; font-size: 180%; letter-spacing: .08em; margin-bottom: .8em; } div.header .headertitle a { color: white; } div.header div.rel { margin-top: 1em; } div.header div.rel a { color: {{ theme_headerlinkcolor }}; letter-spacing: .1em; text-transform: uppercase; } p.logo { float: right; } img.logo { border: 0; } /* Content */ div.content-wrapper { background-color: white; padding-top: 20px; padding-bottom: 20px; } div.document { width: {{ theme_documentwidth }}; float: left; } div.body { {%- if theme_rightsidebar|tobool %} padding-right: 2em; {%- else %} padding-left: 2em; {% endif %} text-align: {{ theme_textalign }}; } div.document h1 { line-height: 120%; } div.document ul { margin: 1.5em; list-style-type: square; } div.document dd { margin-left: 1.2em; margin-top: .4em; margin-bottom: 1em; } div.document .section { margin-top: 1.7em; } div.document .section:first-child { margin-top: 0px; } div.document div.highlight { padding: 3px; background-color: #eeeeec; border-top: 2px solid #dddddd; border-bottom: 2px solid #dddddd; margin-top: .8em; margin-bottom: .8em; } div.document div.literal-block-wrapper { margin-top: .8em; margin-bottom: .8em; } div.document div.literal-block-wrapper div.highlight { margin: 0; } div.document div.code-block-caption span.caption-number { padding: 0.1em 0.3em; font-style: italic; } div.document div.code-block-caption span.caption-text { } div.document h2 { margin-top: .7em; } div.document p { margin-bottom: .5em; } div.document li.toctree-l1 { margin-bottom: 1em; } div.document .descname { font-weight: bold; } div.document .sig-paren { font-size: larger; } div.document .docutils.literal { background-color: #eeeeec; padding: 1px; } div.document .docutils.xref.literal { background-color: transparent; padding: 0px; } div.document blockquote { margin: 1em; } div.document ol { margin: 1.5em; } /* Sidebar */ div.sidebar { width: {{ theme_sidebarwidth|todim }}; {%- if theme_rightsidebar|tobool %} float: right; {%- else %} float: left; {%- endif %} font-size: .9em; } div.sidebar a, div.header a { text-decoration: none; } div.sidebar a:hover, div.header a:hover { text-decoration: underline; } div.sidebar h3 { color: #2e3436; text-transform: uppercase; font-size: 130%; letter-spacing: .1em; } div.sidebar ul { list-style-type: none; } div.sidebar li.toctree-l1 a { display: block; padding: 1px; border: 1px solid #dddddd; background-color: #eeeeec; margin-bottom: .4em; padding-left: 3px; color: #2e3436; } div.sidebar li.toctree-l2 a { background-color: transparent; border: none; margin-left: 1em; border-bottom: 1px solid #dddddd; } div.sidebar li.toctree-l3 a { background-color: transparent; border: none; margin-left: 2em; border-bottom: 1px solid #dddddd; } div.sidebar li.toctree-l2:last-child a { border-bottom: none; } div.sidebar li.toctree-l1.current a { border-right: 5px solid {{ theme_headerlinkcolor }}; } div.sidebar li.toctree-l1.current li.toctree-l2 a { border-right: none; } div.sidebar input[type="text"] { width: 170px; } div.sidebar input[type="submit"] { width: 30px; } /* Footer */ div.footer-wrapper { background: {{ theme_footerbg }}; border-top: 4px solid #babdb6; padding-top: 10px; padding-bottom: 10px; min-height: 80px; } div.footer, div.footer a { color: #888a85; } div.footer .right { text-align: right; } div.footer .left { text-transform: uppercase; } /* Styles copied from basic theme */ img.align-left, .figure.align-left, object.align-left { clear: left; float: left; margin-right: 1em; } img.align-right, .figure.align-right, object.align-right { clear: right; float: right; margin-left: 1em; } img.align-center, .figure.align-center, object.align-center { display: block; margin-left: auto; margin-right: auto; } .align-left { text-align: left; } .align-center { text-align: center; } .align-right { text-align: right; } table caption span.caption-number { font-style: italic; } table caption span.caption-text { } div.figure p.caption span.caption-number { font-style: italic; } div.figure p.caption span.caption-text { } /* -- search page ----------------------------------------------------------- */ ul.search { margin: 10px 0 0 20px; padding: 0; } ul.search li { padding: 5px 0 5px 20px; background-image: url(file.png); background-repeat: no-repeat; background-position: 0 7px; } ul.search li a { font-weight: bold; } ul.search li div.context { color: #888; margin: 2px 0 0 30px; text-align: left; } ul.keywordmatches li.goodmatch a { font-weight: bold; } /* -- index page ------------------------------------------------------------ */ table.contentstable { width: 90%; } table.contentstable p.biglink { line-height: 150%; } a.biglink { font-size: 1.3em; } span.linkdescr { font-style: italic; padding-top: 5px; font-size: 90%; } /* -- general index --------------------------------------------------------- */ table.indextable td { text-align: left; vertical-align: top; } table.indextable ul { margin-top: 0; margin-bottom: 0; list-style-type: none; } table.indextable > tbody > tr > td > ul { padding-left: 0em; } table.indextable tr.pcap { height: 10px; } table.indextable tr.cap { margin-top: 10px; background-color: #f2f2f2; } img.toggler { margin-right: 3px; margin-top: 3px; cursor: pointer; } /* -- domain module index --------------------------------------------------- */ table.modindextable td { padding: 2px; border-collapse: collapse; } /* -- viewcode extension ---------------------------------------------------- */ .viewcode-link { float: right; } .viewcode-back { float: right; font-family:: {{ theme_bodyfont }}; } div.viewcode-block:target { margin: -1px -3px; padding: 0 3px; background-color: #f4debf; border-top: 1px solid #ac9; border-bottom: 1px solid #ac9; } div.code-block-caption { background-color: #ddd; color: #333; padding: 2px 5px; font-size: small; } /* -- math display ---------------------------------------------------------- */ div.body div.math p { text-align: center; } span.eqno { float: right; } eggdrop-1.10.0/doc/sphinx_source/_themes/agogo/static/bgtop.png0000664000175000017500000000065614703073435022633 0ustar geogeo‰PNG  IHDRPÜ2ÏæsRGB®ÎébKGDUWS’!ÿ pHYs  šœtIMEÙ-”†ô³tEXtCommentCreated with GIMPW IDAT8Ë]’ËŽ@!CÄ_Ÿd2mgAQ¼®y”¶ñû÷#|’q„Iä® Ôw üX­À’/Úõ`á¶®qŽdÏϪfH=Cû&H9M Cúv"ÜíÀQµVýì1´ÆTâ^»“ΜÊËF#‰lvTت&jÓ0PG§yŸV!.6±›ø`H¢SsVˆf´ÙáCõ¦åöûàÊxØAîÆŽ/êš]„³áMyŒT›…Ú–ÛÄß9vòònµãˆeªªÁ…`cSLFUs­éµ%„éJ±'½öh´ v|¾îmé5kôuü|äðø—*l>Ä*š6DŒå¤»ÏzdœÝþDÞ£”X?»IEND®B`‚eggdrop-1.10.0/doc/sphinx_source/_themes/agogo/static/bgfooter.png0000664000175000017500000000066214703073435023324 0ustar geogeo‰PNG  IHDRPÜ2ÏæsRGB®ÎébKGDÓ×Ï´ Bb pHYs  šœtIMEÙ4\‰ÖtEXtCommentCreated with GIMPW IDAT8Ëm’;’%13ÜÿjkŒ1Ça >Ò{1m©C¢(’òç÷_Òßáù>ìƒZ7  §Æz§­fH€[vÒ|Ÿ•BTë:m8æ8è›2GK#ì¼#À>k׎9!Ò¾K8s(igîäŒIS³jl;®Ñaå͇Áe]iÝâw Ñä "HŒV£ªyb çÐÁö¬¸_ Ž\i·ÿ …£#l*Š›äå–ˆÙþ±j£ä:h‘Ýv0qÑËÚePzD=Ù¸@æ BÎdô&dútÙ3ܰÎ|ÇžˆS»Ï³Æ6 œó亓ŸøpwÿFÙ/ðOªÞì\éÒˆëìk ÿHy3ÿ°”IEND®B`‚eggdrop-1.10.0/doc/sphinx_source/install/0000775000175000017500000000000014703073435016442 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/install/readme.rst0000664000175000017500000002362414703073435020440 0ustar geogeoREADME ====== Please, at least SKIM this document before asking questions. In fact, READ IT if you've never successfully set up an Eggdrop bot before. Notice ------ Make SURE that you select your +n (owner) users wisely. They have 100% access to your bot and account. ONLY GIVE THIS POWER TO SOMEONE YOU TRUST COMPLETELY! What is Eggdrop? ---------------- Eggdrop is the world's most popular Internet Relay Chat (IRC) bot; it is freely distributable under the GNU General Public License (GPL). Eggdrop is a feature-rich program designed to be easily used and expanded upon by both novice and advanced IRC users on a variety of hardware and software platforms. An IRC bot is a program that sits on an IRC channel and performs automated tasks while looking just like a normal user on the channel. Some of these functions include protecting the channel from abuse, allowing privileged users to gain op or voice status, logging channel events, providing information, hosting games, etc. One of the features that makes Eggdrop stand out from other bots is module and Tcl and Python scripting support. With scripts and modules you can make the bot perform almost any task you want. They can do anything: from preventing floods to greeting users and banning advertisers from channels. You can also link multiple Eggdrop bots together to form a botnet. This can allow bots to op each other securely, control floods efficiently and even link channels across multiple IRC networks. It also allows the Eggdrops share user lists, ban/exempt/invite lists, and ignore lists with other bots if userfile sharing is enabled. This allows users to have the same access on every bot on your botnet. It also allows the bots to distribute tasks such as opping and banning users. See doc/BOTNET for information on setting up a botnet. Eggdrop is always being improved and adjusted because there are bugs to be fixed and features to be added (if the users demand them and they make actually sense). In fact, it existed for several years as v0.7 - v0.9 before finally going 1.0. This version of Eggdrop is part of the 1.9 tree. A valiant effort has been made to chase down and destroy bugs. This README file contains information about how to get Eggdrop, command line options for Eggdrop, what you may need to do when upgrading from older versions, a list of frequently asked questions, how to set up a crontab, some boring legal stuff, some basics about git usage and some channels where you might get help with Eggdrop. How to Get Eggdrop ------------------ There are two official methods to download Eggdrop source code. Alternately, Eggdrop also comes as a docker image. FTP ^^^ The latest Eggdrop stable source code is always located at ``_. You can also download the current stable, previous stable, and development snapshot at ``_ Git Development Snapshot ^^^^^^^^^^^^^^^^^^^^^^^^ Eggdrop developers use git to manage the Eggdrop codebase for development. If you are interested in trying out the VERY LATEST updates to Eggdrop, you can use git to obtain most recent code from the Eggheads repository. BE WARNED, the development branch of Eggdrop is not to be considered stable and may (haha) contain significant bugs still being worked on. To obtain Eggdrop via the git repository (hosted by GitHub), you can either clone the repository via git or download a development snapshot. To clone the repository, simply type:: git clone https://github.com/eggheads/eggdrop.git Otherwise, you can download the development snapshot as a tar archive from: ``_ Docker ^^^^^^ You can pull the official Eggdrop Docker image via:: docker pull eggdrop:latest Additional Eggdrop Docker documentation can be found at ``_ System Pre-Requisites --------------------- Before you can compile Eggdrop, Tcl must be installed on your system. Many systems have Tcl installed on them by default (you can check by trying the command "tclsh"; if you are given a '%' for a prompt, it is, and you can type 'exit' to exit the Tcl shell. However, Eggdrop also requires the Tcl development header files to be installed. They can often be installed via an OS package manager, usually called something similar to 'tcl-dev' for the package name. You can also download Tcl source from ``_. Eggdrop also requires openssl (and its development headers) in order to enable SSL/TLS protection of network data. The header files are often called something similar to 'libssl-dev'. While not advised, this requirement can be removed by compiling using ``./configure --disable-tls``, but you will not be able to connect to TLS-protected IRC servers nor utilize secure botnet communication. Minimum Requirements -------------------- Some components of Eggdrop relies on a variety of third-party libraries, documented here. +-------------------------------+-------------------+-------------------+ | Functionality | Package | Minimum Version | +===============================+===================+===================+ | Tcl interpreter (required) | Tcl Dev Library | 8.5.0 | +-------------------------------+-------------------+-------------------+ | Secure communication | OpenSSL | 0.9.8 | +-------------------------------+-------------------+-------------------+ | Python module | Python | 3.8.0 | +-------------------------------+-------------------+-------------------+ | Compression module | zlib | Any | +-------------------------------+-------------------+-------------------+ Quick Startup ------------- Please see the `Install `_ file after you finish reading this file. Upgrading --------- The upgrade process for Eggdrop is very simple, simply download the new source code and repeat the compile process. You will want to read the NEWS for any new configuration file settings you want to add. Please see `Upgrading `_ for full details. Command Line ------------ Eggdrop has some command line options - not many, because most things should be defined through the config file. However, sometimes you may want to start up the bot in a different mode and the command line options let you do that. Basically, the command line for Eggdrop is:: ./eggdrop [options] [config-file] The options available are: -t: Don't background, use terminal. Your console will drop into an interactive partyline session, similar to a DCC chat with the bot. This is useful for troubleshooting connection issues with the bot. -c: Don't background, show channel info. Every 10 seconds your screen will clear and you will see the current channel status, sort of like "top". -m: Create userfile. If you don't have a userfile, this will make Eggdrop create one and give owner status to the first person that introduces himself or herself to it. You'll need to do this when you first set up your bot. -h: Show help, then quit. -v: Show version info, then quit. Most people never use any of the options except -m and you usually only need to use that once. Auto-starting Eggdrop --------------------- Systems go down from time to time, taking your Eggdrop along with it. You may not be not around to restart it manually, so you can instead use features of the operating system to automatically restart Eggdrop should it quit for any reason. Eggdrop comes with an autobotchk shell script that can create either a systemd or crontab entry. The systemd option will monitor your Eggdrop and a) start it when the machine boots and b) restart the Eggdrop if it crashes for any reason. The (older) crontab option will check (by default) every 10 minutes to see if your Eggdrop is still running, and attempt to restart it if it is not. To auto-generate a systemd job, from the Eggdrop install directory, simply run:: ./scripts/autobotchk -systemd To auto-geneerate a script to check Eggdrop's status and run it via a crontab entry, simply run:: ./scripts/autobotchk This will crontab your bot using the default setup. If you want a list of autobotchk options, type './autobotchk'. A crontab example with options would be:: ./scripts/autobotchk -noemail -5 This would setup crontab to run the botchk every 5 minutes and not send you an email saying that it restarted your bot. Documentation ------------- We're trying to keep the documentation up to date. If you feel that anything is missing here or that anything should be added, etc, please create an issue, or better yet a pull request, at ``_ Thank you! Obtaining Help -------------- You can obtain help with Eggdrop in the following IRC channels: * Libera Chat - #eggdrop (official channel), #eggheads (development discussion) * DALnet - #eggdrop * EFnet - #egghelp * IRCnet - #eggdrop * QuakeNet - #eggdrop.support * Undernet - #eggdrop If you plan to ask questions in any of the above channels, you should be familiar with and follow IRC etiquette: * Don't type using CAPITAL letters, colors or bold. * Don't use "!" and "?" excessively. * Don't /msg people without their permission. * Don't repeat or paste more than 4 lines of text to the channel. * Don't ask to ask- just state your question, along with any relevant details and error messages Copyright (C) 1997 Robey Pointer Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/install/upgrading.rst0000664000175000017500000000667014703073435021165 0ustar geogeoUpgrading Eggdrop ================= It is easy to upgrade Eggdrop to a new version! To have a full picture of the changes made since your last upgrade, we recommend reading the NEWS file. Upgrades from the 1.8 and 1.9 lines of Eggdrop should take place with little to no issues. While the config file, user files, and channel files can all be reused, it is recommended to review the NEWS files for each release to identify new configuration settings that have been added. For support, feel free to visit us on Libera #eggdrop. How to Upgrade -------------- To upgrade to a newer version of Eggdrop, first backup your .config file, .user file, and .chan file. While they are saved and should not be overwritten by the upgrade process, it never hurts to make anothere copy :) Next, view the NEWS file to see what changes have been made, paying particular attention to the config file section to see what new/different commands have been added. Update your config file appropriately. Then, simply follow the same steps you followed to install Eggdrop previously. Download the source, unzip/untar it, and run the './configure', 'make config', 'make', and 'make install' commands. Restart your Eggdrop and you will be up and running with the latest version of Eggdrop. Must-read changes for Eggdrop v1.10 ----------------------------------- These are NOT all the changes or new settings; rather just the "killer" changes that may directly affect Eggdrop's previous performance without modification. Config file changes ^^^^^^^^^^^^^^^^^^^ To migrate from a 1.8 to a |majversion| Eggdrop, some changes are suggested to be made in your configuration file: * Eggdrop has deprecated the blowfish module for password hashing in favor of the PBKDF2 module. This is a BIG change which, if done carelessly, has the potential to render stored passwords useless. Please see doc/PBKDF2 for information on how to properly migrate your userfiles and passwords to the new module. * Eggdrop 1.9 switched from the "set servers {}" syntax to the "server add" command. For example, if your configuration file previously had:: set servers { my.server.com:6667 } you should now instead use:: server add my.server.com 6667 Please read the config file for additional examples * Eggdrop no longer requires the '-n' flag to start Eggdrop in terminal mode. Modules ^^^^^^^ While most 3rd party modules that worked on older Eggdrop versions should still work with Eggdrop |majversion|, many of them contain a version check that only allows them to run on 1.6.x bots. We have removed the version check from some of the more popular modules provide them at ``_ Scripts ^^^^^^^ All 3rd party Tcl scripts that worked with Eggdrop versions as early as v1.6 should still fully work with Eggdrop |majversion|. Botnet ^^^^^^ In Eggdrop v1.8, Eggdrop bots would automatically attempt to upgrade any botnet link to an SSL/TLS connection. Since v1.9, the user is required to explicitly request an SSL/TLS connection by prefixing the port with a '+'. If you wish your botnet to take advantage of encryption, use the .chaddr command to update your ports to start with a '+'. Tcl Commands ^^^^^^^^^^^^ A lot of backwards-compatible additions and changes have been made to Tcl commands. Please look at doc/tcl-commands.doc to see them. Documentation ^^^^^^^^^^^^^ Documentation has been updated to reflect new and removed commands and variables. eggdrop-1.10.0/doc/sphinx_source/install/install.rst0000664000175000017500000001205714703073435020647 0ustar geogeo.. _installing_eggdrop: ======================================= Installing Eggdrop ======================================= This is the quick install guide; if you have had little or no experience with UNIX or Eggdrop, READ THE README FILE NOW! This file is best for experienced users. For more information on compiling Eggdrop, see the Compile Guide in doc/COMPILE-GUIDE (and of course, the README FILE). Quick Startup ------------- Eggdrop uses the GNU autoconfigure scripts to make things easier. 1. Type './configure' from the Eggdrop directory. The configure script will determine how your system is set up and figure out how to correctly compile Eggdrop. It will also try to find Tcl, which is required to compile. 2. Type either 'make config' or 'make iconfig' to determine which modules will be compiled. 'make config' compiles the default modules (everything but woobie.mod). If you want to choose which modules to compile, use 'make iconfig'. 3. Type 'make' from the Eggdrop directory, or to force a statically linked module bot, type 'make static'. Otherwise, the Makefile will compile whatever type of bot the configure script determined your system will support. Dynamic is always the better way to go if possible. There are also the 'debug' and 'sdebug' (static-debug) options, which will give more detailed output on a (highly unlikely :) crash. This will help the development team track down the crash and fix the bug. Debug and sdebug will take a little longer to compile and will enlarge the binary a bit, but it's worth it if you want to support Eggdrop development. 4. Eggdrop must be installed in a directory somewhere. This is accomplished by entering the UNIX command:: make install This will install the Eggdrop in your home directory in a directory called 'eggdrop' (i.e. /home/user/eggdrop). If you want to install to a different directory, use:: make install DEST= For example:: make install DEST=/home/user/otherdir Note that you must use full path for every file to be correctly installed. 5. Since version 1.8, Eggdrop can use SSL to protect botnet links. If you intend on protecting botnet traffic between Eggdrops, you must generate SSL certificates by running:: make sslcert Or, if you installed your eggdrop to a different directory in step 4, you will want to run: make sslcert DEST= For those using scripts to install Eggdrop, you can non-interactively generate a key and certificate by running: make sslsilent Read docs/TLS for more info on this process. [The following steps are performed in the directory you just installed Eggdrop into from the previous step] 6. Edit your config file completely. 7. Start the bot with the "-m" option to create a user file, i.e. :: ./eggdrop -m LamestBot.conf 8. When starting the bot in the future, drop the "-m". If you have edited your config file correctly, you can type:: chmod u+x For example:: chmod u+x LamestBot.conf From then on, you will be able to use your config file as a shell script. You can just type "./LamestBot.conf" from your shell prompt to start up your bot. For this to work, the top line of your script MUST contain the correct path to the Eggdrop executable. 9. It's advisable to run your bot via crontab, so that it will automatically restart if the machine goes down or (heaven forbid) the bot should crash. Eggdrop includes a helper script to auto-generate either a systemd or crontab entry. To add a systemd job, run:: ./scripts/autobotchk [yourconfig.conf] -systemd or to add a crontab job, run:: ./scripts/autobotchk [yourconfig.conf] 10. Smile. You have an Eggdrop! Cygwin Requirements (Windows) ---------------------------------------- Eggdrop requires the following packages to be added from the Cygwin installation tool prior to compiling: :: Interpreters: tcl, tcl-devel Net: openssl-devel Devel: autoconf, gcc-core, git, make Utils: diffutils Modules ------- Modules are small pieces of code that can either be compiled into the binary or can be compiled separately into a file. This allows for a much smaller binary. If there are any modules that you have made or downloaded, you can add them to the bot by placing them in the /src/mod directory with a mod extension. They will be automatically compiled during make for you. They must have a valid Makefile and, of course, be compatible with the rest of the Eggdrop source. If you wish to add a module at a later time, follow the same steps in paragraph 2. After you have moved the appropriate files, you will only need to type 'make modules' to compile only the modules portion of the bot. This is the end. If you read to this point, hopefully you have also read the README file. If not, then READ IT!&@#%@! Have fun with Eggdrop! Copyright (C) 1997 Robey Pointer Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/about/0000775000175000017500000000000014703073435016106 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/about/legal.rst0000664000175000017500000000312014703073435017720 0ustar geogeoBoring legal stuff ================== The Eggdrop bot is Copyright (C) by Robey Pointer. As of January 1997, Eggdrop is distributed according to the GNU General Public License. There should be a copy of this license in the COPYING file. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As of Eggdrop 1.3.28, all changes made by the Eggheads Development Team to the Eggdrop source code and any related files are Copyright (C) by Eggheads Development Team. The source code will still be distributed according to the GNU General Public License as Robey Pointer did in the past. Releases previous to 1.0m were made using a different licensing scheme. You may, at your option, use the GNU General Public License on those versions (instead of the license packaged with them) with Robey's blessing. For any versions bearing a copyright date of 1997 or later, you have no choice - you must use the GNU General Public License. The files match.c, net.c and blowfish.c are exempt from the above restrictions. match.c is original code by Chris Fuller and has been placed by him into the public domain. net.c is by Robey has placed it in the public domain. blowfish.c is by various sources and is in the public domain as well. All 3 files contain useful functions that could easily be ported to other applications. Tcl is by John Ousterhout and is in no way affiliated with Eggdrop. It likely has its own set of copyrights and what-nots. There is no warranty, implied or whatever. You use this software at your own risk, no matter what purpose you put it to. eggdrop-1.10.0/doc/sphinx_source/about/about.rst0000664000175000017500000000527714703073435017765 0ustar geogeoAbout Eggdrop Last revised: July 27, 2010 ============= About Eggdrop ============= Eggdrop was created around December 1993 to help stop the incessant wars on #gayteen. It spawned from another bot that was in the process of being written at the time called "Unrest". The purpose of Unrest was to answer help requests from other bots. The first public release of Eggdrop was version 0.6, and since then, it has grown into what you have before you. Eggdrop is the World's most popular Internet Relay Chat (IRC) bot; it is freely distributable under the GNU General Public License (GPL). Eggdrop is a feature rich program designed to be easily used and expanded upon by both novice and advanced IRC users on a variety of hardware and software platforms. An IRC bot is a program that sits on an IRC channel and performs automated tasks while looking just like a normal user on the channel. Some of these functions include protecting the channel from abuse, allowing privileged users to gain op or voice status, logging channel events, providing information, hosting games, etc. One of the features that makes Eggdrop stand out from other bots is module and Tcl scripting support. With scripts and modules, you can make the bot perform almost any task you want. They can do anything from preventing floods to greeting users and banning advertisers from channels. You can also link multiple Eggdrop bots together to form a botnet. This can allow bots to op each other securely, control floods efficiently, and even link channels across multiple IRC networks. It also allows the Eggdrops share user lists, ban lists, exempt/invite lists, and ignore lists with other bots if userfile sharing is enabled. This allows users to have the same access on every bot on your botnet. It also allows the bots to distribute tasks such as opping and banning users. See doc/BOTNET for information on setting up a botnet. Eggdrop is always being improved and adjusted because there are bugs to be fixed and features to be added (if the users demand them, and they make actually sense). In fact, it existed for several years as v0.7 - v0.9 before finally going 1.0. This version of Eggdrop is part of the 1.9 tree. A valiant effort has been made to chase down and destroy bugs. To use Eggdrop, you need: * Some sort of Unix account * A pretty good knowledge of IRC and Unix, including how to compile programs, how to read, and what DCC chat is, at absolute minimum. * About 5-7 MB of disk space. The Eggdrop tarball is about 5.4 MB unpacked. * Tcl -- Eggdrop cannot compile without Tcl installed on your shell. Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/0000775000175000017500000000000014703073435016444 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/modules/writing.rst0000664000175000017500000002337714703073435020675 0ustar geogeo.. _writing_module: How to Write an Eggdrop Module ============================== Note: This is for a simple module of 1 source file. 1. Create a src/mod/MODULE.mod directory in your Eggdrop directory (where MODULE is the module name) and cd to it. 2. Copy the file 'Makefile' from src/mod/woobie.mod and replace all occurrences of 'woobie' with your module name. This should ensure that your module gets compiled. 3. Next, you want to create a file called MODULE.c (MODULE is the module name again). 4. You MUST include the following in your source code:: #define MODULE_NAME "module-name" This should be defined to the same name you will be using when you load your module. :: #define MAKING_MODULENAME MODULENAME is the name of your module (MODULE_NAME), but in all caps. :: #include "../module.h" This provides access to Eggdrop's global function table. Examine src/mod/module.h closely to find a list of functions available. :: #include any other standard c header files you might need. Note that stdio.h, string.h, stdlib.h, and sys/types.h are already included. Note that stdio.h, string.h, stdlib.h, and sys/types.h are already included. :: Function *global; This variable provides access to all the Eggdrop functions; without it, you can't call any Eggdrop functions (the module won't even load). Module requirements ------------------- In most modules, all functions/variables (except global and MODULE_start) should be static. This will drastically reduce the size of modules on decent systems. Throughout this step, MODULE refers to the module name. Note that "MODULE_NAME" should literally be "MODULE_NAME". MODULE_start ^^^^^^^^^^^^ :: char *MODULE_start(Function *func_table) This function is called when the module is first loaded. There are several things that need to be done in this function :: global = func_table; This allows you to make calls to the global function table. :: module_register(MODULE_NAME, MODULE_table, MAJOR, MINOR); This records details about the module for other modules and Eggdrop itself to access. MAJOR and MINOR are ints, where MAJOR is the module's major version number and MINOR is a minor version number. MODULE_table is a function table (see below). :: module_depend(MODULE_NAME, "another-module", MAJOR, MINOR); This lets Eggdrop know that your module NEEDS "another-module" of major version 'MAJOR' and at least minor version 'MINOR' to run, and hence should try to load it if it's not already loaded. This will return 1 on success, or 0 if it can't be done (at which stage you should return an error). Any other initialization stuff you desire should also be included in this function. See below for various things you can do. You also will need to return a value. Returning NULL implies the module loaded successfully. Returning a non-NULL STRING is an error message. The module (and any other dependent modules) will stop loading and an error will be returned. MODULE_table ^^^^^^^^^^^^ :: static Function *MODULE_table = { MODULE_start, MODULE_close, MODULE_expmem, MODULE_report, any_other_functions, you_want_to_export }; This is a table of functions which any other module can access. The first 4 functions are FIXED. You MUST have them; they provide important module information. MODULE_close () ^^^^^^^^^^^^^^^ :: static char *MODULE_close () This is called when the module is unloaded. Apart from tidying any relevant data (I suggest you be thorough, we don't want any trailing garbage from modules), you MUST do the following: :: module_undepend(MODULE_NAME); This lets Eggdrop know your module no longer depends on any other modules. Return a value. NULL implies success; any non-NULL STRING implies that the module cannot be unloaded for some reason, and hence the bot should not unload it (see the blowfish module for an example). MODULE_expmem ^^^^^^^^^^^^^ :: static int MODULE_expmem () This should tally all memory you allocate/deallocate within the module (using nmalloc, nfree, etc) in bytes. It's used by memory debugging to track memory faults, and it is used by .status to total up memory usage. MODULE_report ^^^^^^^^^^^^^ :: static void MODULE_report (int idx) This should provide a relatively short report of the module's status (for the module and status commands). These functions are available to modules. MANY more available functions can be found in src/mod/module.h. Additional functions ^^^^^^^^^^^^^^^^^^^^ :: void *nmalloc(int j); This allocates j bytes of memory. :: void nfree(void *a); This frees an nmalloc'd block of memory. :: Context; Actually a macro -- records the current position in execution (for debugging). Using Context is no longer recommended, because it uses too many resources and a core file provides much more information. :: void dprintf(int idx, char *format, ...) This acts like a normal printf() function, but it outputs to log/socket/idx. idx is a normal dcc idx, or if < 0 is a sock number. Other destinations: DP_LOG - send to log file DP_STDOUT - send to stdout DP_MODE - send via mode queue to the server DP_SERVER - send via normal queue to the server DP_HELP - send via help queue to server :: const module_entry *module_find(char *module_name, int major, int minor); Searches for a loaded module (matching major, >= minor), and returns info about it. Members of module_entry: char *name; - module name int major; - real major version int minor; - real minor version Function *funcs; - function table (see above) void module_rename(char *old_module_name, char *new_module_name) This renames a module frim old_module_name to new_module_name. void add_hook(int hook_num, Function *funcs) void del_hook(int hook_num, Function *funcs) These are used for adding or removing hooks to/from Eggdrop code that are triggered on various events. Valid hooks are: HOOK_SECONDLY - called every second HOOK_MINUTELY - called every minute HOOK_5MINUTELY - called every 5 minutes HOOK_HOURLY - called every hour (hourly-updates minutes past) HOOK_DAILY - called when the logfiles are switched HOOK_READ_USERFILE - called when the userfile is read HOOK_USERFILE - called when the userfile is written HOOK_PRE_REHASH - called just before a rehash HOOK_REHASH - called just after a rehash HOOK_IDLE - called whenever the dcc connections have been idle for a whole second HOOK_BACKUP - called when a user/channel file backup is done HOOK_LOADED - called when Eggdrop is first loaded HOOK_DIE - called when Eggdrop is about to die char *module_unload (char *module_name); char *module_load (char *module_name); Tries to load or unload the specified module; returns 0 on success, or an error message. void add_tcl_commands(tcl_cmds *tab); void rem_tcl_commands(tcl_cmds *tab); Provides a quick way to create and remove a table of Tcl commands. The table is in the form of: {char *func_name, Function *function_to_call} Use { NULL, NULL } to indicate the end of the list. void add_tcl_ints(tcl_ints *); void rem_tcl_ints(tcl_ints *); Provides a quick way to create and remove a table of links from C int variables to Tcl variables (add_tcl_ints checks to see if the Tcl variable exists and copies it over the C one). The format of table is: {char *variable_name, int *variable, int readonly} Use {NULL, NULL, 0} to indicate the end of the list. void add_tcl_strings(tcl_strings *); void rem_tcl_strings(tcl_strings *); Provides a quick way to create and remove a table of links from C string variables to Tcl variables (add_tcl_ints checks to see if the Tcl variable exists and copies it over the C one). The format of table is: {char *variable_name, char *string, int length, int flags} Use {NULL, NULL, 0, 0} to indicate the end of the list. Use 0 for length if you want a const string. Use STR_DIR for flags if you want a '/' constantly appended; use STR_PROTECT if you want the variable set in the config file, but not during normal usage. void add_builtins(p_tcl_hash_list table, cmd_t *cc); void rem_builtins(p_tcl_hash_list table, cmd_t *cc); This adds binds to one of Eggdrop's bind tables. The format of the table is: {char *command, char *flags, Function *function, char *displayname} Use {NULL, NULL, NULL, NULL} to indicate the end of the list. This works EXACTLY like the Tcl 'bind' command. displayname is what Tcl sees this function's proc name as (in .binds all). function is called with exactly the same args as a Tcl binding is with type conversion taken into account (e.g. idx's are ints). Return values are much the same as Tcl bindings. Use int 0/1 for those which require 0/1, or char * for those which require a string (auch as filt). Return nothing if no return value is required. void putlog (int logmode, char *channel, char *format, ...) Adds text to a logfile (determined by logmode and channel). This text will also output to any users' consoles if they have the specified console mode enabled. What to do with a module? ------------------------- If you have written a module and feel that you wish to share it with the rest of the Eggdrop community, find us in #eggdrop on Libera. Make sure you have a nice descriptive text (modulename.desc) to describe it, and make sure to mention in your text file which version Eggdrop the module is written for. eggdrop-1.10.0/doc/sphinx_source/modules/internals.rst0000664000175000017500000004356414703073435021211 0ustar geogeoEggdrop Bind Internals ====================== This document is intended for C developers who want to understand how Eggdrop’s Tcl binds or C binds work. For documentation purposes the “dcc†bind type is used as an example. It already exists and is suitable to illustrate the details of bind handling in Eggdrop. Note: All code snippets are altered for brevity and simplicity, see original source code for the full and current versions. General Workflow To Create a New Bind ------------------------------------- To create a new type of bind, there are generally three steps. First, you must add the new bind type to the `Bind Table`_. Once you have registered the bind type with the bind table, you must create a `C Function`_ that will be called to perform the functionality you wish to occur when the bind is triggered. Finally, once the C code supporting the new bind has been finished, the new Tcl binding is ready to be used in a Tcl script. .. _Bind Table: Adding a New Bind Type to the Bind Table ---------------------------------------- The bind is added to the bind table is by calling, either at module initialization or startup .. code-block:: C /* Global symbol, available to other C files with * extern p_tcl_bind_list H_dcc; */ p_tcl_bind_list H_dcc; /* Creating the bind table: * @param[in] const char *name Limited in length, see tclhash.h * @param[in] int flags HT_STACKABLE or 0 * @param[in] IntFunc Function pointer to C handler * @return p_tcl_bind_list aka (tcl_bind_list_t *) */ H_dcc = add_bind_table("dcc", 0, builtin_dcc); What the :code:`C handler` does is explained later, because a lot happens before it is actually called. :code:`IntFunc` is a generic function pointer that returns an :code:`int` with arbitrary arguments. :code:`H_dcc` can be exported from core and imported into modules as any other variable or function. That should be explained in a separate document. .. _HT_STACKABLE: Stackable Binds: HT_STACKABLE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :code:`HT_STACKABLE` means that multiple binds can exist for the same mask. An example of what happens when NOT using this flag shown in the code block below. .. code-block:: Tcl bind dcc - test proc1; # not stackable bind dcc - test proc2; # overwrites the first one, only proc2 will be called To enable this feature, you must set the second argument to ``add_bind_table()`` with ``HT_STACKABLE``. Using ``HT_STACKABLE`` does not automatically call all the binds that match, see the bind flags listed in `Triggering any Bind`_ section for details on the partner flags ``BIND_STACKABLE`` and ``BIND_WANTRET`` used in ``check_tcl_bind()``. .. _C Function: Adding Bind Functionality ------------------------- A C function must created that will be called when the bind is triggered. Importantly, the function is designed to accept specific arguments passed by Tcl. .. code-block:: C int check_tcl_dcc(const char *cmd, int idx, const char *args) { struct flag_record fr = { FR_GLOBAL | FR_CHAN, 0, 0, 0, 0, 0 }; int x; char s[11]; get_user_flagrec(dcc[idx].user, &fr, dcc[idx].u.chat->con_chan); egg_snprintf(s, sizeof s, "%ld", dcc[idx].sock); Tcl_SetVar(interp, "_dcc1", (char *) dcc[idx].nick, 0); Tcl_SetVar(interp, "_dcc2", (char *) s, 0); Tcl_SetVar(interp, "_dcc3", (char *) args, 0); x = check_tcl_bind(H_dcc, cmd, &fr, " $_dcc1 $_dcc2 $_dcc3", MATCH_PARTIAL | BIND_USE_ATTR | BIND_HAS_BUILTINS); /* snip ..., return code handling */ return 0; } The global Tcl variables :code:`$_dcc1 $_dcc2 $_dcc3` are used as temporary string variables and passed as arguments to the registered Tcl proc. This shows which arguments the callbacks in Tcl get: * the nickname of the DCC chat user (handle of the user) * the IDX (socket id) of the partyline so :code:`[putdcc]` can respond back * another string argument that depends on the caller The call to :code:`check_tcl_dcc` can be found in the DCC parsing in `src/dcc.c`. Using the Bind in Tcl --------------------- After the bind table is created with :code:`add_bind_table`, Tcl procs can already be registered to this bind by calling .. code-block:: Tcl bind dcc -|- test myproc proc myproc {args} { putlog "myproc was called, argument list: '[join $args ',']'" return 0 } Of course it is not clear so far: * If flags :code:`-|-` matter for this bind at all and what they are checked against * If channel flags have a meaning or global/bot only * What :code:`test` is matched against to see if the bind should trigger * Which arguments :code:`myproc` receives, the example just accepts all arguments .. _triggering_any_bind: Triggering any Bind ------------------- `check_tcl_bind` is used by all binds and does the following .. code-block:: C /* Generic function to call one/all matching binds * @param[in] tcl_bind_list_t *tl Bind table (e.g. H_dcc) * @param[in] const char *match String to match the bind-masks against * @param[in] struct flag_record *atr Flags of the user calling the bind * @param[in] const char *param Arguments to add to the bind callback proc (e.g. " $_dcc1 $_dcc2 $_dcc3") * @param[in] int match_type Matchtype and various flags * @returns int Match result code */ /* Source code changed, only illustrative */ int check_tcl_bind(tcl_bind_list_t *tl, const char *match, struct flag_record *atr, const char *param, int match_type) { int x = BIND_NOMATCH; for (tm = tl->first; tm && !finish; tm_last = tm, tm = tm->next) { /* Check if bind mask matches */ if (!check_bind_match(match, tm->mask, match_type)) continue; for (tc = tm->first; tc; tc = tc->next) { /* Check if the provided flags suffice for this command. */ if (check_bind_flags(&tc->flags, atr, match_type)) { tc->hits++; /* not much more than Tcl_Eval(interp, " "); and grab the result */ x = trigger_bind(tc->func_name, param, tm->mask); } } } return x; } Bind Flags ^^^^^^^^^^ The last argument to :code:`check_tcl_bind` in `check_tcl_dcc` sets additional configurations for the bind. These are the allowed defined values: +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | **Value** | **Description** | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | MATCH_PARTIAL | Check the triggering value against the beginning of the bind mask, ie DIR triggers a mask for DIRECTORY (case insensitive) | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | MATCH_EXACT | Check the triggering value exactly against the bind mask value (case insensitive) | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | MATCH_CASE | Check the triggering value exactly against the bind mask value (case sensitive) | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | MATCH_MASK | Check if the bind mask is matched against the triggering value as a wildcarded value | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | MATCH_MODE | Special mode for `bind mode` similar to `MATCH_MASK`. This uses case-insensitive matching before the first space in the mask, | | | (the channel), and then case sensitive after the first space (the modes) | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | MATCH_CRON | Check the triggering value against a bind mask formatted as a cron entry, ie "30 7 6 7 5 " triggers a mask for "30 7 * * * " | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | BIND_USE_ATTR | Check the flags of the user match the flags required to trigger the bind | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | BIND_STACKABLE | Allow one mask to be re-used to call multiple Tcl proc. Must be used with HT_STACKABLE_ | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | BIND_WANTRET | With stacked binds, if the called Tcl proc called returns a '1', halt processing any further binds triggered by the action | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ | BIND_STACKRET | Used with BIND_WANTRET; allow stacked binds to continue despite receiving a '1' | +-------------------+-------------------------------------------------------------------------------------------------------------------------------+ Bind Return Values ^^^^^^^^^^^^^^^^^^ The value returned by the bind is often matched against a desired value to return a '1' (often used with BIND_WANTRET and BIND_STACKRET) to the calling function. +----------------+--------------------------------------------------------------------------------------------------------------+ | **Value** | **Description** | +----------------+--------------------------------------------------------------------------------------------------------------+ | BIND_NOMATCH | The bind was not triggered due to not meeting the criteria set for the bind | +----------------+--------------------------------------------------------------------------------------------------------------+ | BIND_AMBIGUOUS | The triggering action matched multiple non-stackable binds | +----------------+--------------------------------------------------------------------------------------------------------------+ | BIND_MATCHED | The bind criteria was met, but the Tcl proc it tried to call could not be found | +----------------+--------------------------------------------------------------------------------------------------------------+ | BIND_EXECUTED | The bind criteria was met and the Tcl proc was called | +----------------+--------------------------------------------------------------------------------------------------------------+ | BIND_EXEC_LOG | The bind criteria was met, the Tcl proc was called, and Eggdrop logged the bind being called | +----------------+--------------------------------------------------------------------------------------------------------------+ | BIND_QUIT | Sentinel value to signal that quit was triggered by the target leaving the partyline or filesys area. | | | (Virtual bind to CMD_LEAVE) | +----------------+--------------------------------------------------------------------------------------------------------------+ Note: For a bind type to be stackable it needs to be registered with :code:`HT_STACKABLE` AND :code:`check_tcl_bind` must be called with :code:`BIND_STACKABLE`. C Binding --------- To create a C function that is called by the bind, Eggdrop provides the :code:`add_builtins` function. .. code-block:: C /* Add a list of C function callbacks to a bind * @param[in] tcl_bind_list_t * the bind type (e.g. H_dcc) * @param[in] cmd_t * a NULL-terminated table of binds: * cmd_t *mycmds = { * {char *name, char *flags, IntFunc function, char *tcl_name}, * ..., * {NULL, NULL, NULL, NULL} * }; */ void add_builtins(tcl_bind_list_t *tl, cmd_t *cc) { char p[1024]; cd_tcl_cmd tclcmd; tclcmd.name = p; tclcmd.callback = tl->func; for (i = 0; cc[i].name; i++) { /* Create Tcl command with automatic or given names *:, e.g. * - H_raw {"324", "", got324, "irc:324"} => *raw:irc:324 * - H_dcc {"boot", "t", cmd_boot, NULL} => *dcc:boot */ egg_snprintf(p, sizeof p, "*%s:%s", tl->name, cc[i].funcname ? cc[i].funcname : cc[i].name); /* arbitrary void * can be included, we include C function pointer */ tclcmd.cdata = (void *) cc[i].func; add_cd_tcl_cmd(tclcmd); bind_bind_entry(tl, cc[i].flags, cc[i].name, p); } } It automatically creates Tcl commands (e.g. :code:`*dcc:cmd_boot`) that will call the `C handler` from `add_bind_table` in the first section `Bind Table`_ and it gets a context (void \*) argument with the C function it is supposed to call (e.g. `cmd_boot()`). Now we can actually look at the C function handler for dcc as an example and what it has to implement. C Handler --------- The example handler for DCC looks as follows .. code-block:: C /* Typical Tcl_Command arguments, just like e.g. tcl_putdcc is a Tcl/C command for [putdcc] */ static int builtin_dcc (ClientData cd, Tcl_Interp *irp, int argc, char *argv[]) { int idx; /* F: The C function we want to call, if the bind is okay, e.g. cmd_boot() */ Function F = (Function) cd; /* Task of C function: verify argument count and syntax as any Tcl command */ BADARGS(4, 4, " hand idx param"); /* C Macro only used in C handlers for bind types, sanity checks the Tcl proc name * for *: and that we are in the right C handler */ CHECKVALIDITY(builtin_dcc); idx = findidx(atoi(argv[2])); if (idx < 0) { Tcl_AppendResult(irp, "invalid idx", NULL); return TCL_ERROR; } /* Call the desired C function, e.g. cmd_boot() with their arguments */ F(dcc[idx].user, idx, argv[3]); Tcl_ResetResult(irp); Tcl_AppendResult(irp, "0", NULL); return TCL_OK; } This is finally the part where we see the arguments a C function gets for a DCC bind as opposed to a Tcl proc. :code:`F(dcc[idx].user, idx, argv[3])`: * User information as struct userrec * * IDX as int * The 3rd string argument from the Tcl call to \*dcc:cmd_boot, which was :code:`$_dcc3` which was :code:`args` to :code:`check_tcl_dcc` which was everything after the dcc command So this is how we register C callbacks for binds with the correct arguments .. code-block:: C /* We know the return value is ignored because the return value of F * in builtin_dcc is ignored, so it can be void, but for other binds * it could be something else and used in the C handler for the bind. */ void cmd_boot(struct userrec *u, int idx, char *par) { /* snip */ } cmd_t *mycmds = { {"boot", "t", (IntFunc) cmd_boot, NULL /* automatic name: *dcc:boot */}, {NULL, NULL, NULL, NULL} }; add_builtins(H_dcc, mycmds); Summary ------- In summary, this is how the dcc bind is called: * :code:`check_tcl_dcc()` creates Tcl variables :code:`$_dcc1 $_dcc2 $_dcc3` and lets :code:`check_tcl_bind` call the binds * Tcl binds are done at this point * C binds mean the Tcl command associated with the bind is :code:`*dcc:boot` which calls :code:`builtin_dcc` which gets :code:`cmd_boot` as ClientData cd argument * :code:`gbuildin_dcc` performs some sanity checking to avoid crashes and then calls :code:`cmd_boot()` aka :code:`F()` with the arguments it wants C callbacks to have Example edited and annotated gdb backtrace in :code::`cmd_boot` after doing :code:`.boot test` on the partyline as user :code:`thommey` with typical owner flags. :: #0 cmd_boot (u=0x55e8bd8a49b0, idx=4, par=0x55e8be6a0010 "test") at cmds.c:614 *u = {next = 0x55e8bd8aec90, handle = "thommey", flags = 8977024, flags_udef = 0, chanrec = 0x55e8bd8aeae0, entries = 0x55e8bd8a4a10} #1 builtin_dcc (cd=0x55e8bbf002d0 , irp=0x55e8bd59b1c0, argc=4, argv=0x55e8bd7e3e00) at tclhash.c:678 idx = 4 argv = {0x55e8be642fa0 "*dcc:boot", 0x55e8be9f6bd0 "thommey", 0x55e8be7d9020 "4", 0x55e8be6a0010 "test", 0x0} F = 0x55e8bbf002d0 #5 Tcl_Eval (interp=0x55e8bd59b1c0, script = "*dcc:boot $_dcc1 $_dcc2 $_dcc3") from /usr/lib/x86_64-linux-gnu/libtcl8.6.so Tcl: return $_dcc1 = "thommey" Tcl: return $_dcc2 = "4" Tcl: return $_dcc3 = "test" Tcl: return $lastbind = "boot" (set automatically by trigger_bind) #8 trigger_bind (proc=proc@entry=0x55e8bd5efda0 "*dcc:boot", param=param@entry=0x55e8bbf4112b " $_dcc1 $_dcc2 $_dcc3", mask=mask@entry=0x55e8bd5efd40 "boot") at tclhash.c:742 #9 check_tcl_bind (tl=0x55e8bd5eecb0 , match=match@entry=0x7ffcf3f9dac1 "boot", atr=atr@entry=0x7ffcf3f9d100, param=param@entry=0x55e8bbf4112b " $_dcc1 $_dcc2 $_dcc3", match_type=match_type@entry=80) at tclhash.c:942 proc = 0x55e8bd5efda0 "*dcc:boot" mask = 0x55e8bd5efd40 "boot" brkt = 0x7ffcf3f9dac6 "test" #10 check_tcl_dcc (cmd=cmd@entry=0x7ffcf3f9dac1 "boot", idx=idx@entry=4, args=0x7ffcf3f9dac6 "test") at tclhash.c:974 fr = {match = 5, global = 8977024, udef_global = 0, bot = 0, chan = 0, udef_chan = 0} #11 dcc_chat (idx=idx@entry=4, buf=, i=) at dcc.c:1068 v = 0x7ffcf3f9dac1 "boot" eggdrop-1.10.0/doc/sphinx_source/modules/mod/0000775000175000017500000000000014703073435017223 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/modules/mod/blowfish.rst0000664000175000017500000000110114703073435021563 0ustar geogeoLast revised: January 28, 2003 .. _blowfish: =============== Blowfish Module =============== Eggdrop can encrypt your userfile, so users can have secure passwords. Please note that when you change your encryption method later (i.e. using other modules like a md5 module), you can't use your current userfile anymore. Eggdrop will not start without an encryption module. This module requires: none Put this line into your Eggdrop configuration file to load the blowfish module:: loadmodule blowfish Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/woobie.rst0000664000175000017500000000057714703073435021252 0ustar geogeoLast revised: December 31, 2001 .. _woobie: Woobie Module ------------- This is for demonstrative purposes only. If you are looking for starting point in writing modules, woobie is the right thing. This module requires: none Put this line into your Eggdrop configuration file to load the woobie module:: loadmodule woobie Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/notes.rst0000664000175000017500000000232414703073435021106 0ustar geogeoLast revised: January 1, 2002 .. _notes: ============ Notes Module ============ This module provides support for storing of notes for users from each other. Note sending between currently online users is supported in the core, this is only for storing the notes for later retrieval. This module requires: none Put this line into your Eggdrop configuration file to load the notes module:: loadmodule notes There are also some variables you can set in your config file: set notefile "LamestBot.notes" Set here the filename where private notes between users are stored. set max-notes 50 Set here the maximum number of notes to allow to be stored for each user (to prevent flooding). set note-life 60 Set here how long (in days) to store notes before expiring them. set allow-fwd 0 Set this to 1 if you want to allow users to specify a forwarding address for forwarding notes to another account on another bot. set notify-users 1 Set this to 1 if you want the bot to let people know hourly if they have any notes. set notify-onjoin 1 Set this to 1 if you want the bot to let people know on join if they have any notes. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/compress.rst0000664000175000017500000000145014703073435021610 0ustar geogeoLast revised: May 27, 2004 .. _compress: =============== Compress Module =============== This module provides support for file compression. It can be used to compress files via Tcl or to transfer the userfile compressed during the share process, saving bandwidth. This module requires: share Put this line into your Eggdrop configuration file to load the compress module:: loadmodule compress There are also some variables you can set in your config file: set share-compressed 1 Allow compressed sending of user files? The user files are compressed with the compression level defined in 'compress-level'. set compress-level 9 This is the default compression level used. These levels are the same as those used by GNU gzip. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/twitch.rst0000664000175000017500000000445514703073435021267 0ustar geogeoLast revised: April 20, 2020 .. _twitch: ============= Twitch Module ============= This module *attempts* to provide connectivity with the Twitch gaming platform. While Twitch provides an IRC gateway to connect with it's streaming service, it does not claim to (and certainly does not) follow the IRC RFC in any meaningful way. The intent of this module is not to provide the full spectrum of management functions typically associated with Eggdrop; instead it focuses around the following key functions: * Logging of general and Twitch-specific events (raids, blocks, bit donations) * Tracking userstate and roomstate values * Adding Tcl event binds for a number of Twitch events This module requires: irc.mod Put this line into your Eggdrop configuration file to load the twitch module:: loadmodule twitch and set `net-type "Twitch"` in your config file. ----------- Limitations ----------- There are a few things you should know about how Twitch provides service through the IRC gateway that affects how well Eggdrop can function: * Twitch does not broadcast JOINs or PARTs for channels over 1,000 users. This renders tracking users on a channel unreliable. * Twitch does not broadcast MODE changes for moderator status. This (mostly) renders tracking the status of users infeasible. (See Tcl below section for workaround) * Twitch stores bans on its servers (and does not accept MODE +b), making the Eggdrop ban list (and exempts/invites) mostly useless * Twitch does not allow clients to issue MODE +o/-o commands, preventing Eggdrop from op'ing users through the traditional method ... but the good news is, we have extended much of the Twitch functionality to Tcl! ------- Tcl API ------- That last section was a little bit of a downer, but don't worry, we added a TON of functionality to the Tcl API. This module adds binds for the following Twitch events: * CLEARCHAT * CLEARMSG * HOSTTARGET * WHISPER * ROOMSTATE * USERSTATE * USERNOTICE ------------------ Partyline commands ------------------ This module adds the following commands to the partyline: * userstate - Lists current userstate on a channel * roomsstate - Lists current roomstate for a channel * twcmd - Issues a traditional Twitch web interface command to the Twitch server (/ban, /block, /host, etc) Copyright (C) 2020 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/python.rst0000664000175000017500000000327414703073435021304 0ustar geogeoLast revised: November 03, 2023 .. _python: ============= Python Module ============= This module adds a Python interpreter to Eggdrop, allowing you to run Python scripts. ------------------- System Requirements ------------------- This module requires Python version 3.8 or higher in order to run. Similar to Tcl requirements, Eggdrop requires both python and python development libraries to be installed on the host machine. On Debian/Ubuntu machines, this means the packages ``python``, ``python-dev`` AND ``python-is-python3`` to be installed. The python-is-python3 updates symlinks on the host system that allow Eggdrop to find it. -------------- Loading Python -------------- Put this line into your Eggdrop configuration file to load the python module:: loadmodule python To load a python script from your config file, place the .py file in the scripts/ folder and add the following line to your config:: pysource scripts/myscript.py ------------------ Partyline Commands ------------------ ^^^^^^^^^^^^^^^^^^^ python ^^^^^^^^^^^^^^^^^^^ You can run a python command from the partyline with the .python command, such as:: .python 1 + 1 Python: 2 .python from eggdrop.tcl import putmsg; putmsg('#chan', 'Hello world!') Python: None ^^^^^^^^^^^^^ .binds python ^^^^^^^^^^^^^ The python module extends the core ``.binds`` partyline command by adding a ``python`` mask. This command will list all binds for python scripts. ------------ Tcl Commands ------------ ^^^^^^^^^^^^^^^^^^^^^^^ pysource ^^^^^^^^^^^^^^^^^^^^^^^ The ``pysource`` command is analogous to the Tcl ``source`` command, except that it loads a Python script into Eggdrop instead of a Tcl script. eggdrop-1.10.0/doc/sphinx_source/modules/mod/ctcp.rst0000664000175000017500000000255614703073435020716 0ustar geogeoLast revised: February 12, 2002 .. _ctcp: =========== CTCP Module =========== This module provides the normal ctcp replies that you would expect. Without it loaded, CTCP CHAT will not work. This module requires: server Put this line into your Eggdrop configuration file to load the ctcp module:: loadmodule ctcp There are also some variables you can set in your config file: set ctcp-mode 0 Set here how the ctcp module should answer ctcps. There are 3 possible operating modes: +---+--------------------------------------------------------------+ | 0 | Normal behavior is used. | +---+--------------------------------------------------------------+ | 1 | The bot ignores all ctcps, except for CHAT and PING requests | | | by users with the +o flag. | +---+--------------------------------------------------------------+ | 2 | Normal behavior is used, however the bot will not answer more| | | than X ctcps in Y seconds (defined by 'set flood-ctcp'). | +---+--------------------------------------------------------------+ There are also several variables to help make your bot less noticeable. They are: ctcp-version, ctcp-finger, and ctcp-userinfo. You can use set to set them to values you'd like. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/filesys.rst0000664000175000017500000001603414703073435021437 0ustar geogeoLast revised: Dec 30, 2017 .. _filesys: ============== Filesys Module ============== This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server. This module requires: transfer ----------------- Config file setup ----------------- Put this line into your Eggdrop configuration file to load the filesys module:: loadmodule filesys There are also some variables you can set in your config file: set files-path "/home/mydir/eggdrop/filesys" Set here the 'root' directory for the file system. set incoming-path "/home/mydir/eggdrop/filesys/incoming" If you want to allow uploads, set this to the directory uploads should be put into. Set this to "" if you don't want people to upload files to your bot. set upload-to-pwd 0 If you don't want to have a central incoming directory, but instead want uploads to go to the current directory that a user is in, set this setting to 1. set filedb-path "" Eggdrop creates a '.filedb' file in each subdirectory of your file area to keep track of its own file system information. If you can't do that (for example, if the dcc path isn't owned by you, or you just don't want it to do that) specify a path here where you'd like all of the database files to be stored instead. set max-file-users 20 Set here the maximum number of people that can be in the file area at once. Setting this to 0 makes it effectively infinite. set max-filesize 1024 Set here the maximum allowable file size that will be received (in KB). Setting this to 0 makes it effectively infinite. --------------- Partyline usage --------------- ^^^^^^ .files ^^^^^^ Moves you into the file transfer sub-system, if it has been enabled on this bot. From there you can browse through the files online and use dcc file transfers to download and upload. ^^^^^^^^^^^^^^^^^^^^^^^^^ .cancel [file] ... ^^^^^^^^^^^^^^^^^^^^^^^^^ Tells the bot to stop sending a file that is pending (either queued, waiting, or in the process of being transferred). ^^^^^^^^^^^^^^^ .cd ^^^^^^^^^^^^^^^ Changes your current directory if possible. this works exactly like the unix command. ^^^^^^^^^^^^^^^^^^ .cp ^^^^^^^^^^^^^^^^^^ Copies a file or group of files from one place to another. ^^^^^^^^^^^^^^^^^^^^^^^^^^ .desc ^^^^^^^^^^^^^^^^^^^^^^^^^^ Changes the description for a file. if you are a master or file janitor, you can change the description for any file. otherwise you can only change the descriptions for files you have uploaded. The description is restricted to 3 lines of 60 characters each, and is broken up between words. you can force a line break by putting a '|' in the comment. ^^^^^^^^^^^^^^^^^^^^^^^^^ .filestats [clear] ^^^^^^^^^^^^^^^^^^^^^^^^^ Reports on the users upload & download statistics. Optional argument 'clear' clears a users upload and download statistics. ^^^^^^ .stats ^^^^^^ Clears a users upload & download statistics. ^^^^^^^^^^^^^^^^^^^^^^^^^^ .get [nickname] ^^^^^^^^^^^^^^^^^^^^^^^^^^ Sends you the file(s) requested, over IRC. you should get a DCC SEND notice on IRC, and have your client accept it. if your nickname on IRC is different than the one you use on the bot, you should specify a nickname too. you can also use that to send files to other people. if a file you want is actually on another bot, it may take a little bit longer so be patient. if that bot isn't on the botnet right now, it will say the file isn't available. There is a limit to the number of transfers you can have going simultaneously, so if you go over this limit, the remainder of your file requests will be queued. As the first files finish transferring, the queued files will be sent. ^^^^^^^^^^^^^^^^^^^^^^^^ .hide [files] ... ^^^^^^^^^^^^^^^^^^^^^^^^ Marks a file as hidden, so that normal users can't see it. Only a master or file janitor using %b'lsa'%b can see hidden files. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .ln ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Creates a link to a file on another bot. The filepath has to be complete, like '/gifs/uglyman.gif'. If the bot is not connected to the botnet, nobody will be able to download the file until that bot connects again. The local filename can be anything you want. Example: ln Snowbot:/gifs/uglyman.gif ugly.gif ^^^^^^^^^^^^^^ .ls [filemask] ^^^^^^^^^^^^^^ Displays the files in the current directory. Subdirectories are shown with "" next to them, and other files will display their size (typically in kilobytes), who uploaded them (and when), and how many times each file has been downloaded. If a description of the file exists, it is displayed below the filename. You can restrict the file listing by specifying a mask, just like in unix. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .mkdir [flags [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Creates a subdirectory from this one, with the given name. If flags are specified, then those flags are required to enter or even see the directory. You can even specify a channel that the flags are matched against. You can use the %b'mkdir'%b command again to alter or remove those flags. ^^^^^^^^^^^^^^^^^^^ .mv ^^^^^^^^^^^^^^^^^^^ Moves a file or group of files from one place to another (it can also be used to rename files). ^^^^^^^^ .pending ^^^^^^^^ Gives you a listing of every file you've requested which is still waiting, queued, or in the process of transferring. It shows you the nickname on IRC that the file is being sent to, and, if the transfer is in progress, tells you how far along the transfer is. ^^^^ .pwd ^^^^ Tells you what your current directory is. ^^^^^ .quit ^^^^^ Exits the file system. ^^^^^^^^^^^^^^^^^^^^^ rm [files] ... ^^^^^^^^^^^^^^^^^^^^^ Erase a file for good. ^^^^^^^^^^^^ .rmdir ^^^^^^^^^^^^ Removes an existing directory, if there are no files in it. ^^^^^^^^^^^^^^^^^^^^^^^^^ .share [files] ... ^^^^^^^^^^^^^^^^^^^^^^^^^ Marks a file as shared. This means that other bots can get the file remotely for users on their file systems. By default, files are marked as unshared. ^^^^^^^^^ .optimize ^^^^^^^^^ Cleans up the current directory's database. If you have a large directory with many files you may want to use this command if you experience slow-downs/delays over time. Normally, the db should clean up itself though. ^^^^^^^ .unhide ^^^^^^^ Makes a file be not hidden any more. ^^^^^^^^^^^^^^^^^^^^^^^^^^ .unshare [file] ... ^^^^^^^^^^^^^^^^^^^^^^^^^^ Removes the shared tag from a file. ^^^^^^^^^^^^^^^ .filesys module ^^^^^^^^^^^^^^^ This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server. The following commands are provided by the filesys module: For filesystem users: files Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/pbkdf2.rst0000664000175000017500000000303314703073435021124 0ustar geogeoLast revised: October 28, 2020 .. _pbkdf2: =============== PBKDF2 Module =============== Eggdrop encrypts its userfile, so users can have secure passwords. Eggdrop will not start without an encryption module. As of Eggdrop 1.9.0, a new encryption module was added, the PBKDF2 module. The PBKDF2 module was designed to work with the previous encryption module (blowfish) to make the transition easier. If this is a new bot, you can safely load just the PBKDF2 module. If you are transitioning a userfile from 1.8 or earlier, you should load this AND the blowfish module. By doing so, Eggdrop will seamlessly update the old blowfish hashes to the new PBKDF2 hashes once a user logs in for the first time, and allow you to (eventually) remove the blowfish module altogether. Outside of the specific case noted above, please note that if you change your encryption method later (i.e. using other modules like a rijndael module), you can't use your current userfile anymore. Put this line into your Eggdrop configuration file to load the server module:: loadmodule pbkdf2 There are also some variables you can set in your config file: set pbkdf2-method "SHA256" Cryptographic hash function used. Use ``openssl list -digest-algorithms`` to view all available options set pbkdf2-rounds 1600 Number of rounds. The higher the number, the longer hashing takes; but also generally the higher the protection against brute force attacks. This module requires: none Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/console.rst0000664000175000017500000000150414703073435021417 0ustar geogeoLast revised: January 1, 2002 .. _console: ============== Console Module ============== This module provides storage of console settings when you exit the bot or type .store on the partyline. This module requires: none Put this line into your Eggdrop configuration file to load the console module:: loadmodule console There are also some variables you can set in your config file: set console-autosave 1 Save users console settings automatically? Otherwise, they have to use the .store command. set force-channel 0 If a user doesn't have any console settings saved, which channel do you want them automatically put on? set info-party 0 Enable this setting if a user's global info line should be displayed when they join a botnet channel. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/dns.rst0000664000175000017500000000300614703073435020540 0ustar geogeoLast revised: September 26, 2010 .. _dns: ========== DNS Module ========== This module provides asynchronous dns support. This will avoid long periods where the bot just hangs there, waiting for a hostname to resolve, which will often let it timeout on all other connections. This module requires: none Put this line into your Eggdrop configuration file to load the dns module:: loadmodule dns There are also some variables you can set in your config file: set dns-servers "8.8.8.8 8.8.4.4" In case your bot has trouble finding dns servers or you want to use specific ones, you can set them here. The value is a list of dns servers. The relative order doesn't matter. You can also specify a non-standard port. The default is to use the system specified dns servers. You don't need to modify this normally. set dns-cache 86400 Specify how long should the DNS module cache replies at maximum. The value must be in seconds. Note that it will respect the TTL of the reply and this is just an upper boundary. set dns-negcache 600 Specify how long should the DNS module cache negative replies (NXDOMAIN, DNS Lookup failed). The value must be in seconds. set dns-maxsends 4 How many times should the DNS module resend the query for a given domain if it receives no reply? set dns-retrydelay 3 Specify how long should the DNS module wait for a reply before resending the query. The value must be in seconds. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/ident.rst0000664000175000017500000000625614703073435021071 0ustar geogeoLast revised: June 27, 2019 .. _ident: ============ Ident Module ============ This module adds Eggdrop support for the externally-provided oident service, or alternatively the ability for Eggdrop to act as its own ident daemon. Traditionally, an IRC server queries port 113 on an irc client's host to determine the ident for the client. The client's host normally replies with the username of the account. If the host machine is running oident as its ident service, Eggdrop can now interact with oident to instead reply with a custom ident specified by Eggdrop (oidentd is an external service not specific to Eggdrop nor maintained by Eggheads developers, thus no support for it can be given). Alternatively, this module can also allow Eggdrop to act as its own ident daemon, answering queries from the IRC server directly. While this option may be of use to a very specific group of people, it requires additional external configuration via root access. Because most modern OSs do not allow user-level programs to bind to port 113, required by this option, a user must either: - Allow Eggdrop to bind to ports <1024 via the command:: sudo setcap "cap_net_bind_service=+ep" /path/to/eggdrop Warning: this will allow Eggdrop to *any* port below 1024, potentially allowing a user to impersonate a standard system service with Eggdrop - Use iptables to re-route ident queries destined for port 113 to a >1024 port that Eggdrop can bind to, for example by running:: sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport \ 113 -j REDIRECT --to-port ' Additionally, using Eggdrop as a built-in ident daemon can cause issues when running multiple bots from the same account. The ident server is only activated and bound to the configured ident port while Eggdrop is connecting to an IRC server, but only one Eggdrop can bind to port 113 at a time. If multiple bots were to start at the same time, such as after a netsplit or host reboot, only one bot can bind to port 113 at a time, creating ident conflicts. Thus, this option is best suited for single-bot environments. This module requires: - oident to be running on your shell host, configured to allow user spoofing, for the oidentd method. Put this line into your Eggdrop configuration file to load the ident module:: loadmodule ident There are also some variables you can set in your config file: set ident-method 0 This sets which ident method you wish to use: 0 = oidentd / Your bot will overwrite $HOME/.oidentd.conf right before opening the socket to the IRC server with the global reply. 1 = Builtin / Your bot will automatically turn its builtin identd on and off when needed so it shouldn't conflict with other identds that do the same. Ident port 113 is normally restricted to privileged processes on UNIX systems. set ident-port 113 This sets the port which port Eggdrop will attempt to bind to for option 1 of ident-method. Most OSs do not allow non-privileged programs such as Eggdrop to bind to ports <1024; please read the beginning of this document for potential ways to implement this setting. Copyright (C) 2019 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/assoc.rst0000664000175000017500000000052114703073435021063 0ustar geogeoLast revised: January 1, 2002 .. _assoc: ============ Assoc Module ============ This module provides assoc support, i.e. naming channels on the botnet. This module requires: none Put this line into your Eggdrop configuration file to load the assoc module:: loadmodule assoc Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/server.rst0000664000175000017500000002225314703073435021267 0ustar geogeoLast revised: October 25, 2010 .. _server: ============= Server Module ============= This module provides the core server support. You have to load this if you want your bot to come on IRC. Not loading this is equivalent to the old NO_IRC define. This module requires: none Put this line into your Eggdrop configuration file to load the server module:: loadmodule server There are also some variables you can set in your config file: set net-type Efnet What is your network? Possible allowed values are Efnet, IRCnet, Undernet, DALnet, Libera, freenode, Quakenet, Rizon, Other. If the network you use is not listed, using "Other" is a good sane choice and can be customized with settings both here and in the IRC module sections of the config file. set nick "LamestBot" Set the nick the bot uses on IRC, and on the botnet unless you specify a separate botnet-nick, here. set altnick "L?m?stB?t" Set the alternative nick which the bot uses on IRC if the nick specified by 'set nick' is unavailable. All '?' characters will be replaced by random numbers. set keep-nick 1 This setting makes the bot try to get his original nickname back if its primary nickname is already in use. set realname "/msg LamestBot hello" Set here what to display in the real-name field for the bot. :: bind evnt - init-server evnt:init_server proc evnt:init_server {type} { global botnick putquick "MODE $botnick +i-ws" } ... is Tcl scripting that is run immediately after connecting to a server. :: set init-server { putquick "MODE $botnick +i-ws" } ... is Tcl scripting that is run immediately after connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc). :: set connect-server { putlog "Connecting to server." } ... is Tcl scripting that is run immediately before connecting to a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc). :: set disconnect-server { putlog "Disconnected from server." } ... is a Tcl script that is run immediately after disconnecting from a server. It is limited to 120 characters, and is depriciated due to the EVNT bind (see doc/tcl-commands.doc). :: set servers { you.need.to.change.this:6667 another.example.com:7000:password [2001:db8:618:5c0:263::]:6669:password ssl.example.net:+6697 } ... is the bot's server list. The bot will start at the first server listed, and cycle through them whenever it gets disconnected. You need to change these servers to YOUR network's servers. The format is: server[:port[:password]] Prefix the port with a plus sign to attempt a SSL connection: server:+port[:password] Both the port and password fields are optional; however, if you want to set a password or use SSL you must also set a port. If a port isn't specified it will default to your default-port setting. set default-port 6667 Set the default port which should be used if none is specified with '.jump' or in 'set servers'. set msg-rate 2 Number of seconds to wait between transmitting queued lines to the server. Lower this value at your own risk. ircd is known to start flood control at 512 bytes/2 seconds. set ssl-verify-servers 0 Control certificate verification for servers. You can set this by adding together the numbers for all exceptions you want to enable. By default certificate verification is disabled and all certificates are assumed to be valid. The numbers are the following: The numbers are the following: +---+---------------------------------------------+ | 0 | disable verification | +---+---------------------------------------------+ | 1 | enable certificate verification | +---+---------------------------------------------+ | 2 | allow self-signed certificates | +---+---------------------------------------------+ | 4 | don't check peer common or alt names | +---+---------------------------------------------+ | 8 | allow expired certificates | +---+---------------------------------------------+ | 16| allow certificates which are not valid yet | +---+---------------------------------------------+ | 32| allow revoked certificates | +---+---------------------------------------------+ set server-cycle-wait 60 This setting defines how long Eggdrop should wait before moving from one server to another on disconnect. If you set 0 here, Eggdrop will not wait at all and will connect instantly. Setting this too low could result in your bot being K:Lined. set server-timeout 60 Set here how long Eggdrop should wait for a response when connecting to a server before giving up and moving on to next server. set check-stoned 1 Set this to 1 if Eggdrop should check for stoned servers? (where the server connection has died, but Eggdrop hasn't been notified yet). set serverror-quit 1 If you want your bot to exit the server if it receives an ERROR message, set this to 1. set max-queue-msg 300 Set here the maximum number of lines to queue to the server. If you're going to dump large chunks of text to people over IRC, you will probably want to raise this. 300 is fine for most people though. set quiet-reject 1 This setting makes the bot squelch the error message when rejecting a DCC CHAT, SEND or message command. Normally, Eggdrop notifies the user that the command has been rejected because they don't have access. Note that sometimes IRC server operators detect bots that way. set flood-msg 5:60 Set here how many msgs in how many seconds from one host constitutes a flood. If you set this to 0:0, msg flood protection will be disabled. set flood-ctcp 3:60 Set here how many ctcps in how many seconds from one host are recognized as a flood. Not specifying or using number = 0 will not check against ctcp floods. set answer-ctcp 3 Set how many ctcps should be answered at once here. set lowercase-ctcp 0 If you want your bot to answer lower case ctcp requests (non rfc- compliant), set this setting to 1. mIRC will do this, most other clients will not. set trigger-on-ignore 0 If you want Eggdrop to trigger binds for ignored users, set this to 1. set exclusive-binds 0 This setting configures PUBM and MSGM binds to be exclusive of PUB and MSG binds. This means if a MSGM bind with the mask "*help*" exists and is triggered, any MSG bindings with "help" in their mask will not be triggered. Don't enable this unless you know what you are doing! set double-mode 0 Allow identical messages in the mode queue? set double-server 0 Allow identical messages in the server queue? set double-help 0 Allow identical messages in the help queue? set use-penalties 1 (default on net-type IRCnet) This enables Eggdrop's penalty calculation. Every command Eggdrop sends to the IRC server raises its penalty points. If Eggdrop reaches a server limit, it gets disconnected with "excess flood" message. Eggdrop is able to count internal those penalty points, too and take measures against excess flooding. Note: it's highly advised to turn this on! set optimize-kicks 1 This optimizes the kick queue. It also traces nick changes and parts in the channel and changes the kick queue accordingly. There are three different options for this setting: +---+------------------------------------------------------------------+ | 0 | Turn it off. | +---+------------------------------------------------------------------+ | 1 | Optimize the kick queue by summarizing kicks. | +---+------------------------------------------------------------------+ | 2 | Trace nick changes and parts on the channel and change the queue | | | accordingly. For example, bot will not try to kick users who have| | | already parted the channel. | +---+------------------------------------------------------------------+ ATTENTION: Setting 2 is very CPU intensive. There are additional settings for 'net-type' Efnet. *net-type 5 specific features:* Attention: Use this settings *only* if you set 'net-type' to Efnet! set check-mode-r 1 This settings defines how umode +r is understood by Eggdrop. Some networks use +r to indicate a restricted connection. If this is your case, and you want your bot to leave restricted servers and jump to the next server on its list, then set it to 1. Please note, this setting is automatically set to 0 for net-type of Efnet, Undernet, and DALnet, and set to 1 for net-type IRCNet. set nick-len 9 This setting allows you to specify the maximum nick-length supported by your network. The default setting is 9. The maximum supported length by Eggdrop is 32. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/uptime.rst0000664000175000017500000000157314703073435021266 0ustar geogeoLast revised: Mar 14, 2023 .. _uptime: ------------- Uptime Module ------------- This module reports uptime statistics to the uptime contest web site at ``_. Go look and see what your uptime is! It takes about 9 hours to show up, so if your bot isn't listed, try again later. Information sent to the server includes the bot's uptime, botnet-nick, server, version, and IP address. This information is stored in a temporary logfile for debugging purposes only. The only publicly available information will be the bot's botnet-nick, version and uptime. If you do not wish for this information to be sent, comment out the 'loadmodule uptime' line in your bot's config file. This module requires: server Put this line into your Eggdrop configuration file to load the uptime module:: loadmodule uptime Copyright (C) 2001 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/seen.rst0000664000175000017500000000117014703073435020706 0ustar geogeoLast revised: Mar 14, 2023 .. _seen: =========== Seen Module =========== This module provides very basic seen commands via msg, on channel or via dcc. This module works only for users in the bot's userlist. If you are looking for a better and more advanced seen module, try the gseen module originally written by G'Quann and forked/updated to work with modern Eggdrop by mortmann. You can find it at ``_. This module requires: none Put this line into your Eggdrop configuration file to load the seen module:: loadmodule seen Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/irc.rst0000664000175000017500000001317514703073435020541 0ustar geogeoLast revised: August 21, 2004 .. _irc: ========== IRC Module ========== This module controls the bots interaction on IRC. It allows the bot to join channels, etc. You have to load this if you want your bot to come on irc. This module requires: server, channels Put this line into your Eggdrop configuration file to load the irc module:: loadmodule irc There are also some variables you can set in your config file: set bounce-bans 1 Set this to 1 if you want to bounce all server bans. set bounce-exempts 0 Set this to 1 if you want to bounce all server exemptions (+e modes). This is disabled if use-exempts is disabled. set bounce-invites 0 Set this to 1 if you want to bounce all server invitations (+I modes). This is disabled if use-invites is disabled. set bounce-modes 0 Set this to 1 if you want to bounce all server modes. set max-modes 30 There is a global limit for +b/+e/+I modes. This limit should be set to the same value as max-bans for networks that do not support +e/+I. set max-bans 30 Set here the maximum number of bans you want the bot to set on a channel. Eggdrop will not place any more bans if this limit is reached. Undernet currently allows 45 bans, IRCnet allows 30, EFnet allows 100, and DALnet allows 100. set max-exempts 20 Set here the maximum number of exempts you want Eggdrop to set on a channel. Eggdrop will not place any more exempts if this limit is reached. set max-invites 20 Set here the maximum number of invites you want Eggdrop to set on a channel. Eggdrop will not place any more invites if this limit is reached. | set use-exempts 0 | set use-invites 0 These settings should be left commented unless the default values are being overridden. By default, exempts and invites are on for EFnet and IRCnet, but off for all other large networks. This behavior can be modified with the following 2 flags. If your network doesn't support +e/+I modes then you will be unable to use these features. set learn-users 0 If you want people to be able to add themselves to the bot's userlist with the default userflags (defined above in the config file) via the 'hello' msg command, set this to 1. set wait-split 600 Set here the time (in seconds) to wait for someone to return from a netsplit (i.e. wasop will expire afterwards). Set this to 1500 on IRCnet since its nick delay stops after 30 minutes. set wait-info 180 Set here the time (in seconds) that someone must have been off-channel before re-displaying their info line. set mode-buf-length 200 Set this to the maximum number of bytes to send in the arguments of modes sent to the server. Most servers default this to 200. | unbind msg - hello \*msg:hello | bind msg - myword \*msg:hello Many IRCops find bots by seeing if they reply to 'hello' in a msg. You can change this to another word by un-commenting these two lines and changing "myword" to the word wish to use instead of'hello'. It must be a single word. | unbind msg - ident \*msg:ident | unbind msg - addhost \*msg:addhost Many takeover attempts occur due to lame users blindly /msg ident'ing to the bot and attempting to guess passwords. We now unbind this command by default to discourage them. You can enable this command by un-commenting these two lines. | set opchars "@" | #set opchars "@&~" Some IRC servers are using some non-standard op-like channel prefixes/modes. Define them here so the bot can recognize them. Just "@" should be fine for most networks. Un-comment the second line for some UnrealIRCds. set no-chanrec-info 0 If you are so lame you want the bot to display peoples info lines, even when you are too lazy to add their chanrecs to a channel, set this to 1. *NOTE* This means *every* user with an info line will have their info line displayed on EVERY channel they join (provided they have been gone longer than wait-info). These were the core irc module settings. There are more settings for 'net-type' IRCnet and Efnet. net-type has to be set in the server module config section. Use the following settings only if you set 'net-type' to IRCnet! set prevent-mixing 1 At the moment, the current IRCnet IRCd version (2.10) doesn't support the mixing of b, o and v modes with e and I modes. This might be changed in the future, so use 1 at the moment for this setting. Use the following settings only if you set 'net-type' to Efnet! set kick-method 1 If your network supports more users per kick command then 1, you can change this behavior here. Set this to the number of users to kick at once, or set this to 0 for all at once. set modes-per-line 3 Some networks allow you to stack lots of channel modes into one line. They're all guaranteed to support at least 3, so that's the default. If you know your network supports more, you may want to adjust this. This setting is limited to 6, although if you want to use a higher value, you can modify this by changing the value of MODES_PER_LINE_MAX in src/chan.h and recompiling the bot. set include-lk 1 Some networks don't include the +l limit and +k or -k key modes in the modes-per-line (see above) limitation. Set include-lk to 0 for these networks. set use-354 0 Set this to 1 if your network uses IRCu2.10.01 specific /who requests. Eggdrop can, therefore, ask only for exactly what's needed. set rfc-compliant 1 If your network doesn't use rfc 1459 compliant string matching routines, set this to 0. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/transfer.rst0000664000175000017500000000220414703073435021577 0ustar geogeoLast revised: November 29, 2023 .. _transfer: =============== Transfer Module =============== The transfer module provides DCC SEND/GET support and userfile transfer support for userfile sharing. This module requires: none Put this line into your Eggdrop configuration file to load the transfer module:: loadmodule transfer There are also some variables you can set in your config file: set max-dloads 3 Set here the maximum number of simultaneous downloads to allow for each user. set dcc-block 0 Set here the block size for dcc transfers. ircII uses 512 bytes, but admits that may be too small. 1024 is standard these days. Set this to 0 to use turbo-dcc (recommended). set xfer-timeout 30 Set here the time (in seconds) to wait before an inactive transfer times out. set sharefail-unlink 1 By default, Eggdrop will abort the linking process if userfile sharing is enabled but the userfile transfer fails. Set this to 0 to keep the bots linked if the userfile transfer fails and retry every minute (both bots must be v1.9.0 or higher). Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/share.rst0000664000175000017500000000346014703073435021062 0ustar geogeoLast revised: November 27, 2003 .. _share: ============ Share Module ============ This module provides userfile sharing support between two directly linked bots. This module requires: transfer, channels Put this line into your Eggdrop configuration file to load the share module:: loadmodule share There are also some variables you can set in your config file: set allow-resync 0 When two bots get disconnected, this setting allows them to create a resync buffer which saves all changes done to the userfile during the disconnect. When they reconnect, they will not have to transfer the complete user file, but, instead, just send the resync buffer. set resync-time 900 This setting specifies how long to hold another bots resync data before flushing it. This is a setting for allow-resync. set private-global 0 When sharing user lists, DON'T ACCEPT global flag changes from other bots? NOTE: The bot will still send changes made on the bot, it just won't accept any global flag changes from other bots. This overrides the private-globals setting (below). set private-globals "mnot" When sharing user lists, if private-global isn't set, which global flag changes from other bots should be ignored? set private-user 0 When sharing user lists, don't accept ANY userfile changes from other bots? Paranoid people should use this feature on their hub bot. This will force all userlist changes to be made via the hub. set override-bots 0 This setting makes the bot discard its own bot records in favor of the ones sent by the hub. NOTE: No passwords or botflags are shared, only ports and address are added to sharing procedure. This only works with hubs that are v1.5.1 or higher. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/mod/channels.rst0000664000175000017500000004165014703073435021556 0ustar geogeoLast revised: October 25, 2010 .. _channels: =============== Channels Module =============== This module provides channel related support for the bot. Without it, you won't be able to make the bot join a channel or save channel specific userfile information. This module requires: none Put this line into your Eggdrop configuration file to load the channels module:: loadmodule channels There are also some variables you can set in your config file: set chanfile "LamestBot.chan" Enter here the filename where dynamic channel settings are stored. set force-expire 0 Set this setting to 1 if you want your bot to expire bans/exempts/invites set by other opped bots on the channel. set share-greet 0 Set this setting to 1 if you want your bot to share user greets with other bots on the channel if sharing user data. set use-info 1 Set this setting to 1 if you want to allow users to store an info line. set allow-ps 0 Set this setting to 1 if you want to allow both +p and +s channel modes to be enforced at the same time by the chanmode channel setting. Make sure your server supports +ps mixing or you may get endless mode floods. channel add #channel { SETTINGS } This command adds a static channel to your bot (it cannot be removed via the partyline- we recommend using the .+chan command on the partyline instead). This command will add the channel preconfigured with the specified settings. A full list of settings is defined in `Channel Settings`_. Channel Settings ---------------- There are two types of channel settings: value-based settings (where you configure a setting with a number or string), and enable/disable-based settings (where you turn a setting on or off). These settings can be configured via Tcl using the 'channel set' command: channel set This command modifies a specific channel setting for a channel. There are many different options for channels which you can define. Some settings are enabled or disabled by a plus or minus in front of them, and others directly take text or integer values. Value-based Channel Settings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chanmode +/- This setting makes the bot enforce channel modes. It will always enforce the + and remove the - modes. idle-kick 0 This setting will make the bot check every minute for idle users. Set this to 0 to disable idle check. stopnethack-mode 0 This setting will make the bot de-op anyone who enters the channel with serverops. There are seven different modes for this settings: +---+--------------------------------------------------------+ | 0 | turn off | +---+--------------------------------------------------------+ | 1 | isoptest (allow serverop if registered op) | +---+--------------------------------------------------------+ | 2 | wasoptest (allow serverop if user had op before split) | +---+--------------------------------------------------------+ | 3 | allow serverop if isop or wasop | +---+--------------------------------------------------------+ | 4 | allow serverop if isop and wasop. | +---+--------------------------------------------------------+ | 5 | If the channel is -bitch, see stopnethack-mode 3 | | +--------------------------------------------------------+ | | If the channel is +bitch, see stopnethack-mode 1 | +---+--------------------------------------------------------+ | 6 | If the channel is -bitch, see stopnethack-mode 2 | | +--------------------------------------------------------+ | | If the channel is +bitch, see stopnethack-mode 4 | +---+--------------------------------------------------------+ revenge-mode 0 This settings defines how the bot should punish bad users when revenging. There are four possible settings: +---+--------------------------------------------------------------------------+ | 0 | Deop the user. | +---+--------------------------------------------------------------------------+ | 1 | Deop the user and give them the +d flag for the channel. | +---+--------------------------------------------------------------------------+ | 2 | Deop the user, give them the +d flag for the channel, and kick them. | +---+--------------------------------------------------------------------------+ | 3 | Deop the user, give them the +d flag for the channel, kick, and ban them.| +---+--------------------------------------------------------------------------+ ban-type 3 This setting defines what type of bans should eggdrop place for +k users or when revenge-mode is 3. Available types are: +---+------------------------+ | 0 \*!user\@host | +---+------------------------+ | 1 \*!\*user\@host | +---+------------------------+ | 2 \*!\*\@host | +---+------------------------+ | 3 \*!\*user\@\*.host | +---+------------------------+ | 4 \*!\*\@*.host | +---+------------------------+ | 5 nick!user\@host | +---+------------------------+ | 6 nick!\*user\@host | +---+------------------------+ | 7 nick!\*\@host | +---+------------------------+ | 8 nick!\*user\@*.host | +---+------------------------+ | 9 nick!\*\@*.host | +---+------------------------+ You can also specify types from 10 to 19 which correspond to types 0 to 9, but instead of using a * wildcard to replace portions of the host, only numbers in hostnames are replaced with the '?' wildcard. Same is valid for types 20-29, but instead of '?', the '*' wildcard will be used. Types 30-39 set the host to '*'. ban-time 120 Set here how long temporary bans will last (in minutes). If you set this setting to 0, the bot will never remove them. exempt-time 60 Set here how long temporary exempts will last (in minutes). If you set this setting to 0, the bot will never remove them. The bot will check the exempts every X minutes, but will not remove the exempt if a ban is set on the channel that matches that exempt. Once the ban is removed, then the exempt will be removed the next time the bot checks. Please note that this is an IRCnet feature. invite-time 60 Set here how long temporary invites will last (in minutes). If you set this setting to 0, the bot will never remove them. The bot will check the invites every X minutes, but will not remove the invite if a channel is set to +i. Once the channel is -i then the invite will be removed the next time the bot checks. Please note that this is an IRCnet feature. aop-delay (minimum:maximum) This is used for autoop, autohalfop, autovoice. If an op or voice joins a channel while another op or voice is pending, the bot will attempt to put both modes on one line. +--------------+-----------------------------------------+ | aop-delay 0 | No delay is used. | +--------------+-----------------------------------------+ | aop-delay X | An X second delay is used. | +--------------+-----------------------------------------+ | aop-delay X:Y| A random delay between X and Y is used. | +--------------+-----------------------------------------+ need-op { putserv "PRIVMSG #lamest :op me cos i'm lame!" } This setting will make the bot run the script enclosed in braces if it does not have ops. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don't need to set this setting. need-invite { putserv "PRIVMSG #lamest :let me in!" } This setting will make the bot run the script enclosed in braces if it needs an invite to the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don't need to set this setting. need-key { putserv "PRIVMSG #lamest :let me in!" } This setting will make the bot run the script enclosed in braces if it needs the key to the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don't need to set this setting. need-unban { putserv "PRIVMSG #lamest :let me in!" } This setting will make the bot run the script enclosed in braces if it needs to be unbanned on the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don't need to set this setting. need-limit { putserv "PRIVMSG #lamest :let me in!" } This setting will make the bot run the script enclosed in braces if it needs the limit to be raised on the channel. This must be shorter than 120 characters. If you use scripts like getops.tcl or botnetop.tcl, you don't need to set this setting. flood-chan 15:60 Set here how many channel messages in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables text flood protection for the channel, where X is an integer >= 0. flood-deop 3:10 Set here how many deops in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables deop flood protection for the channel, where X is an integer >= 0. flood-kick 3:10 Set here how many kicks in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables kick flood protection for the channel, where X is an integer >= 0. flood-join 5:60 Set here how many joins in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables join flood protection for the channel, where X is an integer >= 0. flood-ctcp 3:60 Set here how many channel ctcps in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables ctcp flood protection for the channel, where X is an integer >= 0. flood-nick 5:60 Set here how many nick changes in how many seconds from one host constitutes a flood. Setting this to 0, 0:X or X:0 disables nick flood protection for the channel, where X is an integer >= 0. Enable/Disable Channel Settings ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ These settings should be preceded by a + or - to enable or disable the setting, respctively. enforcebans When a ban is set, kick people who are on the channel and match the ban dynamicbans Only activate bans on the channel when necessary? This keeps the channel's ban list from getting excessively long. The bot still remembers every ban, but it only activates a ban on the channel when it sees someone join who matches that ban. userbans Allow bans to be made by users directly? If turned off, the bot will require all bans to be made through the bot's console. dynamicexempts Only activate exempts on the channel when necessary? This keeps the channel's exempt list from getting excessively long. The bot still remembers every exempt, but it only activates a exempt on the channel when it sees a ban set that matches the exempt. The exempt remains active on the channel for as long as the ban is still active. userexempts Allow exempts to be made by users directly? If turned off, the bot will require all exempts to be made through the bot's console. dynamicinvites Only activate invites on the channel when necessary? This keeps the channel's invite list from getting excessively long. The bot still remembers every invite, but the invites are only activated when the channel is set to invite only and a user joins after requesting an invite. Once set, the invite remains until the channel goes to -i. userinvites Allow invites to be made by users directly? If turned off, the bot will require all invites to be made through the bot's console. autoop Op users with the +o flag as soon as they join the channel This is insecure and not recommended. autohalfop Halfop users with the +l flag as soon as they join the channel? This is insecure and not recommended. bitch Only let users with the +o flag have op on the channel greet Say a user's info line when they join the channel protectops Re-op a user with the +o flag if they get deopped? protecthalfops Re-halfop a user with the +l flag if they get dehalfopped protectfriends Re-op a user with the +f flag if they get deopped statuslog Log the channel status line every 5 minutes? This shows the bot's status on the channel (op, voice, etc.), the channel's modes, and the total number of members, ops, voices, regular users, and +b, +e, and +I modes on the channel. A sample status line follows: [01:40] @#lamest (+istn) : [m/1 o/1 v/4 n/7 b/1 e/5 I/7] revenge Remember people who deop/kick/ban the bot, valid ops, or friends and punish them? Users with the +f flag are exempt from revenge. revengebot This is similar to to the 'revenge' option, but it only triggers if a bot gets deopped, kicked or banned. autovoice Voice users with the +v flag when they join the channel? secret Prevent this channel from being listed on the botnet? shared Share channel-related user info for this channel? cycle Cycle the channel when it has no ops? dontkickops Do you want the bot not to be able to kick users who have the +o flag, letting them kick-flood for instance to protect the channel against clone attacks? inactive This prevents the bot from joining the channel (or makes it leave the channel if it is already there). It can be useful to make the bot leave a channel without losing its settings, channel-specific user flags, channel bans, and without affecting sharing. seen Respond to seen requests in the channel? The seen module must be loaded for this to work. nodesynch Allow non-ops to perform channel modes? This can stop the bot from fighting with services such as ChanServ, or from kicking IRCops when setting channel modes without having ops. static Allow only permanent owners to remove the channel Default Channel Values ---------------------- The following settings are used as default values when you .+chan #chan or .tcl channel add #chan. You can modify these default values by adding the below values to your config fil. Look in the `Channel Settings`_ for an explanation of each option. set default-flood-chan 15:60 set default-flood-deop 3:10 set default-flood-kick 3:10 set default-flood-join 5:60 set default-flood-ctcp 3:60 set default-flood-nick 5:60 set default-aop-delay 5:30 set default-idle-kick 0 set default-chanmode "nt" set default-stopnethack-mode 0 set default-revenge-mode 0 set default-ban-type 3 set default-ban-time 120 set default-exempt-time 60 set default-invite-time 60 set default-chanset { | -autoop | -autovoice | -bitch | +cycle | +dontkickops | +dynamicbans | +dynamicexempts | +dynamicinvites | -enforcebans | +greet | -inactive | -nodesynch | -protectfriends | +protectops | -revenge | -revengebot | -secret | -seen | +shared | -statuslog | +userbans | +userexempts | +userinvites | -protecthalfops | -autohalfop | -static } Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/index.rst0000664000175000017500000000431014703073435020303 0ustar geogeoEggdrop Module Information Last revised: Jul 25, 2016 Eggdrop Module Information ========================== What are modules? ----------------- Modules are independent portions of code that are loaded separately from the main core code of Eggdrop. This allows users to only implement the features they desire without adding the extra overhead or "bloat" of those they don't, or even write their own module to add an enhancement not currently implemented by the Eggdrop development team. For example, the transfer module provides the ability to transfer files to and from the Eggdrop, and the ident module provides the ability to run an ident server to answer ident requests. How to install a module ----------------------- Please note that these are only basic instructions for compiling and installing a module. Please read any and all directions included with the module you wish to install. 1. Download and un-tar the Eggdrop source code. 2. Place the new module in its own directory (in the format of (modulename).mod) in src/mod. 3. Run ./configure (from eggdrop-|version|/). 4. Type 'make config' or 'make iconfig'. 5. Type 'make'. 6. Copy the compiled module file (modulename.so) into your bot's modules folder. 7. Add 'loadmodule modulename' to your eggdrop.conf file (do not add the .so suffix). 8. Rehash or restart your bot. To view your currently loaded modules, type '.module'. Can I compile Eggdrop without dynamic modules? (Static compile) --------------------------------------------------------------- Yes, you can. If the configure script detects that your system CAN'T run modules, it will setup 'make' to link the modules in statically for you. You can choose this option yourself by using 'make static'. You can also try to compile dynamic modules on a static-only system by using 'make eggdrop'. Do I still need to 'loadmodule' modules? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ YES, when you compile statically, all the modules are linked into the main executable. HOWEVER, they are not enabled until you use loadmodule to enable them, hence you get nearly the same functionality with static modules as with dynamic modules. Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/modules/included.rst0000664000175000017500000001126414703073435020771 0ustar geogeoModules included with Eggdrop ============================= .. toctree:: mod/assoc mod/blowfish mod/channels mod/compress mod/console mod/ctcp mod/dns mod/filesys mod/ident mod/irc mod/notes mod/pbkdf2 mod/python mod/seen mod/server mod/share mod/transfer mod/twitch mod/woobie mod/uptime :ref:`assoc` This module provides assoc support, i.e. naming channels on the botnet. :ref:`blowfish` This module has been deprecated in favor of the pbkdf2 module for hashing purposes, such as passwords in the userfile. However, it is still required for encrypting/decrypting strings. :ref:`channels` This module provides channel related support for the bot. Without it, you won't be able to make the bot join a channel or save channel specific userfile information. :ref:`compress` This module provides support for file compression. This allows the bot to transfer compressed user files and, therefore, save a significant amount of bandwidth. :ref:`console` This module provides storage of console settings when you exit the bot or type .store on the partyline. :ref:`ctcp` This module provides the normal ctcp replies that you'd expect. Without it loaded, CTCP CHAT will not work. :ref:`dns` This module provides asynchronous dns support. This will avoid long periods where the bot just hangs there, waiting for a hostname to resolve, which will often let it timeout on all other connections. :ref:`filesys` This module provides an area within the bot where users can store and manage files. With this module, the bot is usable as a file server. :ref:`ident` This module adds Eggdrop support for the externally-provided oident service, or alternatively the ability for Eggdrop to act as its own ident daemon. :ref:`irc` This module provides basic IRC support for your bot. You have to load this if you want your bot to come on IRC. :ref:`notes` This module provides support for storing of notes for users from each other. Note sending between currently online users is supported in the core, this is only for storing the notes for later retrieval. :ref:`pbkdf2` This modules updates Eggdrop to use PBKDF2 for hashing purposes, such as for userfile passwords. It was specifically designed to work with the blowfish module to make the transition from blowfish to pbkdf2 password hashing as easy as possible. If you are transitioning a userfile from 1.8 or earlier, you should load this AND the blowfish module. By doing so, Eggdrop will seamlessly update the old blowfish hashes to the new PBKDF2 hashes once a user logs in for the first time, and allow you to (eventually) remove the blowfish module altogether. For new bots, you should load this module by itself and not use the blowfish module. The blowfish module is still required if you use Tcl to encrypt/decrypt strings in Tcl (ie, some scripts). Eggdrop will not start without a password-hashing module loaded. :ref:`python` This module adds a python interpreter to Eggdrop, enabling you to run python scripts on your Eggdrop! :ref:`seen` This module provides very basic seen commands via msg, on channel or via dcc. This module works only for users in the bot's userlist. If you are looking for a better and more advanced seen module, try the gseen module, originally written by G'Quann and forked/updated for modern Eggdrop by mortmann. You can find it at ``_ :ref:`server` This module provides the core server support. You have to load this if you want your bot to come on IRC. Not loading this is equivalent to the old NO_IRC define. :ref:`share` This module provides userfile sharing support between two directly linked bots. :ref:`transfer` The transfer module provides DCC SEND/GET support and userfile transfer support for userfile sharing. :ref:`twitch` The Twitch module modifies Eggdrop to interact with the Twitch service. Twitch uses a modified implementation of IRC so not all functionality will be present. Please read doc/TWITCH for specifics on how to best use the Tiwtch module. :ref:`uptime` This module reports uptime statistics to the uptime contest web site at ``_. Go look and see what your uptime is! It takes about 9 hours to show up, so if your bot isn't listed, try again later. See doc/settings/mod.uptime for more information, including details on what information is sent to the uptime server. :ref:`woobie` This is for demonstrative purposes only. If you are looking for starting point in writing modules, woobie is the right thing. eggdrop-1.10.0/doc/sphinx_source/Makefile0000664000175000017500000001522014703073435016434 0ustar geogeo# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = .. # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: @echo "Do not use this, remember what happened last time?" html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Eggdrop.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Eggdrop.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/Eggdrop" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Eggdrop" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." eggdrop-1.10.0/doc/sphinx_source/using/0000775000175000017500000000000014703073435016121 5ustar geogeoeggdrop-1.10.0/doc/sphinx_source/using/partyline.rst0000664000175000017500000000352414703073435020666 0ustar geogeoLast revised: December 31, 2001 ============== The Party Line ============== The most important way you will communicate with your bot is through the party line. The party line is accessible via DCC chat or telnet. It's pretty much just a miniature, lag-less IRC (see doc/BOTNET), but it also consists of a console through which you can watch channel activity and give commands. To enter the party line, DCC chat or open a telnet connection to your bot. It should ask for your password if you've set one. If you don't have one set, use the /msg PASS command to set one. The party line is actually split up into 200,000 "channels". The console is available from each channel, but you can only talk to people who are on your current channel (just like IRC). Channel 0 is the main party line, while others are typically reserved for private conversations. Channels 1-99,999 are botnet wide chat channels and any user joining that channel anywhere on the botnet will be able to chat with you. Channels \*0-\*99,999 are local channels (only people on the bot you are on can chat with you on these channels). Console commands start with a dot (.), similar to the slash (/) used for IRC commands. At any time, you can type ".help all" to get a list of all possible commands. To find out what a command does, use ".help ". For example: ".help channel". When you're on the party line, anything you type that doesn't start with a dot (.), a comma (,), or an apostrophe (') is considered to be broadcast to everyone else, just like talking on a channel. A message prefixed with a comma goes only to other bot owners (+n). A message prefixed with an apostrophe is sent to all users on the local bot only. You can change channels with the ".chat" command or even leave all channels with ".chat off". Copyright (C) 2002 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/tcl-commands.rst0000664000175000017500000045273414703073435021253 0ustar geogeo.. highlight:: text Eggdrop Tcl Commands Last revised: January 6, 2024 ==================== Eggdrop Tcl Commands ==================== This is an exhaustive list of all the Tcl commands added to Eggdrop. All of the normal Tcl built-in commands are still there, of course, but you can also use these to manipulate features of the bot. They are listed according to category. This list is accurate for Eggdrop v1.10.0. Most scripts written for the v1.3, v1.4, 1.6, 1.8, and 1.9 series of Eggdrop should probably work in their current form, with only a very few needing minor modifications. Scripts which were written for v0.9, v1.0, v1.1 or v1.2 will probably not work without modification. Output Commands --------------- ^^^^^^^^^^^^^^^^^^^^^^^^ putserv [options] ^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends text to the server, like '.dump' (intended for direct server commands); output is queued so that the bot won't flood itself off the server. Options: -next push messages to the front of the queue -normal no effect Returns: nothing Module: server ^^^^^^^^^^^^^^^^^^^^^^^^ puthelp [options] ^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends text to the server, like 'putserv', but it uses a different queue intended for sending messages to channels or people. Options: -next push messages to the front of the queue -normal no effect Returns: nothing Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^ putquick [options] ^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends text to the server, like 'putserv', but it uses a different (and faster) queue. Options: -next push messages to the front of the queue -normal no effect Returns: nothing Module: server ^^^^^^^^^^^^^^^^^^^^^^^^ putnow [-oneline] ^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends text to the server immediately, bypassing all queues. Use with caution, as the bot may easily flood itself off the server. Options: -oneline send text up to the first \r or \n, discarding the rest Returns: nothing Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ putkick [reason] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends kicks to the server and tries to put as many nicks into one kick command as possible. Returns: nothing Module: irc ^^^^^^^^^^^^^ putlog ^^^^^^^^^^^^^ Description: logs to the logfile and partyline if the 'misc' flag (o) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. Returns: nothing Module: core ^^^^^^^^^^^^^^^^ putcmdlog ^^^^^^^^^^^^^^^^ Description: logs to the logfile and partyline if the 'cmds' flag (c) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^ putxferlog ^^^^^^^^^^^^^^^^^ Description: logs to the logfile and partyline if the 'files' flag (x) is active via the 'logfile' config file setting and the '.console' partyline setting, respectively. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ putloglev ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: logs to the logfile and partyline at the log level of the specified flag. Use "*" in lieu of a flag to indicate all log levels. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ dumpfile ^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: dumps file from the help/text directory to a user on IRC via msg (one line per msg). The user has no flags, so the flag bindings won't work within the file. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^ queuesize [queue] ^^^^^^^^^^^^^^^^^ Returns: the number of messages in all queues. If a queue is specified, only the size of this queue is returned. Valid queues are: mode, server, help. Module: server ^^^^^^^^^^^^^^^^^^ clearqueue ^^^^^^^^^^^^^^^^^^ Description: removes all messages from a queue. Valid arguments are: mode, server, help, or all. Returns: the number of deleted lines from the specified queue. Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cap [arg] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: displays CAP status or sends a raw CAP command to the server. "ls" will list the capabilities Eggdrop is internally tracking as supported by the server. "values" will list all capabilities and their associated CAP 302 values (if any) as a key/value pair, and "values" with a capability name as arg will list the values associated for the capability. "enabled" will list the capabilities Eggdrop is internally tracking as negotiated with the server. "req" will request the capabilities listed in "arg" from the server. "raw" will send a raw CAP command to the server. The arg field is a single argument, and should be submitted as a single string. For example, to request capabilities foo and bar, you would use [cap req "foo bar"], and for example purposes, sending the same request as a raw command would be [cap raw "REQ :foo bar"]. Returns: a list of CAP capabilities for the "enabled" and "ls" sub-commands; a dict of capability/value pairs for the "values" command or a list if "values" if followed by an argument; otherwise nothing. Module: server ^^^^^^^^^^^^^^^^^^^^^^ tagmsg ^^^^^^^^^^^^^^^^^^^^^^ Description: sends an IRCv3 TAGMSG command to the target. Only works if message-tags has been negotiated with the server via the cap command. tags is a Tcl dict (or space-separated string) of the tags you wish to send separated by commas (do not include the @prefix), and target is the nickname or channel you wish to send the tags to. To send a tag only (not a key/value pair), use a "" as the value for a key in a dict, or a "{}" if you are sending as a space-separated string. Examples: set mytags [dict create +foo bar moo baa +last ""]; tagmsg $mytags #channel tagmsg "+foo bar moo baa +last {}" #channel Returns: nothing Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server add [[+]port [password]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a server to the list of servers Eggdrop will connect to. Prefix the port with '+' to indicate an SSL-protected port. A port value is required if password is to be specified. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000). Returns: nothing Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ server remove [[+]port] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: removes a server from the list of servers Eggdrop will connect to. If no port is provided, all servers matching the ip or hostname provided will be removed, otherwise only the ip/host with the corresponding port will be removed. The SSL status (+) of the provided port is matched against as well (ie, 7000 is not the same as +7000). Returns: nothing Module: server ^^^^^^^^^^^ server list ^^^^^^^^^^^ Description: lists all servers currently added to the bots internal server list Returns: A list of lists in the format {{hostname} {port} {password}} Module: server User Record Manipulation Commands --------------------------------- ^^^^^^^^^^ countusers ^^^^^^^^^^ Returns: number of users in the bot's database Module: core ^^^^^^^^^^^^^^^^^^ validuser ^^^^^^^^^^^^^^^^^^ Returns: 1 if a user by that name exists; 0 otherwise Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ finduser [-account] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: finds the internal user record which most closely matches the given value. When used with the -account flag, value is a services account name, otherwise by default value is a string in the hostmask format of nick!user\@host. Returns: the handle found, or "*" if none Module: core ^^^^^^^^^^^^^^^^ userlist [flags] ^^^^^^^^^^^^^^^^ Returns: a list of users on the bot. You can use the flag matching system here ([global]{&/\|}[chan]{&/\|}[bot]). '&' specifies "and"; '|' specifies "or". Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ passwdok ^^^^^^^^^^^^^^^^^^^^^^^^ Description: checks the password given against the user's password. Check against the password "-" to find out if a user has no password set. Returns: 1 if the password matches for that user; 0 otherwise. Or if we are checking against the password "-": 1 if the user has no password set; 0 otherwise. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getuser [entry-type] [extra info] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: an interface to the new generic userfile support. Without an entry-type, it returns a flat key/value list (dict) of all set entries. Valid entry types are: +----------+-------------------------------------------------------------------------------------+ | ACCOUNT | returns thee a list of servivce accounts associated with the user | +----------+-------------------------------------------------------------------------------------+ | BOTFL | returns the current bot-specific flags for the user (bot-only) | +----------+-------------------------------------------------------------------------------------+ | BOTADDR | returns a list containing the bot's address, bot listen port, and user listen port | +----------+-------------------------------------------------------------------------------------+ | HOSTS | returns a list of hosts for the user | +----------+-------------------------------------------------------------------------------------+ | LASTON | returns a list containing the unixtime last seen and the last seen place. | | | LASTON #channel returns the time last seen time for the channel or 0 if no info | | | exists. | +----------+-------------------------------------------------------------------------------------+ | INFO | returns the user's global info line | +----------+-------------------------------------------------------------------------------------+ | XTRA | returns the user's XTRA info | +----------+-------------------------------------------------------------------------------------+ | COMMENT | returns the master-visible only comment for the user | +----------+-------------------------------------------------------------------------------------+ | HANDLE | returns the user's handle as it is saved in the userfile | +----------+-------------------------------------------------------------------------------------+ | PASS | returns the user's encrypted password | +----------+-------------------------------------------------------------------------------------+ For additional custom user fields, to include the deprecated "EMAIL" and "URL" fields, reference scripts/userinfo.tcl. Returns: info specific to each entry-type Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setuser [extra info] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: this is the counterpart of getuser. It lets you set the various values. Other then the ones listed below, the entry-types are the same as getuser's. +---------+---------------------------------------------------------------------------------------+ | Type | Extra Info | +=========+=======================================================================================+ | ACCOUNT | [account] | | | If no value is specified, all accounts for the user will be cleared. Otherwise, only | | | a single account will be added to the account list | +---------+---------------------------------------------------------------------------------------+ | PASS | | | | Password string (Empty value will clear the password) | +---------+---------------------------------------------------------------------------------------+ | BOTADDR |
[bot listen port] [user listen port] | | | Sets address, bot listen port and user listen port. If no listen ports are | | | specified, only the bot address is updated. If only the bot listen port is | | | specified, both the bot and user listen ports are set to the bot listen port. | +---------+---------------------------------------------------------------------------------------+ | HOSTS | [hostmask] | | | If no value is specified, all hosts for the user will be cleared. Otherwise, only | | | *1* hostmask is added :P | +---------+---------------------------------------------------------------------------------------+ | LASTON | This setting has 3 forms. | | | | | | | | | sets global LASTON time. Standard values used by Eggdrop for are partyline, | | | linked, unlinked, filearea, <#channel>, and <@remotebotname>, but can be set to | | | anything. | | | | | | | | | sets global LASTON time (leaving the place field empty) | | | | | | | | | sets a user's LASTON time for a channel (if it is a valid channel) | +---------+---------------------------------------------------------------------------------------+ Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chhandle ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: changes a user's handle Returns: 1 on success; 0 if the new handle is invalid or already used, or if the user can't be found Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chattr [changes [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: changes the attributes for a user record, if you include any. Changes are of the form '+f', '-o', '+dk', '-o+d', etc. If changes are specified in the format of \| , the channel-specific flags for that channel are altered. You can now use the +o|-o #channel format here too. Returns: new flags for the user (if you made no changes, the current flags are returned). If a channel was specified, the global AND the channel-specific flags for that channel are returned in the format of globalflags|channelflags. "*" is returned if the specified user does not exist. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ botattr [changes [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: similar to chattr except this modifies bot flags rather than normal user attributes. Returns: new flags for the bot (if you made no changes, the current flags are returned). If a channel was specified, the global AND the channel-specific flags for that channel are returned in the format of globalflags|channelflags. "*" is returned if the specified bot does not exist. Module: core .. _matchattr: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchattr [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: checks if the flags of the specified user match the flags provided. "flags" is of the form:: [+/-][&/|[&/|]] Either | or & can be used as a separator between global, channel, and bot flags, but only one separator can be used per flag section. A '+' is used to check if a user has the subsequent flags, and a '-' is used to check if a user does NOT have the subsequent flags. Please see `Flag Masks`_ for additional information on flag usage. Returns: 1 if the specified user has the flags matching the provided mask; 0 otherwise Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ adduser [hostmask] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: creates a new user entry with the handle and hostmask given (with no password and the default flags) Returns: 1 if successful; 0 if the handle already exists Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ addbot
[botport [userport]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a new bot to the userlist with the handle and botaddress given (with no password and no flags).
format is one of: - ipaddress - ipv4address:botport/userport [DEPRECATED] - [ipv6address]:botport/userport [DEPRECATED] NOTE 1: The []s around the ipv6address argument are literal []s, not optional arguments. NOTE 2: In the deprecated formats, an additional botport and/or userport given as follow-on arguments are ignored. Returns: 1 if successful; 0 if the bot already exists or a port is invalid Module: core ^^^^^^^^^^^^^^^^ deluser ^^^^^^^^^^^^^^^^ Description: attempts to erase the user record for a handle Returns: 1 if successful, 0 if no such user exists Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ delhost ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: deletes a hostmask from a user's host list Returns: 1 on success; 0 if the hostmask (or user) doesn't exist Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ addchanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a channel record for a user Returns: 1 on success; 0 if the user or channel does not exist Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ delchanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: removes a channel record for a user. This includes all associated channel flags. Returns: 1 on success; 0 if the user or channel does not exist Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ haschanrec ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the given handle has a chanrec for the specified channel; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchaninfo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: info line for a specific channel (behaves just like 'getinfo') Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setchaninfo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sets the info line on a specific channel for a user. If info is "none", it will be removed. Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchanban [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a ban to the ban list of a channel; creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, ban-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ban. Options: +-----------+-------------------------------------------------------------------------------------+ | sticky | forces the ban to be always active on a channel, even with dynamicbans on | +-----------+-------------------------------------------------------------------------------------+ Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newban [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a ban to the global ban list (which takes effect on all channels); creator is given credit for the ban in the ban list. lifetime is specified in minutes. If lifetime is not specified, default-ban-time (usually 120) is used. Setting the lifetime to 0 makes it a permanent ban. Options: +-----------+-------------------------------------------------------------------------------------+ | sticky | forces the ban to be always active on a channel, even with dynamicbans on | +-----------+-------------------------------------------------------------------------------------+ Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchanexempt [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a exempt to the exempt list of a channel; creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed. For timed bans, once the time period has expired, the exempt will not be removed until the corresponding ban has either expired or been removed. Options: +-----------+-------------------------------------------------------------------------------------+ | sticky | forces the exempt to be always active on a channel, even with dynamicexempts on | +-----------+-------------------------------------------------------------------------------------+ Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newexempt [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a exempt to the global exempt list (which takes effect on all channels); creator is given credit for the exempt in the exempt list. lifetime is specified in minutes. If lifetime is not specified, exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent exempt. The exempt will not be removed until the corresponding ban has been removed. Options: +-----------+-------------------------------------------------------------------------------------+ | sticky | forces the exempt to be always active on a channel, even with dynamicexempts on | +-----------+-------------------------------------------------------------------------------------+ Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newchaninvite [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a invite to the invite list of a channel; creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i. Options: +-----------+-------------------------------------------------------------------------------------+ | sticky | forces the invite to be always active on a channel, even with dynamicinvites on | +-----------+-------------------------------------------------------------------------------------+ Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newinvite [lifetime] [options] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a invite to the global invite list (which takes effect on all channels); creator is given credit for the invite in the invite list. lifetime is specified in minutes. If lifetime is not specified, invite-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent invite. The invite will not be removed until the channel has gone -i. Options: +-----------+-------------------------------------------------------------------------------------+ | sticky | forces the invite to be always active on a channel, even with dynamicinvites on | +-----------+-------------------------------------------------------------------------------------+ Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: makes a ban sticky, or, if a channel is specified, then it is set sticky on that channel only. Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: makes a ban no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: makes an exempt sticky, or, if a channel is specified, then it is set sticky on that channel only. Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: makes an exempt no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stickinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: makes an invite sticky, or, if a channel is specified, then it is set sticky on that channel only. Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unstickinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: makes an invite no longer sticky, or, if a channel is specified, then it is unstuck on that channel only. Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchanban ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: removes a ban from the ban list for a channel Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^ killban ^^^^^^^^^^^^^ Description: removes a ban from the global ban list Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchanexempt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: removes an exempt from the exempt list for a channel Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^ killexempt ^^^^^^^^^^^^^^^^^^^ Description: removes an exempt from the global exempt list Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ killchaninvite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: removes an invite from the invite list for a channel Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^ killinvite ^^^^^^^^^^^^^^^^^^^ Description: removes an invite from the global invite list Returns: 1 on success; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^ ischanjuped ^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the channel is juped, and the bot is unable to join; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isban [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified ban is in the global ban list; 0 otherwise. If a channel is specified, that channel's ban list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel bans are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ispermban [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified ban is in the global ban list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel's ban list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel bans are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isexempt [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified exempt is in the global exempt list; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel exempts are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ispermexempt [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified exempt is in the global exempt list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel exempts are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isinvite [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified invite is in the global invite list; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel invites are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isperminvite [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified invite is in the global invite list AND is marked as permanent; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel invites are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isbansticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified ban is marked as sticky in the global ban list; 0 otherwise. If a channel is specified, that channel's ban list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel bans are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isexemptsticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified exempt is marked as sticky in the global exempt list; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel exempts are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isinvitesticky [channel [-channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified invite is marked as sticky in the global invite list; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. If the -channel flag is used at the end of the command, \*only\* the channel invites are checked. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchban [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified nick!user\@host matches a ban in the global ban list; 0 otherwise. If a channel is specified, that channel's ban list is checked as well. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchexempt [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified nick!user\@host matches an exempt in the global exempt list; 0 otherwise. If a channel is specified, that channel's exempt list is checked as well. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchinvite [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified nick!user\@host matches an invite in the global invite list; 0 otherwise. If a channel is specified, that channel's invite list is checked as well. Module: channels ^^^^^^^^^^^^^^^^^ banlist [channel] ^^^^^^^^^^^^^^^^^ Returns: a list of global bans, or, if a channel is specified, a list of channel-specific bans. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format. Module: channels ^^^^^^^^^^^^^^^^^^^^ exemptlist [channel] ^^^^^^^^^^^^^^^^^^^^ Returns: a list of global exempts, or, if a channel is specified, a list of channel-specific exempts. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format. Module: channels ^^^^^^^^^^^^^^^^^^^^ invitelist [channel] ^^^^^^^^^^^^^^^^^^^^ Returns: a list of global invites, or, if a channel is specified, a list of channel-specific invites. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, last time active, and creator. The three timestamps are in unixtime format. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ newignore [lifetime] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds an entry to the ignore list; creator is given credit for the ignore. lifetime is how many minutes until the ignore expires and is removed. If lifetime is not specified, ignore-time (usually 60) is used. Setting the lifetime to 0 makes it a permanent ignore. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^ killignore ^^^^^^^^^^^^^^^^^^^^^ Description: removes an entry from the ignore list Returns: 1 if successful; 0 otherwise Module: core ^^^^^^^^^^ ignorelist ^^^^^^^^^^ Returns: a list of ignores. Each entry is a sublist containing: hostmask, comment, expiration timestamp, time added, and creator. The timestamps are in unixtime format. Module: core ^^^^^^^^^^^^^^^^^^^ isignore ^^^^^^^^^^^^^^^^^^^ Returns: 1 if the ignore is in the list; 0 otherwise Module: core ^^^^ save ^^^^ Description: writes the user and channel files to disk Returns: nothing Module: core ^^^^^^ reload ^^^^^^ Description: loads the userfile from disk, replacing whatever is in memory Returns: nothing Module: core ^^^^^^ backup ^^^^^^ Description: makes a simple backup of the userfile that's on disk. If the channels module is loaded, this also makes a simple backup of the channel file. Returns: nothing Module: core ^^^^^^^^^^^^^ getting-users ^^^^^^^^^^^^^ Returns: 1 if the bot is currently downloading a userfile from a sharebot (and hence, user records are about to drastically change); 0 if not Module: core Channel Commands ---------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel add [option-list] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: adds a channel record for the bot to monitor. The full list of possible options are given in doc/settings/mod.channels. Note that the channel options must be in a list (enclosed in {}). Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel set ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sets options for the channel specified. `options` is a flat list of either +/-settings or key/value pairs. The full list of possible options are given in doc/settings/mod.channels. Note: Tcl code settings such as the need-* settings must be valid Tcl code as a single word, for example ``channel set #lamest need-op { putmsg ChanServ "op #lamest" }`` Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^ channel info ^^^^^^^^^^^^^^^^^^^ Returns: a list of info about the specified channel's settings. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channel get [setting] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: The value of the setting you specify. For flags, a value of 0 means it is disabled (-), and non-zero means enabled (+). If no setting is specified, a flat list of all available settings and their values will be returned. Module: channels ^^^^^^^^^^^^^^^^^^^^^ channel remove ^^^^^^^^^^^^^^^^^^^^^ Description: removes a channel record from the bot and makes the bot no longer monitor the channel Returns: nothing Module: channels ^^^^^^^^^^^^ savechannels ^^^^^^^^^^^^ Description: saves the channel settings to the channel-file if one is defined. Returns: nothing Module: channels ^^^^^^^^^^^^ loadchannels ^^^^^^^^^^^^ Description: reloads the channel settings from the channel-file if one is defined. Returns: nothing Module: channels ^^^^^^^^ channels ^^^^^^^^ Returns: a list of the channels the bot has a channel record for Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ channame2dname ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chandname2name ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: these two functions are important to correctly support !channels. The bot differentiates between channel description names (chan dnames) and real channel names (chan names). The chan dnames are what you would normally call the channel, such as "!channel". The chan names are what the IRC server uses to identify the channel. They consist of the chan dname prefixed with an ID; such as "!ABCDEchannel". For bot functions like isop, isvoice, etc. you need to know the chan dnames. If you communicate with the server, you usually get the chan name, though. That's what you need the channame2dname function for. If you only have the chan dname and want to directly send raw server commands, use the chandname2name command. NOTE: For non-!channels, chan dname and chan name are the same. Module: irc ^^^^^^^^^^^^^^^^ isbotnick ^^^^^^^^^^^^^^^^ Returns: 1 if the nick matches the botnick; 0 otherwise Module: server ^^^^^^^^^^^^^^^^^ botisop [channel] ^^^^^^^^^^^^^^^^^ Returns: 1 if the bot has ops on the specified channel (or any channel if no channel is specified); 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^ botishalfop [channel] ^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the bot has halfops on the specified channel (or any channel if no channel is specified); 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^ botisvoice [channel] ^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the bot has a voice on the specified channel (or any channel if no channel is specified); 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^ botonchan [channel] ^^^^^^^^^^^^^^^^^^^ Returns: 1 if the bot is on the specified channel (or any channel if no channel is specified); 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^ isop [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and has ops; 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ishalfop [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and has halfops; 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^ wasop ^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if someone that just got opped/deopped in the chan had op before the modechange; 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ washalfop ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if someone that just got halfopped/dehalfopped in the chan had halfop before the modechange; 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isvoice [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if someone by that nickname is on the channel (or any channel if no channel is specified) and has voice (+v); 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isidentified [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: determine if a user is identified to irc services. WARNING: this may not be accurate depending on the server and configuration. For accurate results, the server must support (and Eggdrop must have enabled via CAP) the account-notify and extended-join capabilities, and the server must understand WHOX requests (also known as raw 354 responses) Returns: 1 if someone by the specified nickname is on the channel (or any channel if no channel name is specified) and is logged in); 0 otherwise. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^ isaway [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: determine if a user is marked as 'away' on a server. IMPORTANT: this command is only "mostly" reliable on its own when the IRCv3 away-notify capability is available and negotiated with the IRC server (if you didn't add this to your config file, it likely isn't enabled- you can confirm using the ``cap`` Tcl command). Additionally, there is no way for Eggdrop (or any client) to capture a user's away status when the user first joins a channel (they are assumed present by Eggdrop on join). To use this command without the away-notify capability negotiated, or to get a user's away status on join (via a JOIN bind), use ``refreshchan w`` on a channel the user is on, which will refresh the current away status stored by Eggdrop for all users on the channel. Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as 'away' (again, see disclaimer above) by an IRC server; 0 otherwise. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ isircbot [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: determine if a user has denoted themselves as a bot via an ircd-defined user flag (declared via BOT in a server's 005/ISUPPORT line). Due to server implementations, accurately monitoring this is incredibly fragile, as the flag can be added and removed by a user without any notification to other users. To ensure this status is current for use, it is recommended to use ``refreshchan w`` on a channel the user is on, which will refresh if the user is a bot or not for all users on the channel. If a server does not advertise BOT in its ISUPPORT line but still supports it (currently the case for unrealircd), you can manually set it by adding "BOT=B" (or whatever flag is used) to the isupport-default setting in your eggdrop.conf file. Returns: 1 if Eggdrop is currently tracking someone by that nickname marked as a bot by an IRC server; 0 otherwise. ^^^^^^^^^^^^^^^^^^^^^^^^^^^ onchan [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if someone by that nickname is on the specified channel (or any channel if none is specified); 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ monitor [nickname] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: interacts with the list of nicknames Eggdrop has asked the IRC server to track. valid sub-commands are add, delete, list, online, offline, status, and clear. The 'add' command sends 'nickname' to the server to track. The 'delete' command removes 'nickname' from being tracked by the server (or returns an error if the nickname is not present). The 'list' command returns a list of all nicknames the IRC server is tracking on behalf of Eggdrop. The 'online' command returns a string of tracked nicknames that are currently online. The 'offline' command returns a list of tracked nicknames that are currently offline. Returns: The 'add' sub-command returns a '1' if the nick was successfully added, a '0' if the nick is already in the monitor list, and a '2' if the nick could not be added. The 'delete' sub-command returns a '1' if the nick is removed, or an error if the nick is not found. The 'status' sub-command returns a '1' if 'nickname' is online or a 0 if 'nickname' is offline. The 'clear' command removes all nicknames from the list the server is monitoring. Module: irc ^^^^^^^^^^^^^^^ accounttracking ^^^^^^^^^^^^^^^ Description: checks to see if the three required functionalities to enable proper account tracking are available (and enabled) to Eggdrop. This checks if the extended-join and account-notify IRCv3 capabilities are currently enabled, and checks if the server supports WHOX (based on the type of server selected in the config file, or the use-354 variable being set to 1 when selecting an "Other" server). Returns: a '1' if all three functionalities are present, a '0' if one or more are missing. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getaccount [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: the services account name associated with nickname, "*" if the user is not logged into services, or "" if eggdrop does not know the account status of the user. NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking. please see doc/ACCOUNTS for additional information. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ nick2hand [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: the handle of a nickname on a channel. If a channel is not specified, the bot will check all of its channels. If the nick is not found, "" is returned. If the nick is found but does not have a handle, "*" is returned. If no channel is specified, all channels are checked. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ account2nicks [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nickname matches the given account; "" is returned if no match is found. This command will only work if a server supports (and Eggdrop has enabled) the account-notify and extended-join capabilities, and the server understands WHOX requests (also known as raw 354 responses). If no channel is specified, all channels are checked. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hand2nick [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: nickname of the first person on the specified channel (if one is specified) whose nick!user\@host matches the given handle; "" is returned if no match is found. If no channel is specified, all channels are checked. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ hand2nicks [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: a de-duplicated Tcl list of the nickname(s) on the specified channel (if one is specified) whose nick!user\@host matches the given handle; "" is returned if no match is found. If no channel is specified, all channels are checked. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ handonchan [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the the nick!user\@host for someone on the channel (or any channel if no channel name is specified) matches for the handle given; 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^ ischanban ^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified ban is on the given channel's ban list (not the bot's banlist for the channel) Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ischanexempt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified exempt is on the given channel's exempt list (not the bot's exemptlist for the channel) Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ischaninvite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if the specified invite is on the given channel's invite list (not the bot's invitelist for the channel) Module: irc ^^^^^^^^^^^^^^^^^^ chanbans ^^^^^^^^^^^^^^^^^^ Returns: a list of the current bans on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view Module: irc ^^^^^^^^^^^^^^^^^^^^^ chanexempts ^^^^^^^^^^^^^^^^^^^^^ Returns: a list of the current exempts on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view Module: irc ^^^^^^^^^^^^^^^^^^^^^ chaninvites ^^^^^^^^^^^^^^^^^^^^^ Returns: a list of the current invites on the channel. Each element is a sublist of the form { }. age is seconds from the bot's point of view Module: irc ^^^^^^^^^^^^^^^^^^^ resetbans ^^^^^^^^^^^^^^^^^^^ Description: removes all bans on the channel that aren't in the bot's ban list and refreshes any bans that should be on the channel but aren't Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^^^^ resetexempts ^^^^^^^^^^^^^^^^^^^^^^ Description: removes all exempt on the channel that aren't in the bot's exempt list and refreshes any exempts that should be on the channel but aren't Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^^^^ resetinvites ^^^^^^^^^^^^^^^^^^^^^^ Description: removes all invites on the channel that aren't in the bot's invite list and refreshes any invites that should be on the channel but aren't Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchanidle [nick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: resets the channel idle time for the given nick or for all nicks on the channel if no nick is specified. Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchanjoin [nick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: resets the channel join time for the given nick or for all nicks on the channel if no nick is specified. Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^ resetchan [flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: clears the channel info Eggdrop is currently storing for a channel, then rereads the channel info from the server. Useful if Eggdrop gets into a bad state on a server with respect to a channel userlist, for example. If flags are specified, only the required information will be reset, according to the given flags. Available flags: +-----+------------------------------+ | b | channel bans | +-----+------------------------------+ | e | channel exempts | +-----+------------------------------+ | I | channel invites | +-----+------------------------------+ | m | channel modes | +-----+------------------------------+ | w | memberlist (who & away info) | +-----+------------------------------+ Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ refreshchan [flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: An alternative to resetchan, refresh rereads the channel info from the server without first clearing out the previously stored information. Useful for updating a user's away status without resetting their idle time, for example. If flags are specified, only the required information will be refreshed, according to the given flags. Available flags: +-----+------------------------------+ | b | channel bans | +-----+------------------------------+ | e | channel exempts | +-----+------------------------------+ | I | channel invites | +-----+------------------------------+ | m | channel modes | +-----+------------------------------+ | t | channel topic | +-----+------------------------------+ | w | memberlist (who & away info) | +-----+------------------------------+ Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanhost [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: user\@host of the specified nickname (the nickname is not included in the returned host). If a channel is not specified, bot will check all of its channels. If the nickname is not on the channel(s), "" is returned. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanjoin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: timestamp (unixtime format) of when the specified nickname joined the channel if available, 0 otherwise. Note that after a channel reset this information will be lost, even if previously available. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ onchansplit [channel] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: 1 if that nick is split from the channel (or any channel if no channel is specified); 0 otherwise Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ chanlist [flags][<&|>chanflags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: lists all users on a channel Eggdrop has joined. flags are any global flags; the '&' or '\|' denotes to look for channel specific flags, where '&' will return users having ALL chanflags and '|' returns users having ANY of the chanflags (See `Flag Masks`_ for additional information). Returns: Searching for flags optionally preceded with a '+' will return a list of nicknames that have all the flags listed. Searching for flags preceded with a '-' will return a list of nicknames that do not have have any of the flags (differently said, '-' will hide users that have all flags listed). If no flags are given, all of the nicknames on the channel are returned. Please note that if you're executing chanlist after a part or sign bind, the gone user will still be listed, so you can check for wasop, isop, etc. Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ getchanidle ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: number of minutes that person has been idle; -1 if the specified user isn't on the channel Module: irc ^^^^^^^^^^^^^^^^^^^^^ getchanmode ^^^^^^^^^^^^^^^^^^^^^ Returns: string of the type "+ntik key" for the channel specified Module: irc ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ jump [server [[+]port [password]]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: jumps to the server specified, or (if none is specified) the next server in the bot's serverlist. If you prefix the port with a plus sign (e.g. +6697), SSL connection will be attempted. Returns: nothing Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pushmode [arg] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends out a channel mode change (ex: pushmode #lame +o goober) through the bot's queuing system. All the mode changes will be sent out at once (combined into one line as much as possible) after the script finishes, or when 'flushmode' is called. Returns: nothing Module: irc ^^^^^^^^^^^^^^^^^^^ flushmode ^^^^^^^^^^^^^^^^^^^ Description: forces all previously pushed channel mode changes to be sent to the server, instead of when the script is finished (just for the channel specified) Returns: nothing Module: irc ^^^^^^^^^^^^^^^ topic ^^^^^^^^^^^^^^^ Returns: string containing the current topic of the specified channel Module: irc ^^^^^^^^^^^^^^^^^^^ validchan ^^^^^^^^^^^^^^^^^^^ Description: checks if the bot has a channel record for the specified channel. Note that this does not necessarily mean that the bot is ON the channel. Returns: 1 if the channel exists, 0 if not Module: channels ^^^^^^^^^^^^^^^^^^^ isdynamic ^^^^^^^^^^^^^^^^^^^ Returns: 1 if the channel is a dynamic channel; 0 otherwise Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setudef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: initializes a user defined channel flag, string or integer setting. You can use it like any other flag/setting. IMPORTANT: Don't forget to reinitialize your flags/settings after a restart, or it'll be lost. Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ renudef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: renames a user defined channel flag, string, or integer setting. Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deludef ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: deletes a user defined channel flag, string, or integer setting. Returns: nothing Module: channels ^^^^^^^^^^^^^^^^^^^^^^^ getudefs [flag/int/str] ^^^^^^^^^^^^^^^^^^^^^^^ Returns: a list of user defined channel settings of the given type, or all of them if no type is given. Module: channels ^^^^^^^^^^^^^^^^^^^^^ chansettype ^^^^^^^^^^^^^^^^^^^^^ Returns: The type of the setting you specify. The possible types are flag, int, str, pair. A flag type references a channel flag setting that can be set to either + or -. An int type is a channel setting that is set to a number, such as ban-time. A str type is a channel setting that stores a string, such as need-op. A pair type is a setting that holds a value couple, such as the flood settings. Module: channels ^^^^^^^^^^^^^^^^^^^^^^^^^ isupport get [key] ^^^^^^^^^^^^^^^^^^^^^^^^^ Description: - isupport get: Returns a flat key/value list (dict) of settings. - isupport get : Returns the setting's value as a string. Throws an error if the key is not set. Returns: string or dict, see description above Module: server ^^^^^^^^^^^^^^^^^^^^^^^^^^^ isupport isset ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: Returns 0/1 depending on whether the key has a value. Returns: 0 or 1 Module: server DCC Commands ------------ .. _putdcc: ^^^^^^^^^^^^^^^^^^^^^^^^^^ putdcc [-raw] ^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends text to the idx specified. If -raw is specified, the text will be sent as is, without forced new lines or limits to line length. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ putidx -[raw] ^^^^^^^^^^^^^^^^^^^^^^^^^^ Description. Alias for the putdcc_ command. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^ dccbroadcast ^^^^^^^^^^^^^^^^^^^^^^ Description: sends a message to everyone on the party line across the botnet, in the form of "\*\*\* " for local users, "\*\*\* (Bot) " for users on other bots with version below 1.8.4, and "(Bot) " for users on other bots with version 1.8.4+ and console log mode 'l' enabled Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccputchan ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends your message to everyone on a certain channel on the botnet, in a form exactly like dccbroadcast does. Valid channels are 0 through 99999. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ boot [reason] ^^^^^^^^^^^^^^^^^^^^^^^^ Description: boots a user from the partyline Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^ dccsimul ^^^^^^^^^^^^^^^^^^^^^ Description: simulates text typed in by the dcc user specified. Note that in v0.9, this only simulated commands; now a command must be preceded by a '.' to be simulated. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^ hand2idx ^^^^^^^^^^^^^^^^^ Returns: the idx (a number greater than or equal to zero) for the user given if the user is on the party line in chat mode (even if she is currently on a channel or in chat off), the file area, or in the control of a script. -1 is returned if no idx is found. If the user is on multiple times, the oldest idx is returned. Module: core ^^^^^^^^^^^^^^ idx2hand ^^^^^^^^^^^^^^ Returns: handle of the user with the given idx Module: core ^^^^^^^^^^^^^^ valididx ^^^^^^^^^^^^^^ Returns: 1 if the idx currently exists; 0 otherwise Module: core ^^^^^^^^^^^^^ getchan ^^^^^^^^^^^^^ Returns: the current party line channel for a user on the party line; "0" indicates he's on the group party line, "-1" means he has chat off, and a value from 1 to 99999 is a private channel Module: core ^^^^^^^^^^^^^^^^^^^^^^^ setchan ^^^^^^^^^^^^^^^^^^^^^^^ Description: sets a party line user's channel. The party line user is not notified that she is now on a new channel. A channel name can be used (provided it exists). Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ console [channel] [console-modes] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: changes a dcc user's console mode, either to an absolute mode (like "mpj") or just adding/removing flags (like "+pj" or "-moc" or "+mp-c"). The user's console channel view can be changed also (as long as the new channel is a valid channel). Returns: a list containing the user's (new) channel view and (new) console modes, or nothing if that user isn't currently on the partyline Module: core ^^^^^^^^^^^^^^^^^^ resetconsole ^^^^^^^^^^^^^^^^^^ Description: changes a dcc user's console mode to the default setting in the configfile. Returns: a list containing the user's channel view and (new) console modes, or nothing if that user isn't currently on the partyline Module: core ^^^^^^^^^^^^^^^^^^^ echo [status] ^^^^^^^^^^^^^^^^^^^ Description: turns a user's echo on or off; the status has to be a 1 or 0 Returns: new value of echo for that user (or the current value, if status was omitted) Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ strip [+/-strip-flags] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: modifies the strip-flags for a user. The supported strip-flags are: +------+-------------------------------------------------------------+ | c | remove all color codes | +------+-------------------------------------------------------------+ | b | remove all boldface codes | +------+-------------------------------------------------------------+ | r | remove all reverse video codes | +------+-------------------------------------------------------------+ | u | remove all underline codes | +------+-------------------------------------------------------------+ | a | remove all ANSI codes | +------+-------------------------------------------------------------+ | g | remove all ctrl-g (bell) codes | +------+-------------------------------------------------------------+ | o | remove all ordinary codes (ctrl+o, terminates bold/color/..)| +------+-------------------------------------------------------------+ | i | remove all italics codes | +------+-------------------------------------------------------------+ | \* | remove all of the above | +------+-------------------------------------------------------------+ Returns: new strip-flags for the specified user (or the current flags, if strip-flags was omitted) Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ putbot ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^ putallbots ^^^^^^^^^^^^^^^^^^^^ Description: sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored. Returns: nothing Module: core ^^^^^^^^^^^^^ killdcc ^^^^^^^^^^^^^ Description: kills a partyline or file area connection Returns: nothing Module: core ^^^^ bots ^^^^ Returns: list of the bots currently connected to the botnet Module: core ^^^^^^^ botlist ^^^^^^^ Returns: a list of bots currently on the botnet. Each item in the list is a sublist with four elements: bot, uplink, version, and sharing status: +----------+-----------------------------------------------+ | bot | the bot's botnetnick | +----------+-----------------------------------------------+ | uplink | the bot the bot is connected to | +----------+-----------------------------------------------+ | version | it's current numeric version | +----------+-----------------------------------------------+ | sharing | a "+" if the bot is a sharebot; "-" otherwise | +----------+-----------------------------------------------+ Module: core ^^^^^^^^^^^^^^ islinked ^^^^^^^^^^^^^^ Returns: 1 if the bot is currently linked; 0 otherwise Module: core ^^^^^^^ dccused ^^^^^^^ Returns: number of dcc connections currently in use Module: core ^^^^^^^^^^^^^^ dcclist [type] ^^^^^^^^^^^^^^ Returns: a list of active connections, each item in the list is a sublist containing seven elements: { <[+]port> {} }. The types are: chat, bot, files, file_receiving, file_sending, file_send_pending, script, socket (these are connections that have not yet been put under 'control'), telnet, and server. The timestamp is in unixtime format. Module: core ^^^^^^^^^^^^^^^ socklist [type] ^^^^^^^^^^^^^^^ Returns: a list of active connections, each item in the list is a sublist containing eight elements (in dict-readable format). The order of items returned should not be considered static or permanent, so it is recommended to access the items as key/value pairs with the dict command, as opposed to something like lindex, to extract values. The possible keys returned are: +----------+--------------------------------------------------------+ | idx | integer value assigned to Eggdrop connections | +----------+--------------------------------------------------------+ | handle | possible values are (telnet), (bots), (users), | | | (script) for a listening socket, or the handle of the | | | connected user for an established connection | +----------+--------------------------------------------------------+ | host | the hostname of the connection, if it is known; | | | otherwise a * | +----------+--------------------------------------------------------+ | ip | the ip of the connection | +----------+--------------------------------------------------------+ | port | the port number associated with the connection (local | | | port for listening connections, remote port for server | | | connections. | +----------+--------------------------------------------------------+ | secure | 1 if SSL/TLS is used for the connect; 0 otherwise | +----------+--------------------------------------------------------+ | type | the type of connection (TELNET, CHAT, SERVER, etc) | +----------+--------------------------------------------------------+ | info | extra information associated with the connection | +----------+--------------------------------------------------------+ | time | timestamp of when the socket was established | +----------+--------------------------------------------------------+ Module: core ^^^^^^^^^^^ whom ^^^^^^^^^^^ Returns: list of people on the botnet who are on that channel. 0 is the default party line. Each item in the list is a sublist with six elements: nickname, bot, hostname, access flag ('-', '@', '+', or '*'), minutes idle, and away message (blank if the user is not away). If you specify * for channel, every user on the botnet is returned with an extra argument indicating the channel the user is on. Module: core ^^^^^^^^^^^^^^^^ getdccidle ^^^^^^^^^^^^^^^^ Returns: number of seconds the dcc chat/file system/script user has been idle Module: core ^^^^^^^^^^^^^^^^ getdccaway ^^^^^^^^^^^^^^^^ Returns: away message for a dcc chat user (or "" if the user is not set away) Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ setdccaway ^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sets a party line user's away message and marks them away. If set to "", the user is marked as no longer away. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ connect <[+]port> ^^^^^^^^^^^^^^^^^^^^^^^^ Description: makes an outgoing connection attempt and creates a dcc entry for it. A 'control' command should be used immediately after a successful 'connect' so no input is lost. If the port is prefixed with a plus sign, SSL encrypted connection will be attempted. Returns: idx of the new connection Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ listen [ip] [options [flag]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: opens a listening port to accept incoming telnets; type must be one of "bots", "all", "users", "script", or "off". Prefixing the port with a plus sign will make eggdrop accept SSL connections on it. An IP may optionally be listed before the mandatory port argument. If no IP is specified, all available interfaces are used. listen [ip] bots [mask] Description: accepts connections from bots only; the optional mask is used to identify permitted bot names. If the mask begins with '@', it is interpreted to be a mask of permitted hosts to accept connections from. Returns: port number or error message listen [ip] users [mask] Description: accepts connections from users only (no bots); the optional mask is used to identify permitted nicknames. If the mask begins with '@', it is interpreted to be a mask of permitted hosts to accept connections from. Returns: port number or error message listen [ip] all [mask] Description: accepts connections from anyone; the optional mask is used to identify permitted nicknames/botnames. If the mask begins with '@', it is interpreted to be a mask of permitted hosts to accept connections from. Returns: port number or error message listen [ip] script [flag] Description: accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection. The optional flag parameter currently only accepts 'pub' as a value. By specifying 'pub' as a flag, Eggdrop will skip the ident check for the user regardless of settings in the config file. This will allow any user to attempt a connection, and result in Eggdrop using "-telnet!telnet@host" instead of "-telnet!@host" as a hostmask to match against the user. Returns: port number or error message listen [ip] off Description: stop listening on a port Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccdumpfile ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: dumps out a file from the text directory to a dcc chat user. The flag matching that's used everywhere else works here, too. Returns: nothing Module: core Notes Module ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^ notes [numberlist] ^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: -1 if no such user, -2 if notefile failure. If a numberlist is not specified, the number of notes stored for the user is returned. Otherwise, a list of sublists containing information about notes stored for the user is returned. Each sublist is in the format of:: { } Module: notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ erasenotes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: erases some or all stored notes for a user. Use '-' to erase all notes. Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, or number of erased notes. Module: notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ listnotes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: lists existing notes according to the numberlist (ex: "2-4;8;16-") Returns: -1 if no such user, -2 if notefile failure, 0 if no such note, list of existing notes. Module: notes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ storenote ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: stores a note for later reading, notifies idx of any results (use idx -1 for no notify). Returns: 0 on success; non-0 on failure Module: notes Assoc Module ------------ ^^^^^^^^^^^^^^^^^^^ assoc [name] ^^^^^^^^^^^^^^^^^^^ Description: sets the name associated with a botnet channel, if you specify one Returns: current name for that channel, if any Module: assoc ^^^^^^^^^^^^^^^^ killassoc ^^^^^^^^^^^^^^^^ Description: removes the name associated with a botnet channel, if any exists. Use 'killassoc &' to kill all assocs. Returns: nothing Module: assoc Compress Module --------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ compressfile [-level ] [target-file] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ and ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ uncompressfile [target-file] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: compresses or un-compresses files. The level option specifies the compression mode to use when compressing. Available modes are from 0 (minimum CPU usage, minimum compression) all the way up to 9 (maximum CPU usage, maximum compression). If you don't specify the target-file, the src-file will be overwritten. Returns: nothing Module: compress ^^^^^^^^^^^^^^^^^^^^^^^ iscompressed ^^^^^^^^^^^^^^^^^^^^^^^ Description: determines whether is gzip compressed. Returns: 1 if it is, 0 if it isn't, and 2 if some kind of error prevented the checks from succeeding. Module: compress Filesys Module -------------- ^^^^^^^^^^^^^^^^^^ setpwd ^^^^^^^^^^^^^^^^^^ Description: changes the directory of a file system user, in exactly the same way as a 'cd' command would. The directory can be specified relative or absolute. Returns: nothing Module: filesys ^^^^^^^^^^^^ getpwd ^^^^^^^^^^^^ Returns: the current directory of a file system user Module: filesys ^^^^^^^^^^^^^^ getfiles ^^^^^^^^^^^^^^ Returns: a list of files in the directory given; the directory is relative to dcc-path Module: filesys ^^^^^^^^^^^^^ getdirs ^^^^^^^^^^^^^ Returns: a list of subdirectories in the directory given; the directory is relative to dcc-path Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dccsend ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: attempts to start a dcc file transfer to the given nick; the filename must be specified either by full pathname or in relation to the bot's startup directory Returns: +-------+---------------------------------------------------------------------+ | 0 | success | +-------+---------------------------------------------------------------------+ | 1 | the dcc table is full (too many connections) | +-------+---------------------------------------------------------------------+ | 2 | can't open a socket for the transfer | +-------+---------------------------------------------------------------------+ | 3 | the file doesn't exist | +-------+---------------------------------------------------------------------+ | 4 | the file was queued for later transfer, which means that person has | | | too many file transfers going right now | +-------+---------------------------------------------------------------------+ | 5 | the file could not be opened or temporary file could not be created | +-------+---------------------------------------------------------------------+ Module: transfer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ filesend [ircnick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: like dccsend, except it operates for a current filesystem user, and the filename is assumed to be a relative path from that user's current directory Returns: 0 on failure; 1 on success (either an immediate send or a queued send) Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fileresend [ircnick] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: functions like filesend, only that it sends a DCC RESEND instead of a DCC SEND, which allows people to resume aborted file transfers if their client supports that protocol. ircII/BitchX/etc. support it; mIRC does not. Returns: 0 on failure; 1 on success (either an immediate send or a queued send) Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^ setdesc ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sets the description for a file in a file system directory; the directory is relative to dcc-path Returns: nothing Module: filesys ^^^^^^^^^^^^^^^^^^^^ getdesc ^^^^^^^^^^^^^^^^^^^^ Returns: the description for a file in the file system, if one exists Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setowner ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: changes the owner for a file in the file system; the directory is relative to dcc-path Returns: nothing Module: filesys ^^^^^^^^^^^^^^^^^^^^^ getowner ^^^^^^^^^^^^^^^^^^^^^ Returns: the owner of a file in the file system Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^ setlink ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: creates or changes a linked file (a file that actually exists on another bot); the directory is relative to dcc-path Returns: nothing Module: filesys ^^^^^^^^^^^^^^^^^^^^ getlink ^^^^^^^^^^^^^^^^^^^^ Returns: the link for a linked file, if it exists Module: filesys ^^^^^^^^^^^^^^^^^ getfileq ^^^^^^^^^^^^^^^^^ Returns: list of files queued by someone; each item in the list will be a sublist with two elements: nickname the file is being sent to and the filename Module: transfer ^^^^^^^^^^^^^^^^^^^^^ getfilesendtime ^^^^^^^^^^^^^^^^^^^^^ Returns: the unixtime value from when a file transfer started, or a negative number: +-----+------------------------------------------------------+ | -1 | no matching transfer with the specified idx was found| +-----+------------------------------------------------------+ | -2 | the idx matches an entry which is not a file transfer| +-----+------------------------------------------------------+ Module: transfer ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mkdir [ [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: creates a directory in the file system. Only users with the required flags may access it. Returns: +-----+------------------------------------------------------+ | 0 | success | +-----+------------------------------------------------------+ | 1 | can't create directory | +-----+------------------------------------------------------+ | 2 | directory exists but is not a directory | +-----+------------------------------------------------------+ | -3 | could not open filedb | +-----+------------------------------------------------------+ Module: filesys ^^^^^^^^^^^^^^^^^ rmdir ^^^^^^^^^^^^^^^^^ Description: removes a directory from the file system. Returns: 0 on success; 1 on failure Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^ mv ^^^^^^^^^^^^^^^^^^^^^^^ Description: moves a file from its source to the given destination. The file can also be a mask, such as /incoming/\*, provided the destination is a directory. Returns: If the command was successful, the number of files moved will be returned. Otherwise, a negative number will be returned: +-----+------------------------------------------------------+ | -1 | invalid source file | +-----+------------------------------------------------------+ | -2 | invalid destination | +-----+------------------------------------------------------+ | -3 | destination file exists | +-----+------------------------------------------------------+ | -4 | no matches found | +-----+------------------------------------------------------+ Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^ cp ^^^^^^^^^^^^^^^^^^^^^^^ Description: copies a file from its source to the given destination. The file can also be a mask, such as /incoming/\*, provided the destination is a directory. Returns: If the command was successful, the number of files copied will be returned. Otherwise, a negative number will be returned: +-----+------------------------------------------------------+ | -1 | invalid source file | +-----+------------------------------------------------------+ | -2 | invalid destination | +-----+------------------------------------------------------+ | -3 | destination file exists | +-----+------------------------------------------------------+ | -4 | no matches found | +-----+------------------------------------------------------+ Module: filesys ^^^^^^^^^^^^^^ getflags ^^^^^^^^^^^^^^ Returns: the flags required to access a directory Module: filesys ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ setflags [ [channel]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: sets the flags required to access a directory Returns: 0 on success; -1 or -3 on failure Module: filesys PBKDF2 Module ------------- ^^^^^^^^^^^^^^^ encpass2 ^^^^^^^^^^^^^^^ Returns: a hash in the format of "$pbkdf2-$rounds=$$" where digest is the digest set in the config variable pbkdf2-method, rounds is the number of rounds set in the config variable pbkdf2-rounds, salt is the base64 salt used to generate the hash, and hash is the generated base64 hash. Module: pbkdf2 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pbkdf2 [-bin] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: a derived key from the provided "pass" string using "salt" and "rounds" count as specified in RFC 2898 as a hexadecimal string. Using the optional -bin flag will return the result as binary data. Module: pbkdf2 Miscellaneous Commands ---------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bind [proc-name] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: You can use the 'bind' command to attach Tcl procedures to certain events. flags are the flags the user must have to trigger the event (if applicable). proc-name is the name of the Tcl procedure to call for this command (see below for the format of the procedure call). If the proc-name is omitted, no binding is added. Instead, the current binding is returned (if it's stackable, a list of the current bindings is returned). Returns: name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unbind ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: removes a previously created bind Returns: name of the command that was removed Module: core ^^^^^^^^^^^^^^^^^ binds [type/mask] ^^^^^^^^^^^^^^^^^ Description: By default, lists Tcl binds registered with the Eggdrop. You can specify 'all' to view all binds, 'tcl' to view Tcl binds, and 'python' to view Python binds. Alternately, you can specify a bind type (pub, msg, etc) to view all binds that match that type of bind, or a mask that is matched against the command associated with the bind. Returns: a list of Tcl binds, each item in the list is a sublist of five elements: { } Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ logfile [ ] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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. Logfile flags: +-----+---------------------------------------------------------------------+ | b | information about bot linking and userfile sharing | +-----+---------------------------------------------------------------------+ | c | commands | +-----+---------------------------------------------------------------------+ | d | misc debug information | +-----+---------------------------------------------------------------------+ | g | raw outgoing share traffic | +-----+---------------------------------------------------------------------+ | h | raw incoming share traffic | +-----+---------------------------------------------------------------------+ | j | joins, parts, quits, topic changes, and netsplits on the channel | +-----+---------------------------------------------------------------------+ | k | kicks, bans, and mode changes on the channel | +-----+---------------------------------------------------------------------+ | l | linked bot messages | +-----+---------------------------------------------------------------------+ | 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 incoming botnet traffic | +-----+---------------------------------------------------------------------+ | u | raw outgoing 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 | +-----+---------------------------------------------------------------------+ Returns: filename of logfile created, or, if no logfile is specified, a list of logfiles such as: {mco * eggdrop.log} {jp #lame lame.log} Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ maskhost [masktype] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: masked hostmask for the string given according to the masktype (the default is 3). Available types are: +-----+------------------------------------------------------+ | 0 | \*!user\@host | +-----+------------------------------------------------------+ | 1 | \*!*user\@host | +-----+------------------------------------------------------+ | 2 | \*!*\@host | +-----+------------------------------------------------------+ | 3 | \*!*user\@*.host | +-----+------------------------------------------------------+ | 4 | \*!*\@*.host | +-----+------------------------------------------------------+ | 5 | nick!user\@host | +-----+------------------------------------------------------+ | 6 | nick!*user\@host | +-----+------------------------------------------------------+ | 7 | nick!*\@host | +-----+------------------------------------------------------+ | 8 | nick!*user\@*.host | +-----+------------------------------------------------------+ | 9 | nick!*\@*.host | +-----+------------------------------------------------------+ You can also specify types from 10 to 19 which correspond to types 0 to 9, but instead of using a * wildcard to replace portions of the host, only numbers in hostnames are replaced with the '?' wildcard. Same is valid for types 20-29, but instead of '?', the '\*' wildcard will be used. Types 30-39 set the host to '\*'. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ timer [count [timerName]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: executes the given Tcl command after a certain number of minutes have passed, at the top of the minute (ie, if a timer is started at 10:03:34 with 1 minute specified, it will execute at 10:04:00. If a timer is started at 10:06:34 with 2 minutes specified, it will execute at 10:08:00). If count is specified, the command will be executed count times with the given interval in between. If you specify a count of 0, the timer will repeat until it's removed with killtimer or until the bot is restarted. If timerName is specified, it will become the unique identifier for the timer. If no timerName is specified, Eggdrop will assign a timerName in the format of "timer". Returns: a timerName Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ utimer [count [timerName]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: executes the given Tcl command after a certain number of seconds have passed. If count is specified, the command will be executed count times with the given interval in between. If you specify a count of 0, the utimer will repeat until it's removed with killutimer or until the bot is restarted. If timerName is specified, it will become the unique identifier for the timer. If timerName is not specified, Eggdrop will assign a timerName in the format of "timer". Returns: a timerName Module: core ^^^^^^ timers ^^^^^^ Description: lists all active minutely timers. Returns: a list of active minutely timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats. Module: core ^^^^^^^ utimers ^^^^^^^ Description: lists all active secondly timers. Returns: a list of active secondly timers, with each timer sub-list containing the number of minutes left until activation, the command that will be executed, the timerName, and the remaining number of repeats. Module: core ^^^^^^^^^^^^^^^^^^^^^ killtimer ^^^^^^^^^^^^^^^^^^^^^ Description: removes the timerName minutely timer from the timer list. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^ killutimer ^^^^^^^^^^^^^^^^^^^^^^ Description: removes the timerName secondly timer from the timer list. Returns: nothing Module: core ^^^^^^^^ unixtime ^^^^^^^^ Returns: a long integer which represents the number of seconds that have passed since 00:00 Jan 1, 1970 (GMT). Module: core ^^^^^^^^^^^^^^^^^^ duration ^^^^^^^^^^^^^^^^^^ Returns: the number of seconds converted into years, weeks, days, hours, minutes, and seconds. 804600 seconds is turned into 1 week 2 days 7 hours 30 minutes. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ strftime [time] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: a formatted string of time using standard strftime format. If time is specified, the value of the specified time is used. Otherwise, the current time is used. Note: The implementation of strftime varies from platform to platform, so the user should only use POSIX-compliant format specifiers to ensure fully portable code. Module: core ^^^^^^^^^^^^^^^^ ctime ^^^^^^^^^^^^^^^^ Returns: a formatted date/time string based on the current locale settings from the unixtime string given; for example "Fri Aug 3 11:34:55 1973" Module: core ^^^^ myip ^^^^ Returns: a long number representing the bot's IP address, as it might appear in (for example) a DCC request Module: core ^^^^^^^^^^^^ rand ^^^^^^^^^^^^ Returns: a random integer between 0 and limit-1. Limit must be greater than 0 and equal to or less than RAND_MAX, which is generally 2147483647. The underlying pseudo-random number generator is not cryptographically secure. Module: core ^^^^^^^^^^^^^^^^^^^^^^^ control ^^^^^^^^^^^^^^^^^^^^^^^ Description: removes an idx from the party line and sends all future input to the Tcl command given. The command will be called with two parameters: the idx and the input text. The command should return 0 to indicate success and 1 to indicate that it relinquishes control of the user back to the bot. If the input text is blank (""), it indicates that the connection has been dropped. Also, if the input text is blank, never call killdcc on it, as it will fail with "invalid idx". Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ sendnote ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: simulates what happens when one user sends a note to another Returns: +-----+----------------------------------------------------------+ | 0 | the send failed | +-----+----------------------------------------------------------+ | 1 | the note was delivered locally or sent to another bot | +-----+----------------------------------------------------------+ | 2 | the note was stored locally | +-----+----------------------------------------------------------+ | 3 | the user's notebox is too full to store a note | +-----+----------------------------------------------------------+ | 4 | a Tcl binding caught the note | +-----+----------------------------------------------------------+ | 5 | the note was stored because the user is away | +-----+----------------------------------------------------------+ Module: core ^^^^^^^^^^^^^^^^^^^^ link [via-bot] ^^^^^^^^^^^^^^^^^^^^ Description: attempts to link to another bot directly. If you specify a via-bot, it tells the via-bot to attempt the link. Returns: 1 if the link will be attempted; 0 otherwise Module: core ^^^^^^^^^^^^^^^^^^^^^^ unlink [comment] ^^^^^^^^^^^^^^^^^^^^^^ Description: attempts to unlink a bot from the botnet. If you specify a comment, it will appear with the unlink message on the botnet. Returns: 1 on success; 0 otherwise Module: core ^^^^^^^^^^^^^^^^^^^^^^ encrypt ^^^^^^^^^^^^^^^^^^^^^^ Returns: encrypted string (using the currently loaded encryption module), encoded into ASCII using base-64. As of v1.8.4, the default blowfish encryption module can use either the older ECB mode (currently used by default for compatibility reasons), or the more recent and more-secure CBC mode. You can explicitly request which encryption mode to use by prefixing the encryption key with either "ecb:" or "cbc:", or by using the blowfish-use-mode setting in the config file. Note: the default encryption mode for this function is planned to transition from ECB to CBC in v1.9.0. Module: encryption ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ decrypt ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Returns: decrypted string (using the currently loaded encryption module). If the default blowfish encryption module is used, this automatically picks the right decryption mode. You may still prefix the key with "ecb:" or "cbc:" or use the blowfish-use-mode setting in the config file (see the encrypt command for more detailed information). Module: encryption ^^^^^^^^^^^^^^^^^^ encpass ^^^^^^^^^^^^^^^^^^ Returns: encrypted string (using the currently loaded encryption module) Module: encryption ^^^^^^^^^^^^ die [reason] ^^^^^^^^^^^^ Description: causes the bot to log a fatal error and exit completely. If no reason is given, "EXIT" is used. Returns: none Module: core ^^^^^^ unames ^^^^^^ Returns: the current operating system the bot is using Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ dnslookup [[arg1] [arg2] ... [argN]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: This issues an asynchronous dns lookup request. The command will block if dns module is not loaded; otherwise it will either return immediately or immediately call the specified proc (e.g. if the lookup is already cached). As soon as the request completes, the specified proc will be called as follows: [[arg1] [arg2] ... [argN]] status is 1 if the lookup was successful and 0 if it wasn't. All additional parameters (called arg1, arg2 and argN above) get appended to the proc's other parameters. Returns: nothing Module: core ^^^^^^^^^^^^ md5 ^^^^^^^^^^^^ Returns: the 128 bit MD5 message-digest of the specified string Module: core ^^^^^^^^^^^^^^^^^ callevent ^^^^^^^^^^^^^^^^^ Description: triggers the evnt bind manually for a certain event. You can call arbitrary events here, even ones that are not pre-defined by Eggdrop. For example: callevent rehash, or callevent myownevent123. Returns: nothing Module: core ^^^^^^^ traffic ^^^^^^^ Returns: a list of sublists containing information about the bot's traffic usage in bytes. Each sublist contains five elements: type, in-traffic today, in-traffic total, out-traffic today, out-traffic total (in that order). Module: core ^^^^^^^ modules ^^^^^^^ Returns: a list of sublists containing information about the bot's currently loaded modules. Each sublist contains three elements: module, version, and dependencies. Each dependency is also a sublist containing the module name and version. Module: core ^^^^^^^^^^^^^^^^^^^ loadmodule ^^^^^^^^^^^^^^^^^^^ Description: attempts to load the specified module. Returns: "Already loaded." if the module is already loaded, "" if successful, or the reason the module couldn't be loaded. Module: core ^^^^^^^^^^^^^^^^^^^^^ unloadmodule ^^^^^^^^^^^^^^^^^^^^^ Description: attempts to unload the specified module. Returns: "No such module" if the module is not loaded, "" otherwise. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^ loadhelp ^^^^^^^^^^^^^^^^^^^^^^^^ Description: attempts to load the specified help file from the help/ directory. Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^ unloadhelp ^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: attempts to unload the specified help file. Returns: nothing Module: core ^^^^^^^^^^ reloadhelp ^^^^^^^^^^ Description: reloads the bot's help files. Returns: nothing Module: core ^^^^^^^ restart ^^^^^^^ Description: rehashes the bot, kills all timers, reloads all modules, and reconnects the bot to the next server in its list. Returns: nothing Module: core ^^^^^^ rehash ^^^^^^ Description: rehashes the bot Returns: nothing Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ stripcodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: strips specified control characters from the string given. strip-flags can be any combination of the following: +-----+-------------------------------------------------------------+ | c | remove all color codes | +-----+-------------------------------------------------------------+ | b | remove all boldface codes | +-----+-------------------------------------------------------------+ | r | remove all reverse video codes | +-----+-------------------------------------------------------------+ | u | remove all underline codes | +-----+-------------------------------------------------------------+ | a | remove all ANSI codes | +-----+-------------------------------------------------------------+ | g | remove all ctrl-g (bell) codes | +-----+-------------------------------------------------------------+ | o | remove all ordinary codes (ctrl+o, terminates bold/color/..)| +-----+-------------------------------------------------------------+ | i | remove all italics codes | +-----+-------------------------------------------------------------+ | \* | remove all of the above | +-----+-------------------------------------------------------------+ Returns: the stripped string. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchaddr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: checks if the address matches the hostmask given. The address should be in the form nick!user\@host. Returns: 1 if the address matches the hostmask, 0 otherwise. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchcidr
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: performs a cidr match on the specified ip addresses. IPv6 is supported, if enabled at compile time. Example: matchcidr 192.168.0.0 192.168.1.17 16 Returns: 1 if the address matches the block prefix, 0 otherwise. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^ matchstr ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: checks if pattern matches string. Only two wildcards are supported: '*' and '?'. Matching is case-insensitive. This command is intended as a simplified alternative to Tcl's string match. Returns: 1 if the pattern matches the string, 0 if it doesn't. Module: core ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ rfcequal ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Description: Checks if two strings are equal. Case is ignored, and this uses RFC1459 matching {}|~ == []\^, depending on the rfc_compliant setting. Returns: 1 if equal, 0 if not. Module: core ^^^^^^^^^^^^^ status [type] ^^^^^^^^^^^^^ Description: provides eggdrop status information similar to the .status command in partyline. The available types of information are: +------+---------------------------------------------------------------------+ | cpu | total cpu time spent by eggdrop | +------+---------------------------------------------------------------------+ | mem | dynamically allocated memory excluding the Tcl interpreter | +------+---------------------------------------------------------------------+ | cache| user entries cache hits (in %) | +------+---------------------------------------------------------------------+ | ipv6 | shows whether IPv6 support was compiled in | +------+---------------------------------------------------------------------+ Returns: the requested information type or all information if type isn't specified. The format is a flat list of name-value pairs. Module: core ^^^^^^^^^^^ istls ^^^^^^^^^^^ Description: checks if a connection is encrypted or cleartext. This command is available on TLS-enabled bots only. Returns: 1 if the idx is a TLS connection, 0 if it's plaintext. Module: core ^^^^^^^^^^^^^^ starttls ^^^^^^^^^^^^^^ Description: establishes a secure (using TLS) connection over idx. The TLS connection should be first negotiated over the plaintext link, or using other means. Both parties must switch to TLS simultaneously. This command is available on TLS-enabled bots only. Returns: nothing Module: core ^^^^^^^^^^^^^^^ tlsstatus ^^^^^^^^^^^^^^^ Description: provides information about an established TLS connection This includes certificate and cipher information as well as protocol version. This command is available on TLS-enabled bots only. Returns: a flat list of name-value pairs Module: core Global Variables ---------------- NOTE: All config file variables are also global. ^^^^^^^ botnick ^^^^^^^ Value: the current nickname the bot is using (for example: "Valis", "Valis0", etc.) Module: server ^^^^^^^ botname ^^^^^^^ Value: the current nick!user\@host that the server sees (for example: "Valis!valis\@crappy.com") Module: server ^^^^^^ server ^^^^^^ Value: the current server's real name (what server calls itself) and port bot is connected to (for example: "irc.math.ufl.edu:6667") Note that this does not necessarily match the servers internet address. Module: server ^^^^^^^^^^^^^ serveraddress ^^^^^^^^^^^^^ Value: the current server's internet address (hostname or IP) and port bot is connected to. This will correspond to the entry in server list (for example: "eu.undernet.org:6667"). Note that this does not necessarily match the name server calls itself. Module: server ^^^^^^^ version ^^^^^^^ Value: current bot version "1.1.2+pl1 1010201"; first item is the text version, to include a patch string if present, and second item is a numerical version Module: core ^^^^^^^^^^^ numversion* ^^^^^^^^^^^ Value: the current numeric bot version (for example: "1010201"). Numerical version is in the format of "MNNRRPP", where: +------+---------------------------------------+ | M | major release number | +------+---------------------------------------+ | NN | minor release number | +------+---------------------------------------+ | RR | sub-release number | +------+---------------------------------------+ | PP | patch level for that sub-release | +------+---------------------------------------+ Module: core ^^^^^^ uptime ^^^^^^ Value: the unixtime value for when the bot was started Module: core ^^^^^^^^^^^^^ server-online ^^^^^^^^^^^^^ Value: the unixtime value when the bot connected to its current server, or '0' if the bot is currently disconnected from a server. Module: server ^^^^^^^^ lastbind ^^^^^^^^ Value: the last command binding which was triggered. This allows you to identify which command triggered a Tcl proc. Module: core ^^^^^^^ isjuped ^^^^^^^ Value: 1 if bot's nick is juped(437); 0 otherwise Module: server ^^^^^^^ handlen ^^^^^^^ Value: the value of the HANDLEN define in src/eggdrop.h Module: core ^^^^^^ config ^^^^^^ Value: the filename of the config file Eggdrop is currently using Module: core ^^^^^^^^^^^^^ configureargs ^^^^^^^^^^^^^ Value: a string (not list) of configure arguments in shell expansion (single quotes) Module: core ^^^^^^^^ language ^^^^^^^^ Value: a string containing the language with the highest priority for use by Eggdrop. This commonly reflects what is added with addlang in the config file Module: core Binds ----- You can use the 'bind' command to attach Tcl procedures to certain events. For example, you can write a Tcl procedure that gets called every time a user says "danger" on the channel. When a bind is triggered, ALL of the Tcl procs that are bound to it will be called. Raw binds are triggered before builtin binds, as a builtin bind has the potential to modify args. ^^^^^^^^^^^^^^^ Stackable binds ^^^^^^^^^^^^^^^ Some bind types are marked as "stackable". That means that you can bind multiple commands to the same trigger. Normally, for example, a bind such as 'bind msg - stop msg:stop' (which makes a msg-command "stop" call the Tcl proc "msg:stop") will overwrite any previous binding you had for the msg command "stop". With stackable bindings, like 'msgm' for example, you can bind the same command to multiple procs. ^^^^^^^^^^^^^^^ Removing a bind ^^^^^^^^^^^^^^^ To remove a bind, use the 'unbind' command. For example, to remove the bind for the "stop" msg command, use 'unbind msg - stop msg:stop'. .. _tcl_binds: ^^^^^^^^^^ Flag Masks ^^^^^^^^^^ In the `Bind Types`_ section (and other commands, such as `matchattr`_), you will see several references to the "flags" argument. The "flags" argument takes a flag mask, which is a value that represents the type of user that is allowed to trigger the procedure associated to that bind. The flags can be any of the standard Eggdrop flags (o, m, v, etc). Additionally, when used by itself, a "-" or "*" can be used to skip processing for a flag type. A flag mask has three sections to it- global, channel, and bot flag sections. Each section is separated by the | or & logical operators ( the | means "OR" and the & means "AND; if nothing proceeds the flag then Eggdrop assumes it to be an OR). Additionally, a '+' and '-' can be used in front of a flag to check if the user does (+) have it, or does not (-) have it. The easiest way to explain how to build a flag mask is by demonstration. A flag mask of "v" by itself means "has a global v flag". To also check for a channel flag, you would use the flag mask "v\|v". This checks if the user has a global "v" flag, OR a channel "v" flag (again, the | means "OR" and ties the two types of flags together). You could change this mask to be "v&v", which would check if the user has a global "v" flag AND a channel "v" flag. Lastly, to check if a user ONLY has a channel flag, you would use "\*|v" as a mask, which would not check global flags but does check if the user had a channel "v" flag. You will commonly see flag masks for global flags written "ov"; this is the same as "\|ov" or "\*\|ov". Some additional examples: +------------+-----------------------------------------------------------------+ | Flag Mask | Action | +============+=================================================================+ | m, +m, m|* | Checks if the user has the m global flag | +------------+-----------------------------------------------------------------+ | +mn | Checks if the user has the m OR n global flag | +------------+-----------------------------------------------------------------+ | \|+mn | Checks if the user has the m OR n channel flag | +------------+-----------------------------------------------------------------+ | \|+mn #foo | Checks if the user has the m OR n channel flag for #foo | +------------+-----------------------------------------------------------------+ | &+mn | Checks if the user has the m AND n channel flag | +------------+-----------------------------------------------------------------+ | &mn #foo | Checks if the user has the m AND n channel flag for #foo | +------------+-----------------------------------------------------------------+ | \|+o #foo | Checks if the user has the o channel flag for #foo | +------------+-----------------------------------------------------------------+ | +o|+n #foo | Checks if the user has the o global flag OR the n channel flag | | | for #foo | +------------+-----------------------------------------------------------------+ | +m&+v #foo | Checks if the user has the m global flag AND the v channel flag | | | for #foo | +------------+-----------------------------------------------------------------+ | -m | Checks if the user does not have the m global flag | +------------+-----------------------------------------------------------------+ | \|-n #foo | Checks if the user does not have the n channel flag for #foo | +------------+-----------------------------------------------------------------+ | +m|-n #foo | Checks if the user has the global m flag OR does not have a | | | channel n flag for #foo | +------------+-----------------------------------------------------------------+ | -n&-m #foo | Checks if the user does not have the global n flag AND does | | | not have the channel m flag for #foo | +------------+-----------------------------------------------------------------+ | ||+b | Checks if the user has the bot flag b | +------------+-----------------------------------------------------------------+ As a side note, Tcl scripts historically have used a '-' to skip processing of a flag type (Example: -\|o). It is unknown where and why this practice started, but as a style tip, Eggdrop developers recommend using a '\*' to skip processing, so as not to confuse a single "-" meaning "skip processing" with a preceding "-ov" which means "not these flags". .. _bind_types: ^^^^^^^^^^ Bind Types ^^^^^^^^^^ The following is a list of bind types and how they work. Below each bind type is the format of the bind command, the list of arguments sent to the Tcl proc, and an explanation. (1) MSG bind msg procname Description: used for /msg commands. The first word of the user's msg is the command, and everything else becomes the text argument. Module: server (2) DCC bind dcc procname Description: used for partyline commands; the command is the first word and everything else becomes the text argument. The idx is valid until the user disconnects. After that, it may be reused, so be careful about storing an idx for long periods of time. Module: core (3) FIL bind fil procname Description: the same as DCC, except this is triggered if the user is in the file area instead of the party line Module: filesys (4) PUB bind pub procname Description: used for commands given on a channel. The first word becomes the command and everything else is the text argument. Module: irc (5) MSGM (stackable) bind msgm procname Description: matches the entire line of text from a /msg with the mask. This is useful for binding Tcl procs to words or phrases spoken anywhere within a line of text. If the proc returns 1, Eggdrop will not log the message that triggered this bind. MSGM binds are processed before MSG binds. If the exclusive-binds setting is enabled, MSG binds will not be triggered by text that a MSGM bind has already handled. Module: server (6) PUBM (stackable) bind pubm procname Description: just like MSGM, except it's triggered by things said on a channel instead of things /msg'd to the bot. The mask is matched against the channel name followed by the text and can contain wildcards. If the proc returns 1, Eggdrop will not log the message that triggered this bind. PUBM binds are processed before PUB binds. If the exclusive-binds setting is enabled, PUB binds will not be triggered by text that a PUBM bind has already handled. Examples: bind pubm * "#eggdrop Hello*" myProc Listens on #eggdrop for any line that begins with "Hello" bind pubm * "% Hello*" myProc Listens on any channel for any line that begins with "Hello" bind pubm * "% !command" myProc Listens on any channel for a line that ONLY contains "!command" Module: irc (7) NOTC (stackable) bind notc procname Description: dest will be a nickname (the bot's nickname, obviously) or a channel name. mask is matched against the entire text of the notice and can contain wildcards. It is considered a breach of protocol to respond to a /notice on IRC, so this is intended for internal use (logging, etc.) only. Note that server notices do not trigger the NOTC bind. If the proc returns 1, Eggdrop will not log the message that triggered this bind. New Tcl procs should be declared as:: proc notcproc {nick uhost hand text {dest ""}} { global botnick; if {$dest == ""} {set dest $botnick} ... } for compatibility. Module: server (8) JOIN (stackable) bind join procname Description: triggered by someone joining the channel. The mask in the bind is matched against "#channel nick!user\@host" and can contain wildcards. Module: irc (9) PART (stackable) bind part procname Description: triggered by someone leaving the channel. The mask is matched against "#channel nick!user\@host" and can contain wildcards. If no part message is specified, msg will be set to "". New Tcl procs should be declared as:: proc partproc {nick uhost hand chan {msg ""}} { ... } for compatibility. Module: irc (10) SIGN (stackable) bind sign procname Description: triggered by a signoff, or possibly by someone who got netsplit and never returned. The signoff message is the last argument to the proc. Wildcards can be used in the mask, which is matched against '#channel nick!user\@host'. If a "*" is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per signoff, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with SIGN as the keyword. Module: irc (11) TOPC (stackable) bind topc procname Description: triggered by a topic change. mask can contain wildcards and is matched against '#channel '. Module: irc (12) KICK (stackable) bind kick procname Description: triggered when someone is kicked off the channel. The mask is matched against '#channel target reason' where the target is the nickname of the person who got kicked (can contain wildcards). The proc is called with the nick, user\@host, and handle of the kicker, plus the channel, the nickname of the person who was kicked, and the reason. Module: irc (13) NICK (stackable) bind nick procname Description: triggered when someone changes nicknames. The mask is matched against '#channel newnick' and can contain wildcards. Channel is "*" if the user isn't on a channel (usually the bot not yet in a channel). If a "*" is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per nick change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with NICK as the keyword. Module: irc (14) MODE (stackable) bind mode procname Description: mode changes are broken down into their component parts before being sent here, so the will always be a single mode, such as "+m" or "-o". target will show the argument of the mode change (for o/v/b/e/I) or "" if the set mode does not take an argument. The bot's automatic response to a mode change will happen AFTER all matching Tcl procs are called. The mask will be matched against '#channel +/-modes' and can contain wildcards. If it is a server mode, nick will be "", user\@host is the server name, and handle is \*. Note that "target" was added in 1.3.17 and that this will break Tcl scripts that were written for pre-1.3.17 Eggdrop that use the mode binding. Also, due to a typo, mode binds were broken completely in 1.3.17 but were fixed in 1.3.18. Mode bindings are not triggered at all in 1.3.17. One easy example (from guppy) of how to support the "target" parameter in 1.3.18 and later and still remain compatible with older Eggdrop versions is: Old script looks as follows:: bind mode - * mode_proc proc mode_proc {nick uhost hand chan mode} { ... } To make it work with 1.3.18+ and stay compatible with older bots, do:: bind mode - * mode_proc_fix proc mode_proc_fix {nick uhost hand chan mode {target ""}} { if {$target != ""} {append mode " $target"} mode_proc $nick $uhost $hand $chan $mode } proc mode_proc {nick uhost hand chan mode} { ... } Module: irc (15) CTCP (stackable) bind ctcp procname Description: dest will be a nickname (the bot's nickname, obviously) or channel name. keyword is the ctcp command (which can contain wildcards), and text may be empty. If the proc returns 0, the bot will attempt its own processing of the ctcp command. Module: server (16) CTCR (stackable) bind ctcr procname Description: just like ctcp, but this is triggered for a ctcp-reply (ctcp embedded in a notice instead of a privmsg) Module: server (17) RAW (stackable) bind raw procname IMPORTANT: While not necessarily deprecated, this bind has been supplanted by the RAWT bind, which supports the IRCv3 message-tags capability, as of 1.9.0. You probably want to be using RAWT, not RAW. Description: The mask can contain wildcards and is matched against the keyword, which is either a numeric, like "368", or a keyword, such as "PRIVMSG". "from" will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. If the proc returns 1, Eggdrop will not process the line any further (this could cause unexpected behavior in some cases), although RAWT binds are processed before RAW binds (and thus, a RAW bind cannot block a RAWT bind). Module: server (18) BOT bind bot procname Description: triggered by a message coming from another bot in the botnet. The first word is the command and the rest becomes the text argument; flags are ignored. Module: core (19) CHON (stackable) bind chon procname Description: when someone first enters the party-line area of the bot via dcc chat or telnet, this is triggered before they are connected to a chat channel (so, yes, you can change the channel in a 'chon' proc). mask is matched against the handle and supports wildcards. This is NOT triggered when someone returns from the file area, etc. Module: core (20) CHOF (stackable) bind chof procname Description: triggered when someone leaves the party line to disconnect from the bot. mask is matched against the handle and can contain wildcards. Note that the connection may have already been dropped by the user, so don't send output to the idx. Module: core (21) SENT (stackable) bind sent procname Description: after a user has successfully downloaded a file from the bot, this binding is triggered. mask is matched against the handle of the user that initiated the transfer and supports wildcards. nick is the actual recipient (on IRC) of the file. The path is relative to the dcc directory (unless the file transfer was started by a script call to 'dccsend', in which case the path is the exact path given in the call to 'dccsend'). Module: transfer (22) RCVD (stackable) bind rcvd procname Description: triggered after a user uploads a file successfully. mask is matched against the user's handle. nick is the IRC nickname that the file transfer originated from. The path is where the file ended up, relative to the dcc directory (usually this is your incoming dir). Module: transfer (23) CHAT (stackable) bind chat procname Description: when a user says something on the botnet, it invokes this binding. Flags are ignored; handle could be a user on this bot ("DronePup") or on another bot ("Eden\@Wilde") and therefore you can't rely on a local user record. The mask is checked against the entire line of text and supports wildcards. Eggdrop passes the partyline channel number the user spoke on to the proc in "channel#". NOTE: If a BOT says something on the botnet, the BCST bind is invoked instead. Module: core (24) LINK (stackable) bind link procname Description: triggered when a bot links into the botnet. botname is the botnetnick of the bot that just linked in; via is the bot it linked through. The mask is checked against the botnetnick of the bot that linked and supports wildcards. flags are ignored. Module: core (25) DISC (stackable) bind disc procname Description: triggered when a bot disconnects from the botnet for whatever reason. Just like the link bind, flags are ignored; mask is matched against the botnetnick of the bot that unlinked. Wildcards are supported in mask. Module: core (26) SPLT (stackable) bind splt procname Description: triggered when someone gets netsplit on the channel. Be aware that this may be a false alarm (it's easy to fake a netsplit signoff message on some networks); mask may contain wildcards and is matched against '#channel nick!user\@host'. Anyone who is SPLT will trigger a REJN or SIGN within the next wait-split (defined in the config file) seconds. Module: irc (27) REJN (stackable) bind rejn procname Description: someone who was split has rejoined. mask can contain wildcards, and is matched against '#channel nick!user\@host'. Module: irc (28) FILT (stackable) bind filt procname Description: party line and file system users have their text sent through filt before being processed. 'mask' is a text mask that can contain wildcards and is used for matching text sent on the partyline. If the proc returns a blank string, the partyline texr is continued to be parsed as-is. Otherwise, the bot will instead use the text returned from the proc for continued parsing. Module: core (29) NEED (stackable) bind need procname Description: this bind is triggered on certain events, like when the bot needs operator status or the key for a channel. The types are: op, unban, invite, limit, and key; the mask is matched against '#channel type' and can contain wildcards. flags are ignored. Example:: bind need - "% op" needop < handles only need op bind need - "*" needall < handles all needs Module: irc (30) FLUD (stackable) bind flud procname Description: any floods detected through the flood control settings (like 'flood-ctcp') are sent here before processing. If the proc returns 1, no further action is taken on the flood; if the proc returns 0, the bot will do its normal "punishment" for the flood. The flood types are: pub, msg, join, or ctcp (and can be masked to "*" for the bind); flags are ignored. Module: server (31) NOTE (stackable) bind note procname Description: incoming notes (either from the party line, someone on IRC, or someone on another bot on the botnet) are checked against these binds before being processed. The mask is matched against the receiving handle and supports wildcards. If the proc returns 1, Eggdrop will not process the note any further. Flags are ignored. Module: core (32) ACT (stackable) bind act procname Description: when someone does an action on the botnet, it invokes this binding. flags are ignored; the mask is matched against the text of the action and can support wildcards. Module: core (33) WALL (stackable) bind wall procname Description: when the bot receives a wallops, it invokes this binding. flags are ignored; the mask is matched against the text of the wallops msg. Note that RFC shows the server name as a source of the message, whereas many IRCds send the nick!user\@host of the actual sender, thus, Eggdrop will not parse it at all, but simply pass it to bind in its original form. If the proc returns 1, Eggdrop will not log the message that triggered this bind. Module: server (34) BCST (stackable) bind bcst procname Description: when a bot broadcasts something on the botnet (see 'dccbroadcast' above), it invokes this binding. flags are ignored; the mask is matched against the message text and can contain wildcards. 'channel' argument will always be '-1' since broadcasts are not directed to any partyline channel. It is also invoked when a BOT (not a person, as with the CHAT bind) 'says' something on a channel. In this case, the 'channel' argument will be a valid channel, and not '-1'. Module: core (35) CHJN (stackable) bind chjn procname Description: when someone joins a botnet channel, it invokes this binding. The mask is matched against the channel and can contain wildcards. flag is one of: * (owner), + (master), @ (op), or % (botnet master). Flags are ignored. Module: core (36) CHPT (stackable) bind chpt procname Description: when someone parts a botnet channel, it invokes this binding. The mask is matched against the channel and can contain wildcards. Flags are ignored. Module: core (37) TIME (stackable) bind time procname Description: allows you to schedule procedure calls at certain times. mask matches 5 space separated integers of the form: "minute hour day month year". The month var starts at 00 (Jan) and ends at 11 (Dec). Minute, hour, day, month have a zero padding so they are exactly two characters long; year is four characters. Flags are ignored. Module: core (38) AWAY (stackable) bind away procname Description: triggers when a user goes away or comes back on the botnet. text is the reason that has been specified (text is "" when returning). mask is matched against the botnet-nick of the bot the user is connected to and supports wildcards. flags are ignored. Module: core (39) LOAD (stackable) bind load procname Description: triggers when a module is loaded. mask is matched against the name of the loaded module and supports wildcards; flags are ignored. Module: core (40) UNLD (stackable) bind unld procname Description: triggers when a module is unloaded. mask is matched against the name of the unloaded module and supports wildcards; flags are ignored. Module: core (41) NKCH (stackable) bind nkch procname Description: triggered whenever a local user's handle is changed (in the userfile). mask is matched against the user's old handle and can contain wildcards; flags are ignored. Module: core (42) EVNT (stackable) bind evnt procname [arg] Description: triggered whenever one of these events happen. flags are ignored. Pre-defined events triggered by Eggdrop are:: sighup - called on a kill -HUP sigterm - called on a kill -TERM sigill - called on a kill -ILL sigquit - called on a kill -QUIT save - called when the userfile is saved rehash - called just after a rehash prerehash - called just before a rehash prerestart - called just before a restart logfile - called when the logs are switched daily loaded - called when the bot is done loading userfile-loaded - called after userfile has been loaded connect-server - called just before we connect to an IRC server preinit-server - called immediately when we connect to the server init-server - called when we actually get on our IRC server disconnect-server - called when we disconnect from our IRC server fail-server - called when an IRC server fails to respond hidden-host - called after the bot's host is hidden by the server got-chanlist - called after Eggdrop receives the channel userlist from the server. Passes a second [arg] value to the Tcl proc Note that Tcl scripts can trigger arbitrary events, including ones that are not pre-defined or used by Eggdrop. Module: core (43) LOST (stackable) bind lost procname Description: triggered when a DCC SEND transfer gets lost, such as when the connection is terminated before all data was successfully sent/received. This is typically caused by a user abort. Module: transfer (44) TOUT (stackable) bind tout procname Description: triggered when a DCC SEND transfer times out. This may either happen because the dcc connection was not accepted or because the data transfer stalled for some reason. Module: transfer (45) OUT (stackable) bind out procname Description: triggered whenever output is sent to the server. Normally the event will occur twice for each line sent: once before entering a server queue and once after the message is actually sent. This allows for more flexible logging of server output and introduces the ability to cancel the message. Mask is matched against "queue status", where status is either 'queued' or 'sent'. Queues are: mode, server, help, noqueue. noqueue is only used by the putnow tcl command. Module: server (46) CRON (stackable) bind cron procname Description: similar to bind TIME, but the mask is evaluated as a cron expression, e.g. "16/2 \*/2 5-15 7,8,9 4". It can contain up to five fields: minute, hour, day, month, weekday; delimited by whitespace. Week days are represented as 0-6, where Sunday can be either 0 or 7. Symbolic names are not supported. The bind will be triggered if the mask matches all of the fields, except that if both day and weekday are not '\*', only one of them is required to match. If any number of fields are omitted at the end, the match will proceed as if they were '\*'. All cron operators are supported. Please refer to the crontab manual for their meanings. Flags are ignored. Module: core (47) LOG (stackable) bind log procname Description: triggered whenever a message is sent to a log. The mask is matched against "channel text". The level argument to the proc will contain the level(s) the message is sent to, or '\*' if the message is sent to all log levels at once. If the message wasn't sent to a specific channel, channel will be set to '\*'. Module: core (48) TLS (stackable) bind tls procname Description: triggered for tcp connections when a ssl handshake has completed and the connection is secured. The mask is matched against the idx of the connection. Module: core (49) DIE (stackable) bind die procname Description: triggered when eggdrop is about to die. The mask is matched against the shutdown reason. The bind won't be triggered if the bot crashes or is being terminated by SIGKILL. Module: core (50) IRCAWAY (stackable) bind ircaway procname Description: triggered when Eggdrop receives an AWAY message for a user from an IRC server, ONLY if the away-notify capability is enabled via CAP (the server must supports this capability, see the 'cap' Tcl command for more info on requesting capabilities). "Normal" away messages (301 messages) will not trigger this bind, for those you should instead use a RAWT bind. The mask for the bind is in the format "#channel nick!user@hostname" (* to catch all nicknames). nick is the nickname of the user that triggered the bind, user is the nick!user@host of the user, handle is the handle of the user on the bot (- if the user is not added to the bot), channel is the channel the user was found on (read on for more info on this) and msg is the contents of the away message, if any. If a "*" is used for the channel in the mask, this bind is triggered once for every channel that the user is in the bot with; in other words if the bot is in two channels with the target user, the bind will be triggered twice. To trigger a proc only once per nick change, regardless of the number of channels the Eggdrop and user share, use the RAWT bind with AWAY as the keyword. Module: irc (51) INVT (stackable) bind invt procname Description: triggered when eggdrop received an INVITE message. The mask for the bind is in the format "#channel nickname", where nickname (not a hostmask) is that of the invitee. For the proc, nick is the nickname of the person sending the invite request, user@host is the user@host of the person sending the invite, channel is the channel the invitee is being invited to, and invitee is the target (nickname only) of the invite. The invitee argument was added to support the IRCv3 invite-notify capability, where the eggdrop may be able to see invite messages for other people that are not the eggdrop. (52) RAWT (stackable) bind rawt procname Description: similar to the RAW bind, but allows an extra field for the IRCv3 message-tags capability. The mask can contain wildcards and is matched against the keyword which is either a numeric, like "368", or a keyword, such as "PRIVMSG" or "TAGMSG". "from" will be the server name or the source nick!ident@host (depending on the keyword); flags are ignored. "tag" is a dictionary (flat key/value list) of the message tags with "" for empty values (e.g. "account eggdrop realname LamestBot"). If the proc returns 1, Eggdrop will not process the line any further, to include not being processed by a RAW bind (this could cause unexpected behavior in some cases). As of 1.9.0, it is recommended to use the RAWT bind instead of the RAW bind. (53) ACCOUNT (stackable) bind account procname Description: this bind will trigger when eggdrop detects a change in the authentication status of a user's service account. The mask for the bind is in the format "#channel nick!user@hostname.com account" and accepts wildcards_. account is either the account name the user is logging in to or "*" if the user is not logged in to an account. NOTE: the three required IRC components for account tracking are: the WHOX feature, the extended-join IRCv3 capability and the account-notify IRCv3 capability. if only some of the three feature are available, eggdrop provides best-effort account tracking but this bind could be triggered late or never on account changes. Please see doc/ACCOUNTS for additional information. (54) ISUPPORT (stackable) bind isupport procname Description: triggered when the value of an isupport key changes. The mask is matched against the isupport key. If the value is not set, isset is 0 and the value is the empty string. Because the empty string is valid value, use isset to distinguish empty string values from a key being unset. The bind is called before the change is processed, so [isupport isset]/[isupport get] return the old value. A return value other than 0 makes Eggdrop ignore the change and revert to the old value. After a disconnect from the server, all isupport values are reset to default, but $::server will be empty, so that case can be caught and ignored. Module: server (55) MONITOR (stackable) bind monitor procname Description: triggered when a server sends a MONITOR status change of a target either coming online or disconnecting (not all servers support MONITOR). flags are ignored, nick is the nickname of the intended MONITOR target and can be used with wildcards. For the proc, nick is the nickname connecting or disconnecting, and online is '0' if the nickname disconnected, or '1' if the nickname connected. Module: irc (56) CHGHOST bind chghost procname Description: triggered when a server sends an IRCv3 spec CHGHOST message to change a user's hostmask. The new host is matched against mask in the form of "#channel nick!user\@host" and can contain wildcards. The specified proc will be called with the nick of the user whose hostmask changed; the hostmask the affected user had before the change, the handle of the affected user (or * if no handle is present), the channel the user was on when the bind triggered, and the new hostmask of the affected user. This bind will trigger once for each channel the user is on. ^^^^^^^^^^^^^ Return Values ^^^^^^^^^^^^^ Several bindings pay attention to the value you return from the proc(using 'return '). Usually, they expect a 0 or 1, and returning an empty return is interpreted as a 0. Be aware if you omit the return statement, the result of the last Tcl command executed will be returned by the proc. This will not likely produce the results you intended (this is a "feature" of Tcl). Here's a list of the bindings that use the return value from procs they trigger: (1) MSG Return 1 to make Eggdrop log the command as:: (nick!user@host) !handle! command (2) DCC Return 1 to make Eggdrop log the command as:: #handle# command (3) FIL Return 1 to make Eggdrop log the command as:: #handle# files: command (4) PUB Return 1 to make Eggdrop log the command as:: <> !handle! command (5) CTCP Return 1 to ask the bot not to process the CTCP command on its own. Otherwise, it would send its own response to the CTCP (possibly an error message if it doesn't know how to deal with it). (6) FILT Return "" to indicate the text has been processed, and the bot should just ignore it. Otherwise, it will treat the text like any other. (7) FLUD Return 1 to ask the bot not to take action on the flood. Otherwise it will do its normal punishment. (8) RAW Return 1 to ask the bot not to process the server text. This can affect the bot's performance by causing it to miss things that it would normally act on -- you have been warned. (9) CHON Return 1 to ask the bot not to process the partyline join event. (10) CHOF Return 1 to ask the bot not to process the partyline part event. (11) WALL Return 1 to make Eggdrop not log the message that triggered this bind. (12) NOTE Return 1 to make Eggdrop not process the note any further. This includes stacked note bindings that would be processed after this one, as well as the built-in eggdrop note handling routines. (13) MSGM Return 1 to make Eggdrop not log the message that triggered this bind. (14) PUBM Return 1 to make Eggdrop not log the message that triggered this bind. (15) NOTC Return 1 to make Eggdrop not log the message that triggered this bind. (16) OUT Return 1 to make Eggdrop drop the message instead of sending it. Only meaningful for messages with status "queued". (17) EVNT Return 1 to make Eggdrop not to take the default action for the event. Used for signal type events, ignored for others. (18) TLS Return 1 to disable verbose ssl information for the handshake. (19) RAWT Return 1 to ask the bot not to process the server text. This can affet the bot's performance by causing it to miss things that it would normally act on -- you have been warned. Again. Control Procedures ------------------ Using the 'control' command, you can put a DCC connection (or outgoing TCP connection) in control of a script. All text received from the connection is sent to the proc you specify. All outgoing text should be sent with 'putdcc'. The control procedure is called with these parameters:: procname This allows you to use the same proc for several connections. The idx will stay the same until the connection is dropped. After that, it will probably get reused for a later connection. To indicate that the connection has closed, your control procedure will be called with blank text (the input-text will be ""). This is the only time it will ever be called with "" as the text, and it is the last time your proc will be called for that connection. Don't call killdcc on the idx when text is blank, it will always fail with "invalid idx". If you want to hand control of your connection back to Eggdrop, your proc should return 1. Otherwise, return 0 to retain control. TCP Connections --------------- Eggdrop allows you to make two types of TCP ("telnet") connections: outgoing and incoming. For an outgoing connection, you specify the remote host and port to connect to. For an incoming connection, you specify a port to listen on. All of the connections are *event driven*. This means that the bot will trigger your procs when something happens on the connection, and your proc is expected to return as soon as possible. Waiting in a proc for more input is a no-no. To initiate an outgoing connection, use:: set idx [connect <[+]port>] For SSL connections, prefix the port with a plus sign. $idx now contains a new DCC entry for the outgoing connection. All connections use non-blocking (commonly called "asynchronous", which is a misnomer) I/O. Without going into a big song and dance about asynchronous I/O, what this means to you is: * assume the connection succeeded immediately * if the connection failed, an EOF will arrive for that idx The only time a 'connect' will return an error is if you give it a hostname that can't be resolved (this is considered a "DNS error"). Otherwise, it will appear to have succeeded. If the connection failed, you will immediately get an EOF. Right after doing a 'connect' call, you should set up a 'control' for the new idx (see the section above). From then on, the connection will act just like a normal DCC connection that has been put under the control of a script. If you ever return "1" from the control proc (indicating that you want control to return to Eggdrop), the bot will just close the connection and dispose of it. Other commands that work on normal DCC connections, like 'killdcc' and 'putdcc', will work on this idx, too. The 'killdcc' command will fail with "invalid idx" if you attempt to use it on a closed socket. To create a listen port, use:: listen <[+]port> script By default, a listen port will allow both plaintext and SSL connections. To restrict a port to allow only SSL connections, prefix the port with a plus sign. Procs should be declared as:: For example:: listen 6687 script listen:grab proc listen:grab {newidx} { control $newidx listen:control } When a new connection arrives in port 6687, Eggdrop will create a new idx for the connection. That idx is sent to 'listen:grab'. The proc immediately puts this idx under control. Once 'listen:grab' has been called, the idx behaves exactly like an outgoing connection would. Secure connection can be also established after a connection is active. You can connect/listen normally and switch later using the 'starttls' command. Your script should first inform the other side of the connection that it wants to switch to SSL. How to do this is application specific. The best way to learn how to use these commands is to find a script that uses them and follow it carefully. However, hopefully this has given you a good start. .. _wildcards: Match Characters ---------------- Many of the bindings allow match characters in the arguments. Here are the four special characters: +-----+--------------------------------------------------------------------------+ | ? | matches any single character | +-----+--------------------------------------------------------------------------+ | \* | matches 0 or more characters of any type | +-----+--------------------------------------------------------------------------+ | % | matches 0 or more non-space characters (can be used to match a single | | | word) (This character only works in binds, not in regular matching) | +-----+--------------------------------------------------------------------------+ | ~ | matches 1 or more space characters (can be used for whitespace between | | | words) (This char only works in binds, not in regular matching) | +-----+--------------------------------------------------------------------------+ | \\* | matches a literal \*, but please note that Tcl needs escaping as well, | | | so a bind would have to use "\\*" or {\*} for a mask argument | +-----+--------------------------------------------------------------------------+ Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/ipv6.rst0000664000175000017500000000626614703073435017551 0ustar geogeoIPv6 support Last revised: Mar 24, 2021 ============ IPv6 support ============ This document provides information about IPv6 support which is a new eggdrop feature since version 1.8.0. ----- About ----- Eggdrop can be compiled with IPv6 support. To make use of this, you need an IPv6-enabled OS and IPv6 connectivity. Every possible type of TCP connection can be established over IPv6 now, which includes IRC connections, DCC connections, file transfer, botnet connections, Tcl script connections initiated with the listen/connect commands, telnet and ident lookups. ------------ Installation ------------ ./configure and install as usual, the configure script will detect if your system supports IPv6 and will enable it automatically. You can override this behavior and manually enable or disable IPv6 with ./configure --enable-ipv6 or ./configure --disable-ipv6. Older operating systems may have limited or no support for IPv6. Linux 2.4 & 2.6, FreeBSD, NetBSD, OpenBSD and Mac OS X all have full IPv6 support. MS Windows has proper support beginning with Windows Vista. XP's IPv6 stack has some limitations and needs to be manually installed and enabled. Cygwin includes IPv6 only since version 1.7. Unofficial patches are available for 1.5.x. ----- Usage ----- You can use IPv6 addresses wherever you could specify IPv4 ones. IPs and hostnames are interchangeable everywhere. For certain settings and commands, you can enclose IPv6 addresses in square brackets to prevent the colon character (:) from being interpreted as a port separator. These are documented in the help files and the html documentation, so you can consult them when in doubt. --------------------- CTCP CHAT/CHAT4/CHAT6 --------------------- When a user sends a CTCP chat request, the request is passed to the bot via the IRC server, hiding the user's IP. Since Eggdrop is unable to 'see' the type IP of the user is using (IPv4 or IPv6), it is thus unable to determine whether it should send back an IPv4 or an IPv6 address for the user to connect to. To work around this problem, the CHAT4 and CHAT6 commands were added to Eggdrop to force it to present an IPv4 or IPv6 address for use with a DCC connection, respectively. Otherwise, the traditional CHAT command will likely result in the Eggdrop presenting an IPv4 address to the user. So in short, if you're on an IPv6 address and want to use CTCP CHAT to initiate a DCC session for the partyline, use CHAT6, not CHAT as the CTCP argument. -------- Settings -------- There are four new IPv6 related config variables: vhost4 set this to use a specific vhost with IPv4 connections. Can contain either an IP address or a hostname. vhost6 set this to use a specific vhost with IPv6 connections. Can contain either an IPv6 address or a hostname. prefer-ipv6 when a connection can be established through both IPv4 and IPv6. You can set this to 1 to prefer IPv6 or to 0 to prefer IPv4. Other affected variables: my-ip and my-hostname are removed now. Their function is split between vhost4 and the listen command. nat-ip works with IPv4 as it used to. It has no meaning for IPv6 and is not queried for IPv6 connections. Copyright (C) 2010 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/python.rst0000664000175000017500000001655714703073435020212 0ustar geogeo======================= Using the Python Module ======================= In Eggdrop 1.10.0, Eggdrop was shipped with a Python module that, similar to the existing core Tcl capability, allows Eggdrop to run python scripts. ------------------- System Requirements ------------------- Similar to Tcl requirements, Eggdrop requires both python and python development libraries to be installed on the host machine. On Debian/Ubuntu machines, this requires the packages python-dev AND python-is-python3 to be installed. The python-is-python3 updates symlinks on the host system that allow Eggdrop to find it. The minimum supported Python version is 3.8 and we do require the Global Interpreter Lock for thread safety, even if you use latest Python. -------------- Loading Python -------------- Put this line into your Eggdrop configuration file to load the python module:: loadmodule python To load a python script from your config file, place the .py file in the scripts/ folder and add the following line to your config:: pysource scripts/myscript.py If you need to install dependencies we recommend using virtual environments, see https://docs.python.org/3/library/venv.html for more details. To create the virtual environment in a hidden directory called .venv (only necessary once):: cd eggdrop && python3 -m venv .venv To install a python package in the above .venv directory (in this example, the requests package):: cd eggdrop && source .venv/bin/activate && pip install requests Starting eggdrop with activated venv (must be run every time for proper functionality):: cd eggdrop && source .venv/bin/activate && ./eggdrop You always need to start Eggdrop with the activated venv to set the necessary environment variables. ------------------------ Reloading Python Scripts ------------------------ Unfortunately, reloading python scripts with rehash like Tcl scripts is currently unsupported. Scripts can unbind their existing binds and re-bind them on being loaded again (see the bind section). For now, you should restart your bot when the Python scripts change. You can (should?) also write scripts that manually unload their binds upon a reshash, example code looks like this: # Create a list to track the join binds if 'JOIN_BINDS' in globals(): for joinbind in JOIN_BINDS: joinbind.unbind() del JOIN_BINDS JOIN_BINDS = list() <...> # Create the binds in the script like this JOIN_BINDS.append(bind("join", "*", "*", joinGreetUser)) JOIN_BINDS.append(bind("join", "o", "*", joinGreetOp)) ------------------------ Multithreading and async ------------------------ ``pysource`` loads a Python script in the main Eggdrop thread but is free to use both async Python and threads. ----------------------- Eggdrop Python Commands ----------------------- The Python module is built to use the existing core Tcl commands integrated into Eggdrop via the ``eggdrop.tcl`` module. To call an existing Tcl command from Python, you can either load the entire catalog by running ``import eggdrop.tcl``, or be more specific by ``from eggdrop.tcl import putserv, putlog, chanlist``, etc. Arguments to the Tcl functions are automatically converted as follows: * ``None`` is converted to an empty Tcl object (the empty string, ``""``) * ``List`` and ``Tuple`` is converted to a ``Tcl list`` * ``Dict`` is converted to a ``Tcl dictionary`` * Everything else is converted to a string using the str() method Return values from Tcl functions must be manually converted: * ``""`` the empty string is automatically converted to None * everything else is returned as string * ``Tcl list`` as string can be converted to a Python ``List`` using ``parse_tcl_list`` * ``Tcl dictionary`` as string can be converted to a Python ``Dict`` using ``parse_tcl_list`` ^^^^^^^^^^^^^^^^ bind ^^^^^^^^^^^^^^^^ An important difference to note is that Eggdrop Python has its own ``bind`` command implemented. You will generally want to create binds using the Python ``bind`` command and not import bind from eggdrop.tcl because a Python bind will call a Python function, whereas using the Tcl bind will call a Tcl function (not one from the script you are writing). The python version of the bind command is used to create a bind that triggers a python function. The python bind takes the same arguments as the Tcl binds, but here each argument is passed individually. For example, a bind that would look like ``bind pub * !foo myproc`` in Tcl is written as ``bind("pub", "*", "!foo", myproc)``. For more information on Eggsrop bind argument syntax please see :ref:`bind_types`. The eggdrop.tcl.bind command should not be used as it will attempt to call a Tcl proc. The ``bind`` command returns a PythonBind object that has an ``unbind`` method:: x = bind("pub", "*", "!foo", myproc) x.unbind() ^^^^^^^^^^^^^^^^^^^^^^^ parse_tcl_list ^^^^^^^^^^^^^^^^^^^^^^^ When a python script calls a Tcl command that returns a list via the eggdrop.tcl module, the return value will be a Tcl-formatted list- also simply known as a string. The ``parse_tcl_list`` command will convert the Tcl-formatted list into a Python list, which can then freely be used within the Python script. ^^^^^^^^^^^^^^^^^^^^^^^ parse_tcl_dict ^^^^^^^^^^^^^^^^^^^^^^^ When a python script calls a Tcl command that returns a dict via the eggdrop.tcl module, the return value will be a Tcl-formatted dict- also simply known as a string. The ``parse_tcl_dict`` command will convert the Tcl-formatted dict into a Python list, which can then freely be used within the Python script. -------------------------------- Writing an Eggdrop Python script -------------------------------- Some example scripts, complete with documentation, are included with the Python module that ships with Eggdrop (src/mod/python.mod/scripts). These scripts are included to help demonstrate script formatting and usage. The scripts are: .. glossary:: bestfriend.py This example script demonstrates how to use the parse_tcl_list() python command to convert a list returned by a Tcl command into a list that is usable by Python. greet.py This is a very basic script that demonstrates how a Python script with binds can be run by Eggdrop. imdb.py This script shows how to use an existing third-party module to extend a Python script, in this case retrieving information from imdb.com. listtls.py This script demonstrates how to use parse-tcl_list() and parse_tcl_dict() to convert a list of dicts provided by Tcl into something that is usable by Python. urltitle.py This script shows how to use an existing third-party module to extend a Python script, in this case using an http parser to collect title information from a provided web page. ^^^^^^^^^^^^^^ Header section ^^^^^^^^^^^^^^ Python is able to call any Tcl command by importing the ``eggdrop`` module. For example, to use the ``putlog`` command in a python script, you would import it as:: from eggdrop.tcl import putlog and then call it using:: putlog("This is a logged message") An important difference to note is that Eggdrop Python has its own ``bind`` command implemented. You will generally want to create binds using the Python ``bind`` command and not import bind from eggdrop.tcl because a Python bind will call a Python function, whereas using the Tcl bind will call a Tcl function (not one from the script you are writing). Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/core.rst0000664000175000017500000006304514703073435017613 0ustar geogeoLast revised: August 29, 2023 ===================== Eggdrop Core Settings ===================== This file describes the syntax and all the settings of your Eggdrop configuration file. Please note that you don't need to set all of these variables to make your bot work properly. Executable Path --------------- The first line in an Eggdrop configuration file should contain a fully qualified path to your Eggdrop executable. It has to be implemented in the way the example shows to make the config file work as a shell script. Example:: #! /path/to/eggdrop Basic Settings -------------- You can change the basic Eggdrop appearance and behavior in this section. set username "lamest" This setting defines the username the bot uses on IRC. This setting has no effect if an ident daemon is running on your bot's machine. set admin "Lamer " This setting defines which contact person should be shown in .status, /msg help, and other places. You really should include this information. set network "SomeIrcNetwork" This setting is used only for info to share with others on your botnet. Set this to the IRC network your bot is connected to. set timezone "EST" This setting defines which timezone is your bot in. It's used for internal routines as well as for logfile timestamping and scripting purposes. The timezone string specifies the name of the timezone and must be three or more alphabetic characters. For example, Central European Time(UTC+1) should be "CET". set offset "5" The offset setting specifies the time value to be added to the local time to get Coordinated Universal Time (UTC aka GMT). The offset is positive if the local timezone is west of the Prime Meridian and negative if it is east. The value (in hours) must be between -23 and 23. For example, if the timezone is UTC+1, the offset is -1. set env(TZ) "$timezone $offset" (disabled by default) If you don't want to use the timezone setting for scripting purposes only, but instead everywhere possible, then use this setting. | set vhost4 "99.99.0.0" | set vhost4 "virtual.host.com" | If you're using virtual hosting (your machine has more than 1 IP), you may want to specify the particular IP to bind to. You can specify either by hostname or by IP. Note that this is not used for listening. Use the 'listen' command to specify the listening address. | set vhost6 "2001:db8:618:5c0:263::" | set vhost6 "my.ipv6.host.com" | IPv6 vhost to bind to for outgoing IPv6 connections. You can set it to any valid IPv6 address or hostname, resolving to an IPv6 address. Note that this is not used for listening. Use the 'listen' command to specify the listening address. set prefer-ipv6 "1" Prefer IPv6 over IPv4 for connections and dns resolution. If the preferred protocol family is not supported, other possible families will be tried. addlang "english" If you want to have your Eggdrop messages displayed in another language, change this command to match your preferences. An alternative would be to set the environment variable EGG_LANG to that value. Languages included with Eggdrop: Danish, English, French, Finnish, German. Log Files --------- Eggdrop is capable of logging various things, from channel chatter to partyline commands and file transfers. Logfiles are normally kept for 24 hours. Afterwards, they will be renamed to "(logfilename).yesterday". After 48 hours, they will be overwritten by the logfile of the next day. set max-logs 20 This is the maximum number of concurrent logfiles that can be opened for writing at one time. At most, this value should be the maximum number of channels you expect to create log files for. There is no value for 'infinity'; very few cases should ever require more than 20. A decrease to this value while running will require a restart (not rehash) of the bot. However, don't decrease it below 5. set max-logsize 0 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 set to 0 (OFF). set raw-log 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 incoming botnet traffic via console/log mode 't', raw outgoing botnet traffic via console/log mode 'u', raw outgoing share traffic via console/log mode 'g', and raw incoming 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. logfile "logs/logfile" This setting tells the bot what should be logged, from where, and to which file. Logfile flags: +---+------------------------------------------------------+ | b | information about bot linking and userfile sharing | +---+------------------------------------------------------+ | c | commands | +---+------------------------------------------------------+ | d | misc debug information | +---+------------------------------------------------------+ | g | raw outgoing share traffic | +---+------------------------------------------------------+ | h | raw incoming share traffic | +---+------------------------------------------------------+ | j | joins, parts, quits, and netsplits on the channel | +---+------------------------------------------------------+ | k | kicks, bans, and mode changes on the channel | +---+------------------------------------------------------+ | l | linked bot messages | +---+------------------------------------------------------+ | 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 incoming botnet traffic | +---+------------------------------------------------------+ | u | raw outgoing 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 "\*". Examples:: logfile mco * "logs/eggdrop.log" logfile jpk #lamest "logs/lamest.log" In 'eggdrop.log', put private msgs/ctcps, commands, misc info, and errors from any channel. In 'lamest.log', log all joins, parts, kicks, bans, public chatter, and mode changes from #lamest. set log-time 1 Use this feature to timestamp entries in the log file. set timestamp-format "[%H:%M:%S]" Set the following to the timestamp for the logfile entries. Popular times might be "[%H:%M]" (hour, min), or "[%H:%M:%S]" (hour, min, sec). Read 'man strftime' for more formatting options. Keep it below 32 chars. set keep-all-logs 0 If you want to keep your logfiles forever, turn this setting on. All logfiles will get the 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 switch-logfiles-at 300 You can specify when Eggdrop should switch logfiles and start fresh. use military time for this setting. 300 is the default, and describes 03:00 (AM). set quiet-save 0 "Writing user file..." and "Writing channel file..." messages won't be logged anymore if this option is enabled. If you set it to 2, the "Backing up user file..." and "Backing up channel file..." messages will also not be logged. In addition to this, you can disable the "Switching logfiles..." and the new date message at midnight, by setting this to 3. set logfile-suffix ".%d%b%Y" 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. Console Settings ---------------- set console "mkcoblxs" This is the default console mode. It uses the same event flags as the log files do. The console channel is automatically set to your "primary" channel, which is set in the modules section of the config file. Masters can change their console channel and modes with the '.console' command. File and Directory Settings --------------------------- set userfile "LamestBot.user" Specify here the filename your userfile should be saved as. set pidfile "pid.LamestBot" Specify here the filename Eggdrop will save its pid to. If no pidfile is specified, pid.(botnet-nick) will be used. set help-path "help/" Specify here where Eggdrop should look for help files. Don't modify this setting unless you know what you're doing! set text-path "text/" Specify here where Eggdrop should look for text files. This is used for certain Tcl and DCC commands. set motd "text/motd" The MOTD (Message Of The day) is displayed when people dcc chat or telnet to the bot. Look at doc/TEXT-SUBSTITUTIONS for options. set telnet-banner "text/banner" This banner will be displayed on telnet connections. Look at doc/text-substitutions.doc for options. set userfile-perm 0600 This specifies what permissions the user, channel, and notes files should be set to. The octal values are the same as for the chmod system command. To remind you:: | u g o u g o u g o |0600 rw------- 0400 r-------- 0200 -w------- u - user |0660 rw-rw---- 0440 r--r----- 0220 -w--w---- g - group |0666 rw-rw-rw- 0444 r--r--r-- 0222 -w--w--w- o - others Note that the default 0600 is the most secure one and should only be changed if you need your files for shell scripting or other external applications. set mod-path "modules/" This path specifies the path were Eggdrop should look for its modules. If you run the bot from the compilation directory, you will want to set this to "". If you use 'make install' (like all good kiddies do ;), this is a fine default. Otherwise, use your head :). Botnet/Dcc/Telnet Settings -------------------------- Settings in this section should be unimportant for you until you deal with botnets (multiple Eggdrops connected together to maximize efficiency). You should read doc/BOTNET before modifying these settings. set botnet-nick "LlamaBot" (disabled by default) If you want to use a different nickname on the botnet than you use on IRC (i.e. if you're on an un-trusted botnet), un-comment this line and set it to the nick you would like to use. listen This opens a telnet port by which you and other bots can interact with the Eggdrop by telneting in. There are more options for the listen command in doc/tcl-commands.doc. Note that if you are running more than one bot on the same machine, you will want to space the telnet ports at LEAST 5 apart, although 10 is even better. Valid ports are typically anything between 1025 and 65535 assuming the port is not already in use. If you would like the bot to listen for users and bots in separate ports, use the following format:: listen 3333 bots listen 4444 users If you wish to use only one port, use this format:: listen 3333 all You can setup a SSL port by prepending a plus sign to it:: listen +5555 all You need to un-comment this line and change the port number in order to open the listen port. You should not keep this set to 3333. set remote-boots 2 This setting defines whether or not people can boot users on the Eggdrop from other bots in your botnet. Valid settings are: +---+----------------------------+ | 0 | allow *no* outside boots | +---+----------------------------+ | 1 | allow boots from sharebots | +---+----------------------------+ | 2 | allow any boots | +---+----------------------------+ set share-unlinks 1 This setting prohibits Eggdrop to unlink from share bots if an remote bots tells so. set protect-telnet 0 This setting will drop telnet connections not matching a known host. set dcc-sanitycheck 0 This setting will make the bot ignore DCC chat requests which appear to have bogus information on the grounds that the user may have been trying to make the bot connect to somewhere that will get it into trouble, or that the user has a broken client, in which case the connect wouldn't work anyway. set ident-timeout 5 This setting defines the time in seconds the bot should wait for ident reply before the lookup fails. The default ident on timeout is 'telnet'. set require-p 0 Define here whether or not a +o user still needs the +p flag to dcc the bot. set open-telnets 0 If you want people allow to telnet in and type 'NEW' to become a new user, set this to 1. This is similar to the 'hello' msg command. The protect-telnet setting must be set to 0 to use this. set stealth-telnets 0 If you don't want Eggdrop to identify itself as an Eggdrop on a telnet connection, set this setting to 1. Eggdrop will display 'Nickname' instead. set use-telnet-banner 0 If you want Eggdrop to display a banner when telneting in, set this setting to 1. The telnet banner is set by 'set telnet-banner'. set connect-timeout 15 This setting defines a time in seconds that the bot should wait before a dcc chat, telnet, or relay connection times out. set dcc-flood-thr 3 Specify here the number of lines to accept from a user on the partyline within 1 second before they are considered to be flooding and therefore get booted. set telnet-flood 5:60 Define here how many telnet connection attempts in how many seconds from the same host constitute a flood. The correct format is Attempts:Seconds. set paranoid-telnet-flood 1 If you want telnet-flood to apply even to +f users, set this setting to 1. set resolve-timeout 15 Set here the amount of seconds before giving up on hostname/address lookup (you might want to increase this if you are on a slow network). Advanced Settings ----------------- set firewall "!sun-barr.ebay:3666" Set this to your socks host if your Eggdrop sits behind a firewall. If you use a Sun "telnet passthru" firewall, prefix the host with a "!". set nat-ip "127.0.0.1" If you have a NAT firewall (you box has an IP in one of the following ranges: 192.168.0.0-192.168.255.255, 172.16.0.0-172.31.255.255, 10.0.0.0-10.255.255.255 and your firewall transparently changes your address to a unique address for your box) or you have IP masquerading between you and the rest of the world, and /dcc chat, /ctcp chat or userfile sharing aren't working, enter your outside IP here. This IP is used for transfers only, and has nothing to do with the vhost4/6 or listen settings. You may still need to set them. set reserved-portrange 2010:2020 If you want all dcc file transfers to use a particular portrange either because you're behind a firewall, or for other security reasons, set it here. set ignore-time 15 Set the time in minutes that temporary ignores should last. set hourly-updates 00 Define here what Eggdrop considers 'hourly'. All calls to it, including such things as note notifying or userfile saving, are affected by this. Example:: set hourly-updates 15 The bot will save its userfile 15 minutes past every hour. set owner "MrLame, MrsLame" Un-comment this line and set the list of owners of the bot. You NEED to change this setting. set notify-newusers "$owner" Who should a note be sent to when new users are learned? set default-flags "hp" Enter the flags that all new users should get by default. See '.help whois' on the partyline for a list of flags and their descriptions. set whois-fields "url birthday" Enter all user-defined fields that should be displayed in a '.whois'. This will only be shown if the user has one of these extra fields. You might prefer to comment this out and use the userinfo1.0.tcl script which provides commands for changing all of these. #unbind dcc n tcl \*dcc:tcl #unbind dcc n set \*dcc:set Uncomment these two lines if you wish to disable the .tcl and .set commands. If you select your owners wisely, you should be okay leaving these enabled. set must-be-owner 1 If you enable this setting, only permanent owners (owner setting) will be able to use .tcl and .set. Moreover, if you want to only let permanent owners use .dump, then set this to 2. unbind dcc n simul \*dcc:simul Comment out this line to add the 'simul' partyline command (owners can manipulate other people on the party line). Please select owners wisely and use this command ethically! set max-dcc 50 Set here the maximum number of dcc connections you will allow. You can increase this later, but never decrease it. set allow-dk-cmds 1 Enable this setting if you want +d & +k users to use commands bound as -\|-. set dupwait-timeout 5 If your Eggdrop rejects bots that actually have already disconnected from another hub, but the disconnect information has not yet spread over the botnet due to lag, use this setting. The bot will wait dupwait-timeout seconds before it checks again and then finally reject the bot. set cidr-support 0 Enables cidr support for b/e/I modes if set to 1. This means the bot will understand and match modes in cidr notation, and will be able to put and enforce such bans or unban itself, if banned with a cidr mask. Do NOT set this, if your network/server does not support cidr! SSL Settings ------------ Settings in this section take effect when eggdrop is compiled with TLS support. set ssl-privatekey "eggdrop.key" File containing your private key, needed for the SSL certificate (see below). You can create one issuing the following command:: openssl genrsa -out eggdrop.key 4096 It will create a 4096 bit RSA key, strong enough for eggdrop. This is required for SSL hubs/listen ports, secure file transfer and /ctcp botnick schat For your convenience, you can type 'make sslcert' after 'make install' and you'll get a key and a certificate in your DEST directory. set ssl-certificate "eggdrop.crt" Specify the filename where your SSL certificate is located. If you don't set this, eggdrop will not be able to act as a server in SSL connections, as with most ciphers a certificate and a private key are required on the server side. Must be in PEM format. If you don't have one, you can create it using the following command:: openssl req -new -key eggdrop.key -x509 -out eggdrop.crt -days 365 This is required for SSL hubs/listen ports, secure file transfer and /ctcp botnick schat For your convenience, you can type 'make sslcert' after 'make install' and you'll get a key and a certificate in your DEST directory. set ssl-verify-depth 9 Sets the maximum depth for the certificate chain verification that shall be allowed for ssl. When certificate verification is enabled, any chain exceeding this depth will fail verification. | set ssl-capath "/etc/ssl/" | set ssl-cafile "" | Specify the location at which CA certificates for verification purposes are located. These certificates are trusted. If you don't set this, certificate verification will not work. set ssl-ciphers "" Specify the list of ciphers (in order of preference) allowed for use with ssl. The cipher list is one or more cipher strings separated by colons, commas or spaces. Unavailable ciphers are silently ignored unless no usable cipher could be found. For the list of possible cipher strings and their meanings, please refer to the ciphers(1) manual. Note: if you set this, the value replaces any ciphers OpenSSL might use by default. To include the default ciphers, you can put DEFAULT as a cipher string in the list. For example:: set ssl-ciphers "DEFAULT ADH" ... will make eggdrop allow the default OpenSSL selection plus anonymous DH ciphers. :: set ssl-ciphers "ALL" ... will make eggdrop allow all ciphers supported by OpenSSL, in a reasonable order. set ssl-cert-auth 0 Enable certificate authorization. Set to 1 to allow users and bots to identify automatically by their certificate fingerprints. Setting it to 2 to will force fingerprint logins. With a value of 2, users without a fingerprint set or with a certificate UID not matching their handle won't be allowed to login on SSL enabled telnet ports. Fingerprints must be set in advance with the .fprint and .chfinger commands. NOTE: this setting has no effect on plain-text ports. You can control SSL certificate verification using the following variables. All of them are flag-based. You can set them by adding together the numbers for all exceptions you want to enable. By default certificate verification is disabled and all certificates are assumed to be valid. The options are the following: +---+---------------------------------------------+ | 0 | disable verification | +---+---------------------------------------------+ | 1 | enable certificate verification | +---+---------------------------------------------+ | 2 | allow self-signed certificates | +---+---------------------------------------------+ | 4 | don't check peer common or alt names | +---+---------------------------------------------+ | 8 | allow expired certificates | +---+---------------------------------------------+ | 16| allow certificates which are not valid yet | +---+---------------------------------------------+ | 32| allow revoked certificates | +---+---------------------------------------------+ set ssl-verify-dcc 0 Control certificate verification for DCC chats (only /dcc chat botnick) set ssl-verify-bots 0 Control certificate verification for linking to hubs set ssl-verify-clients 0 Control certificate verification for SSL listening ports. This includes leaf bots connecting, users telneting in and /ctcp bot chat. Modules ------- After the core settings, you should start loading modules. Modules are loaded by the command "loadmodule ". Eggdrop looks for modules in the directory you specified by the module-path setting in the files and directories section. Please note that for different configurations, different modules are needed. Four examples: Channel Security Bot: This bot needs the channels, blowfish, console, dns, irc, and (if you like) ctcp modules loaded. More is not needed and makes the bot slower. Public IRC Bot: A public bot should have all modules available loaded since they provide all functions for everyday use. Secure Filesys Bot: This bot needs all normal IRC operating modules, but not the notes, seen, ctcp or share modules. Limbo Bot: A limbo bot (serves as a botnet hub outside IRC) just needs the channels, console, dns, and maybe notes or share modules loaded. Of course, an encryption module needs to be loaded here, too. Scripts ------- The scripts section should be placed at the end of the config file. All modules should be loaded and their variables should be set at this point. source scripts/script.tcl This line loads script.tcl from the scripts directory inside your Eggdrop's directory. All scripts should be put there, although you can place them where you like as long as you can supply a fully qualified path to them. Some commonly loaded scripts are alltools.tcl and action.fix.tcl. The appropriate source lines are:: source scripts/alltools.tcl source scripts/action.fix.tcl Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/ircv3.rst0000664000175000017500000000551414703073435017706 0ustar geogeoIRCv3 support Last revised: November 27, 2021 ============= IRCv3 support ============= This document provides information about IRCv3 capabilities, as defined via specifications documented by the IRCv3 working group (``_). Support for some of these specifications was added starting with version 1.9.0, and more capabilities are added as possible with new versions. ----- About ----- As more and more IRC servers began to develop and implement their own versions of the IRC protocol (generally defined in RFC1459 and RFC2812), a working group comprised of server, client, and bot developers decided to work together to document these features to make their implementation defined and standardized across servers. What emerged was the IRCv3 set of standards. The specifications developed by the IRCv3 working group was designed to be backwards compatible and are generally implemented via a CAP (capability) request sent at the initialization of an IRC session. A client can optinoally request these "extra" capabilities be enabled through the CAP request, with the assumption that the client can then support the capability requested and enabled. Not all servers or clients support the same capabilities, a general support list can be via the appropriate support table link at ``_. ----- Usage ----- Within eggdrop.conf, several common IRCv3-defined capabilities are enabled simply changing their setting to '1'. Other capabilities without explicit settings in eggdrop.conf may be requested by adding them in a space-separated list to the cap-request setting. For more information on what a specific IRCv3-defined capability does, please consult ``_. -------------------------- Supported CAP capabilities -------------------------- The following capabilities are supported by Eggdrop: * CAP/CAP 302 requests * SASL 3.2 * account-notify * account-tag * away-notify * BOT 005 mode * cap-notify * chghost * echo-message * extended-join * invite-notify * message-tags * Monitor * server-time * setname * userhost-in-names * +typing ------ Errata ------ * Enabling echo-message will cause Eggdrop to trigger PUB/PUBM binds on its own messages (because now it can actually see them). This may cause unintentional functionality with some scripts * Enabling userhost-in-names will cause Eggdrop's internal mechanisms to mark a channel's userlist as synch'd upon receiving the NAMES list after a join, instead of waiting for a full WHO listing. This is done because the assumption is that userhost-in-names was enabled as a response to WHO queries being disabled on a server, which prevents Eggdrop from populating its userlist. To avoid unintended functionality, it is suggested that this capability only be enabled on servers that disable WHO queries. Copyright (C) 2010 - 2024 Eggheads Development Teameggdrop-1.10.0/doc/sphinx_source/using/users.rst0000664000175000017500000001412114703073435020013 0ustar geogeoLast revised: March 07, 2002 =============== Users and Flags =============== People on IRC are recognized by the bot according to their nick!user\@host. That is, if I am on IRC as: \*\*\* Robey is robey\@hubcap.clemson.edu (i hate milk) Eggdrop will identify me according to "Robey!robey\@hubcap.clemson.edu" and not only by my nickname. Eggdrop does not have access levels like some bots. There are no meaningless numbers or titles. Instead, each user has "flags" that entitle them to certain privileges. Think of a flag as a badge. Any user can have any number of flags -- you can have no flags, or you can have all of them. Some flags are good, some are bad. Each flag is identified by a letter. A channel flag applies only to a specific channel, and a global flag applies to all channels. The standard global flags are: +------+-----------------+-------------------------------------------------------+ | Flag | Attribute | Description | +======+=================+=======================================================+ | n | owner | user has absolute control. Only give this flag to | | | | people you trust completely. | +------+-----------------+-------------------------------------------------------+ | m | master | user has access to almost every feature of the bot. | +------+-----------------+-------------------------------------------------------+ | t | botnet-master | user has access to all features dealing with the | | | | botnet. | +------+-----------------+-------------------------------------------------------+ | a | auto-op | user is opped automatically upon joining a channel. | +------+-----------------+-------------------------------------------------------+ | o | op | user has op access to all of the bot's channels. | +------+-----------------+-------------------------------------------------------+ | y | auto-halfop | user is halfopped automatically upon joining a channel| +------+-----------------+-------------------------------------------------------+ | l | halfop | user has halfop access to all of the bot's channels. | +------+-----------------+-------------------------------------------------------+ | g | auto-voice | user is voiced automatically upon joining a channel. | +------+-----------------+-------------------------------------------------------+ | v | voice | user gets +v automatically on +autovoice channels. | +------+-----------------+-------------------------------------------------------+ | f | friend | user is not punished for flooding, etc. | +------+-----------------+-------------------------------------------------------+ | p | party | user has access to the partyline. | +------+-----------------+-------------------------------------------------------+ | q | quiet | user does not get voice on +autovoice channels. | +------+-----------------+-------------------------------------------------------+ | r | dehalfop | user cannot gain halfops on any of the bot's channels.| +------+-----------------+-------------------------------------------------------+ | d | deop | user cannot gain ops on any of the bot's channels. | +------+-----------------+-------------------------------------------------------+ | k | auto-kick | user is kicked and banned automatically. | +------+-----------------+-------------------------------------------------------+ | x | xfer | user has access to the file transfer area of the bot | | | | the bot. | +------+-----------------+-------------------------------------------------------+ | j | janitor | user can perform maintenance in the file area of the | | | | bot (if it exists) -- like a "master" of the file | | | | area. Janitors have complete access to the filesystem.| +------+-----------------+-------------------------------------------------------+ | c | common | this marks a user who is connecting from a public site| | | | from which any number of people can use IRC. The user | | | | will now be recognized by NICKNAME. | +------+-----------------+-------------------------------------------------------+ | b | bot | user is a bot. | +------+-----------------+-------------------------------------------------------+ | w | wasop-test | user needs wasop test for +stopnethack procedure. | +------+-----------------+-------------------------------------------------------+ | z | washalfop-test | user needs washalfop test for +stopnethack procedure. | +------+-----------------+-------------------------------------------------------+ | e | nethack-exempt | user is exempted from stopnethack protection. | +------+-----------------+-------------------------------------------------------+ | u | unshared | user record is not sent to other bots. | +------+-----------------+-------------------------------------------------------+ | h | highlight | use bold text in help/text files. | +------+-----------------+-------------------------------------------------------+ All global flags other then u, h, b, c, x, j, and p are also channel-specific flags. Flags are set with the chattr command. The syntax for this command is:: chattr [attributes] [channel] There are also 26 global user-defined flags and 26 channel user-defined flags (Capital letters A through Z). These are used by scripts, and their uses vary depending on the script that uses them. Copyright (C) 2002 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/tricks.rst0000664000175000017500000000473214703073435020160 0ustar geogeoEggdrop Tricks Last revised: Jun 02, 2021 ============== Advanced Tips ============== Here are some little tricks that you may or may not know about, which aren't documented in other areas. ----------------- Renaming commands ----------------- You can rename a built-in command by binding over it. To rename '.status' to '.report', you'd do:: unbind dcc - status *dcc:status bind dcc m report *dcc:status The first line removes the built-in binding on '.status', and the second line binds '.report' to the built-in status function. ------------ Keeping Logs ------------ If you don't want your logfiles to be deleted after two days and don't want the bot to create a new logfile each new day, then set 'keep-all-logs' to 0 and 'switch-logfiles-at' to 2500 in your bot's config file to make it keeping one logfile all the time. This is not recommended on high traffic channels. ------------ Self-logging ------------ Because of how traditional IRC works, Eggdrop doesn't capture outgoing messages to its logfile. However, if the server you are on supports the IRCv3 capability "echo-message", you can request this capability to be enabled by the server in your config file. This will cause the server to send Eggdrop'd public messages back, thereby allowing those messages to be logged. ------------------------- Modifying Default Strings ------------------------- You can modify Eggdrop's output in the partyline, kick messages, and other texts by editing core.english.lang in the language directory. ----------------------------- Modularizing Your Config File ----------------------------- You can export parts of your config file to separate files. For example, if you have several config files which differ from themselves only by the nickname and the used servers, you can export them to an own file and link it with the 'source' Tcl command, similar to a script. The advantage of this is that you have to edit/upload only the small file instead of the big one. This technique is also useful if you want to maintain the same channel settings, etc across your botnet. ------------------------ Variables in Your Config ------------------------ You can use variables in your config file, since it's really just a normal Tcl file. For example, you can set 'userfile' and 'chanfile' to "yourbot.user" and "yourbot.chan" using the following method:: set myvar "yourbot" set userfile "$myvar.user" set chanfile "$myvar.chan" Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/bans.rst0000664000175000017500000000677314703073435017613 0ustar geogeoBans, Invites and Exempts Last revised: March 07, 2002 ========================== Bans, Invites, and Exempts ========================== I assume that you know how bans work on IRC. Eggdrop handles bans, exempts and invites in various ways, and this file is intended to help clarify how these modes are used within the bot. From here on, 'mode' applies to all three modes (bans, exempts, and invites) unless otherwise specified. There are three types of modes: Global modes These modes will be active on every channel the bot monitors. Some will "expire" after a while (be removed automatically). Others are considered "permanent" and can only be removed by a master. Channel modes These modes are active only on one channel, and are almost always temporary modes that expire after an hour or so (depending on how long you've specified in the config file). Usually they're created by a Tcl script of some sort. Non-bot modes These are modes that were not placed by the bot. They can be removed by anyone on the channel. The other two types of modes are protected by the bot (unless the channel settings specify otherwise), and have to be removed via the bot. Bans can also be either sticky or unsticky: Sticky These modes are usually set by a user using the ".stick" command. Modes with this attribute are attempted to be kept active on the channel at all times by the bot, even if the channel is set to use dynamic modes. Obviously, if the channel isn't set to use dynamic modes, this won't have any effect. Un-sticky These modes are the style that Eggdrop sets by default when a user uses one of the commands that result in a mode. This attribute means that the ban will be removed if using dynamic modes after a certain time. If a mode is "sticky" and you wish to set it to be "un-sticky", use the ".unstick" command. Mode behavior: Bans If the channel is supporting dynamic bans, then the ban is set when a user with a matching hostmask joins the channel; otherwise, the modes are permanently set. On a channel with dynamic bans, the ban expires after 'ban-time' minutes (which is specified in the config file). Exempts If the channel is not supporting dynamic exempts, then they are set at all times. Otherwise, the exemption is set when a ban is placed whose host includes that covered by the exempt. The exempt will remain in place for at least 'exempt-time' minutes (defined in config file) or until after the corresponding ban has been removed, whichever happens last. Invites If the channel does not support dynamic invites, then they are set at all times. Otherwise, the invite is set when the channel is +i and a user requests an invite into the channel. The invite then remains set for 'invite-time' minutes (defined in config file) or until the channel goes -i again, whichever happens last. Copyright (C) 1999 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/pbkdf2info.rst0000664000175000017500000001336214703073435020704 0ustar geogeo****************** Encryption/Hashing ****************** With the release of Eggdrop 1.9.0, an updated crytopgraphy module (PBKDF2) was released for use with Eggdrop. PBKDF2 is a one-way hashing algorithm used to protect the contents of the password file, as well as for use via the Tcl interface. Prior to this, blowfish was used for cryptographic requirements, such as hashing passwords for storage in the userfile. Background ========== Prior to Eggdrop 1.9.0, the blowfish module was included with Eggdrop to protect sensitive data such as passwords stored in the userfile. While there are no known practical attacks against blowfish at the time of this writing, it was decided that a more modern crypto solution was desirable to be included with Eggdrop. The PBKDF2 (Password-based Key Derivation Function 2) uses a password and salt value to create a password hash (the salt value ensures that the hashes of two identical passwords are different). This process is one-way, which means the hashes cannot be cryptographically reversed and thus are safe for storing in a file. The default configuration of Eggdrop 1.9.0 has both the blowfish and pbkdf2 modules enabled (see `Hybrid Configuration`_ below). This will allow users upgrading a seamless transition to the PBKDF2 module. For users starting an Eggdrop for the first time, it is recommended to comment out the 'loadmodule blowfish' line, in order to implement the `Solo Configuration`_. Also of note, the maximum password length is increased to 30 with PBKDF2, up from 15 with Blowfish. The automatically-generated botnet passwords are now 30 characters instead of the maximum-allowed 16 used with the blowfish module, and pull from a larger character set than what was used with the blowfish module. Finally, if you are linking bots, you'll need to ensure the same module is loaded on both bots (ie, if the hub bot is using the pbkdf2 module, the leaf bots must have pbkdf2 loaded as well in order to enable authentication checks). Usage ===== There are two ways to implement PBKDF2- Hybrid configuration, which is recommended for transitioning an already-existing userfile to PBKDF2 by working with the blowfish module, and Solo configuration, which is recommended for use when starting a new Eggdrop for the first time. Hybrid Configuration -------------------- With a hybrid configuration, Eggdrop will run both the blowfish and the pbkdf2 modules concurrently. This will allow Eggdrop to authenticate users against their existing blowfish passwords stored in the userfile. However, the first time a user logs in, the pbkdf2 module will hash the (correct) password they enter and save it to the userfile. The pbkdf2-hashed password will then be used for all future logins. Enabling hybrid configuration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ #. BACK UP YOUR USERFILE! This is the file that usually ends with '.user'. #. Ensure :: loadmodule blowfish is added to the config file and not commented out (it should already be there). #. Ensure :: loadmodule pbkdf2 is uncommented in the config file (or added, if this is a config file from 1.8) #. Start Eggdrop #. If this is your first time starting this Eggdrop, follow the instructions it gives you at startup to identify yourself. Otherwise, for an existing Eggdrop where you are already added to the userfile, log in as usual to the partyline via telnet or DCC, or authenticate via a message command like /msg bot op #. Sit back and enjoy a cold beverage, you did it! Now encourage the rest of your users to log in so that their passwords are updated to the new format as well. Solo configuration ------------------ With a solo configuration, Eggdrop will only run the pbkdf2 module. Eggdrop will not be able to authenticate against passwords in an already-existing userfile and thus will require every user to set a password again, as if they were just added to Eggdrop. This can be done via the PASS msg command (/msg bot PASS ) or by having a user with appropriate permissions (and an already-set password) log into the partyline and use the '.chpass' command. SECURITY CONSIDERATION: This configuration is not ideal for transitioning an existing userfile to PBKDF2. Without the blowfish module loaded, every user in the userfile essentially has no password set. This means any other user that matches a hostmask applied to a handle (*!*@*.aol.com, I'm looking at you) could set the password and gain access to that user's Eggdrop account. Enabling solo configuration ^^^^^^^^^^^^^^^^^^^^^^^^^^^ #. BACK UP YOUR USERFILE! This is the file that usually ends with '.user'. #. Remove or comment:: # loadmodule blowfish from your config file. #. Ensure:: loadmodule pbkdf2 is uncommented (or added, if this is a config file from 1.8) from your config file. #. Start Eggdrop #. If this is your first time starting this Eggdrop, follow the instructions it gives you at startup to identify yourself. Otherwise, for an existing Eggdrop where you are already added to the userfile, set a new password via /msg bot PASS #. Sit back and enjoy a fancy lobster dinner, you did it! If there are other users already added to the bot, DEFINITELY encourage them to set a new password IMMEDIATELY! Tcl Interface ============= The PBKDF2 module adds the 'encpass2' command to the Tcl library. This command takes a string and hashes it using the PBKDF2 algorithm, and returns a string in the following format:: $$rounds=$$ where 'PBK method' is the method specified in the configuration file, 'rounds' is the number of rounds specified in the configuration file, 'salt' is the value used for the salt, and 'password hash' is the output of the hashing algorithm. Copyright (C) 2000 - 2024 Eggheads Development Team eggdrop-1.10.0/doc/sphinx_source/using/autoscripts.rst0000664000175000017500000004005714703073435021241 0ustar geogeoEggdrop Autoscripts =================== Since it's inception, users have needed to load a Tcl script into Eggdrop by downloading a Tcl file, editing the file to customize settings, and then sourceing that file in the config file. In v1.10, the Autoscripts system was added to make this process a little more user-friendly. The autoscripts system helps by: * Centralizing commonly-used scripts in a single location * Allowing scripts to be downloaded via the partyline * Allowing script settings to be configured via the partyline * Allowing user-written scripts to be managed by the autoscripts system * Providing a documented API to write autoscripts-compatible scripts Autoscripts usage ----------------- To view available autoscript commands, type ``.autoscript`` on the partyline. This will open up a special Eggdrop console that doesn't require you to prefix commands with a '.' . The following sub-commands are available for use with script: remote ^^^^^^ This command will list scripts hosted on the Eggdrop website that are available to be downloaded and installed on your Eggdrop. fetch