passctrl.tcl Component Documentation

# passctrl.tcl for netbots.tcl v3.35
# designed to work with eggdrop 1.3.28 or higher
# Johoho's Eggdrop Page - http://johoho.eggheads.org/eggdrop/
# passctrl.tcl copyright (c) 1999,2000,2001 by Johoho <johoho@hojo-net.de>
# security routines copyright (c) 2001 by Abraham <abraham@mud.pl>
# netbots.tcl copyright (c) 1998-2000 by slennox <slennox@egghelp.org>

## passctrl.tcl component script v1.27.0, 28.06.2001 ##

# History:
# v0.10.0, 02.05.2000 - initial design and concept
# v0.30.0, 03.05.2000 - fixed bugs
# v0.50.0, 04.05.2000 - changed logging, handling, etc.
# v1.00.0, 06.05.2000 - public release
# v1.10.0, 07.05.2000 - added dictionary support
# v1.11.0, 29.05.2000 - fixed logging bug
# v1.12.0, 01.06.2000 - fixed another logging bug
# v1.13.1, 16.06.2000 - fixed a small DOC bug - thanks ICU
# v1.14.0, 19.06.2000 - added NO-IRC support
# v1.20.0, 20.01.2001 - fixed a non-existant user bug - thanks abrahamek
# v1.21.0, 16.02.2001 - added security routines to chpass command (Abraham)
# v1.22.0, 19.02.2001 - optimised security routines in chpass command (Abraham)
# v1.23.0, 24.02.2001 - fixed minor but annynoing bugs in chpass command (Abraham)
# v1.24.0, 13.03.2001 - fixed other minor but annynoing bugs (Abraham)
# v1.25.0, 16.03.2001 - fixed, optimised and re-worked code (Abraham)
# v1.26.0, 14.06.2001 - fixed some cosmetic bugs (Abraham)
# v1.27.0, 28.06.2001 - added security routines to msged PASS command (Abraham)

more detailed history is provided in script file

# thanks to NML_375 for his regexp help (crappy brackets :)! thanks slennox for netbots.tcl
# credits to Abraham for his bug and feature reports [and coding :-)]

Please note that this component is fully compatible with netbots.tcl v3.15 - 3.35 by slennox



This script provides some password checks to eggdrop. Any password entered by msg(pass) or dcc(chpass and newpass) will be validated against criterions. Possible criterions are:

  • is it long enough?
  • does it contain a alphabetic character?
  • does it contain lower and upper case alphabetic characters?
  • does it contain a numeric character?
  • does it contain a special character as ! for example?
  • check the password agains a wordlist

    Additional checks are made whether the pass ist same to the handle of the user or if the handle is same to the reversed handle of the user. (i.e. if your nick is foo, than it won't accept foo or oof as a password). Owners are allowed to set any password they want using chpass.

    Recently security routines was added, to prevent situation when for example channel master is changing password of permanent owner, no futher setup is needed.

    Commands MSG/DCC

    DCC Commands

    .chpass (m|m) - same as .chpass in eggdrop
    .newpass (-|-) - same as .newpass in eggdrop

    MSG Commands

    pass (-|-) - same as pass in eggdrop



    To install this component properly you have to copy it to your netbots directory and add these lines to your netset.tcl conf:

    # passctrl.tcl
    set nb_component(passctrl) 1
    set pc_length 7
    set pc_strength 3
    set pc_owner 1
    set pc_wordlist "words.txt"

    Settings Documentation

    pc_length (default: 7)
    How long must a password be at least to be accepted by the bot?
    Valid settings: A value between 1 and the maximum eggdrop allows (at present 15)
    pc_strength (default: 3)
    This setting describes the way eggdrop checks the passwords. There are 5 criterions, each criterion got an octal value.
        1 does it contain a alphabetic character?
        2 does it contain a numeric character?
        4 does it contain a special character as ! for example?
        8 does it contain lower and upper case alphabetic characters?
       16 check the password against a dictionary
    The strength of a password is derived by adding up the values 16, 8, 4, 2 and 1.
    Some examples:
        3 check for chars and numerics 
        7 check for extra chars, chars and numerics
       12 check for chars case sensitive and extra chars
       23 check against dictionary, extra chars, chars and numerics
    The strength options 9, 11 and 13 are obsolete but work as expected.
    Valid settings: 1 upto 31.
    pc_owner (default: 1)
    Should the script allow the perm-owner to set any password via .chpass and .newpass?
    Valid settings: 1 to enable, 0 to disable.
    pc_wordlist (default: "words.txt")
    Set here the wordlist file
    Valid settings: a valid filename


    Q:  I use special characters in my passwords, but it still does not accept them!
    A:  This is a known TCL bug. Update the TCL version on your shell to at least 8.3.0
    Q:  I use a pc_strength option higher then 16 and my bot gets so slooooow!
    A:  You enabled dictionary checking. This delays your bot seriously, since eggdrop checks every password against it's wordlist. Depending on the speed of your drive and cpu, as well as the size of the wordlist, this can slow down your bot.
    Q:  I have a question, but it's not listed here.
    A:  Feel free to contact the author at johoho@hojo-net.de!


    You can contact me via E-Mail at johoho@hojo-net.de, at ICQ 2499577 (tell me who you are and what you want or I'll ignore you) or catch me on irc usually around 18-24 UTC+1 in #eggdrop. (IrcNET)


    passctrl.tcl is provided 'as is' and without warranty of any kind. You may use it own will as long as the author is NOT held responsible for ANY damage caused by the usage of this script, neither direct or indirect.
    You may modify the script and all belonging files as long as you keep this copyright-text, include a short description of all changes, and send a copy to the author (e-mail: johoho@hojo-net.de).

    ©2000 by Johoho@IrcNET, 28 June 2001. CONTACT