Frequently asked questions


THE EGGDROP FAQ (Frequently Asked Questions), v0.4


Sections

Contents

  1. A set of links to Internet resources that have something to do with eggdrop.

  2. Compiling the bot: Not very comprehensive, but this sections brings some details about things you need to know to compile your bot successfully. This does not intend to include any system-specific problems. See the compiling.FAQ for those answers.

  3. Running the bot: Soon you will want to start your bot. You already have compiled the bot and edited the config file. This section covers some tips about running your bot, setting up the crontab, and what can go wrong.

  4. Using the bot: Now the bot is running, and you are happy with it. But what about using it? You know some basics already, but need some help in some specific situations. Also you are wanting some tips to improve the way you interact with eggdrop.

  5. Linking and sharing: You are a master with honours in the matter "eggdrop", know every command and their syntax, and you think you are ready to link two bots, and maybe even make them share a userfile. This is not very easy, so this section tries to decypher and explain simple situations and errors you might encounter on your sharing way.

  6. TCL-Scripting: The bot is running, everything is linked and sharing, and you are happy. But you are bored! You want to make some funny things in TCL. But things does not always work as you like, so this section tries to answer the most common mistakes that you will face, and gives you some nice tips about improving the bots capabilities.

  7. Miscellaneous: Some assorted things that doesn't fit anywhere else are found in this section.


Index

  1. Internet Links

  2. Compiling the bot
    1. What do I need to apply a .patch file to the eggdrop's source?
    2. Where do I find the latest eggdrop patches?
    3. How do I apply a patch to my source?
    4. What kind of shell am I using anyway?
    5. How can I find TCL on my system?
    6. Where do I find the TCL sources and what version should I take?
    7. How do I compile my own TCL?
    8. My compile dies at the last minute with "LD fatal signal 11"!
    9. Where can I get a precompiled Eggdrop for my computer?
    10. I get "Makefile:3 : invalid operator" of some such thing When I try to "make"

  3. Running the bot
    1. My bot needs a nick with the '[' ('$', '"', etc) char in it, but it just keeps giving errors when starting...
    2. I get '*** Can't load Userinfo v1.01 -- At least Eggdrop v1.3.0 required' when starting the bot!
    3. What do I need to make the bot join a channel with a key?
    4. When I try to start the bot from the config file it says "Permission denied". How can I start my bot simply by executing the config file?
    5. How do I set up my bot to come back after it dies?
    6. My bot is making clones! It joins with a different nick each 10 minutes!
    7. My bot is writing 1000Mb log files! Help!
    8. Can I make the bot mail me the logs from yesterday?
    9. How can I set up eggdrops file-area?
    10. I get '-NOTICE- No Ident response' when trying to connect to a server.
    11. How can my eggdrop know about nicks >9 chars on IRC?
    12. I just compiled my bot, and tried to start it, but I get 'eggdrop: command not found'. What should I do?
    13. How can I kill my bot from the Unix command prompt?
    14. While loading my bot it says something about:
    15. Can I use the userfile from my 1.0 bot on a 1.3/1.4/1.5 bot?
    16. I sometimes get '(!) timer drift -- spun 5 minutes', what does this mean?
    17. What do I do if I get the Error "User file not found"?
    18. My Eggdrop won't run; It just says "Can't find your hostname!"
    19. My bot dies and the last entry in the logfile is "Received terminate signal". What does that mean and can I prevent it?
    20. Someone else set up a bot I don't like. Are there any backdoors I can use to take their bot down?
    21. What are modules?
    22. Can I compile Eggdrop without dynamic modules?
      1. Do I still need to "loadmodule modules"?
    23. When I "tclsh scripts/weed<userfile> c" It barfs chunks at me and dies.
    24. I get "ld-elf.so.1: Shared object "libtcl80.so.1" not found" or "eggdrop: error in loading shared libraries / libtcl8.1.so: cannot open shared object file: No such file or directory" when I try to start my bot.
    25. I get a whole pile of "unresolved symbol 'Tcl_AppendResult'" (or some other symbol) when I try to load a module.

  4. Using the bot
    1. I need a TCL script to...
    2. I don't want certain people to be kicked by "idle-kick". How?
    3. I try to add an user, and eggdrop says "user isn't on the channel"
    4. I just edited my configuration, changed a channel setting, and .rehash'ed,but the old settings are back! Why?
    5. When I relay to another bot the bold and characters are not shown correctly
    6. What does the "cache hits" in the .status all mean?
    7. I type '.match |thenick|' and although |thenick| exists, it returns nothing! Why?
    8. Does eggdrop currently supports DCC RESUMES?
    9. When I use the .+ban command I want it to add the hostmask of that nick, but it doesn't!

  5. Linking and Sharing
    1. How do I link two bots?
    2. How can I find out in which port one bot is listening on?
    3. What if my bots won't link for some reason?
    4. How can I make my bots always connect to each other when they start (+h)?
    5. Why would I want alternate HUBS (+a)?
    6. How do I share a userfile between two bots?
    7. I get "Rejected flags for unshared channel #channel from Hub_Bot". Why?
    8. I always get 'wrong password' when relinking two bots that were just connected, why?
    9. Sharing users between bots (an example)

  6. TCL-Scripting
    1. How can I learn the secrets to be an eggdrop TCL scripter?
    2. How do I add mIRC colours/bolds/etc to my scripts output?
    3. How can I match users in my script with this AND that flag?
    4. How can I bind an event to an ACTION (/me text)?
    5. I miss the addhost command in 1.3.x!
    6. How to bind an event to occur at a specific time of the day?
    7. How to make the bot execute a TCL procedure every XX minutes?
    8. The RAW binding does not work after switching from 1.1 to 1.3!
    9. How can I remove all hosts from an user in one command?
    10. What should I be aware of when I port my scripts from 1.1 to 1.3?
    11. What new features are available on 1.3 bots that were not found in 1.1?
    12. How to bind an event to NOTICEs?
    13. I have a proc with an parameter called 'args' and I always get '{' and '}' around the text passed to it. Why?
    14. How to find out how long time one's bot has been online (connected to a server) in a TCL script?
    15. Why does 'putserv "PRIVMSG $nick :[OP]"' gives an error 'invalid command name
    16. I tried the 'exec' TCL command and it tells me 'couldn't execute "command blah": no such file or directory', but 'command' is a valid command!

  7. Misc
    1. Where do I find the latest releases and patches?
    2. I found a bug, here is the output of DEBUG. Please fix!
    3. How can I find out with what version of TCL my bot was really compiled?
    4. Can you recommend a good shell provider?

A. Internet Links

Eggdrop sources
ftp://ftp.eggdrop.net/pub/eggdrop/official/ - eggdrop 1.3
ftp://ftp.eggheads.org/pub/eggdrop/GNU/ - eggdrop 1.4
ftp://ftp.eggheads.org/pub/eggdrop/GNU/beta/ - eggdrop1.5
TCL sources
ftp://ftp.scriptics.com/pub/tcl/
Eggdrop 1.3.x patches
ftp://ftp.eggdrop.net/pub/eggdrop/unofficial/patches1.3
ftp://ftp.eggheads.org/pub/eggdrop/patches1.3/
Eggdrop 1.4.x patches
ftp://ftp.eggheads.org/pub/eggdrop/patches1.4/
Eggdrop 1.5.x patches
ftp://ftp.eggheads.org/pub/eggdrop/patches1.5/
Beginners guide to TCL with eggdrop
http://www.cdc.net/~asn/guide2tcl.html
TCL man pages
http://www.sco.com/Technology/tcl/man-7.6-4.2/tcl7.6/contents.html
http://dev.scriptics.com/man/

B. Compiling the bot

1. What do I need to apply a .patch file to the eggdrop's source?
You need to make sure you have the 'patch' utility, and that it is at least version 2.1. Type:

patch -v

to find this out. If you don't see the output of a version number, you probably have the wrong file. Take a look at:

not valid - http://tick.informatik.uni-stuttgart.de/~baschneo/eggdrop/patch

and see if you find a proper 'patch' for your system.
2. Where do I find the latest eggdrop patches?
ftp://ftp.eggdrop.net/pub/eggdrop/unofficial/patches1.3 - eggdrop 1.3
ftp://ftp.eggheads.org/pub/eggdrop/patches1.3/ - eggdrop 1.3
ftp://ftp.eggheads.org/pub/eggdrop/patches1.4/ - eggdrop 1.4
ftp://ftp.eggheads.org/pub/eggdrop/patches1.5/ - eggdrop 1.5
3. How do I apply a patch to my source?
Make sure that you are applying the patch file to the correct version of eggdrop.

  1. 'gzip -d' the .patch file, if it ends with .gz
  2. enter your eggdrop's source root directory
  3. apply the patch with: patch -p1 < eggdrop1.3.xx+demo.patch
  4. find things that might have gone wrong: find . -name "*.rej" -print
If the patch utility asked you about "What file to patch", then you probably do not have the correct version of the patch utility. If you do, then it also may be that you are trying to apply the patch file to an incorrect version of eggdrop. Make sure the eggdrop source you have match the version of the patch file you are trying to apply.
4. What kind of shell am I using anyway?
For some things you do on your shell account you need to know what kind of shell you are using. The easiest way is to type: echo $SHELL

If this do not work, use 'ps' and see what processes are running. Find the one that starts with a dash '-', this is probably your login shell.

This shell can be: sh, bash, ksh, csh or tcsh (or others...).
5. How can I find TCL on my system?

To compile the bot you need the TCL libraries and header somewhere on your system. The ./configure script will try to find them for you. If this fails, you might try to search them on your own.

The library is called libtclX.X.so or libtclX.X.a. The "X.X" will be the version of the library. The extension '.so' means it is a "dynamically loadable library" and the '.a' mean it will be "statically linked".

You can try to find it using: find /usr -name "libtcl*" -print This can take a HUGE amount of time.
Do the same to find the header file: find /usr -name "tcl.h" -print

Once you've found them, you must tell the ./configure script where they are. This should be done setting the TCLLIB and TCLINC variables. Do this:

On sh/bash/ksh shells:
TCLLIB=/directory/of/the/library
TCLINC=/directory/of/the/header
export TCLLIB TCLINC
On csh/tcsh shells:
setenv TCLLIB /directory/of/the/library
setenv TCLINC /directory/of/the/header
Next use ./configure again, and it should locate the files in the directories you specified.
6. Where do I find the TCL sources and what version should I take?
If your machine does not have TCL installed, you should get the sources and compile them by your own.

TCL 7.6p2: ftp://ftp.scriptics.com/pub/tcl/tcl7_6/tcl7.6p2.patch.gz
TCL 8.0.5: ftp://ftp.scriptics.com/pub/tcl/tcl8_0/tcl8.0.5.tar.gz
TCL 8.2 ftp://ftp.scriptics.com/pub/tcl/tcl8_2/tcl8.2.3.tar.gz

The currently recommended version is TCL 8.2. However, the bot will run with any of the versions listed here.
7. How do I compile my own TCL?

You can compile TCL 7.6 on your HOME directory, if you have the space for it. Or compile in /tmp, there you should have plenty of space. Do it like this:

% mkdir /tmp/tcl
% cd /tmp/tcl
% ftp ftp.scriptics.com
Login: ftp
Password: your@email
ftp> cd /pub/tcl/tcl8_2
ftp> bin
ftp> get tcl8.2.3.tar.gz
..wait for the file to arrive. Then:
% gzip -dc tcl8.2.3.tar.gz | tar xvf -
% cd tcl8.2.3/unix
% ./configure --prefix=/tmp/tcl --exec-prefix=/tmp/tcl --disable-shared
..wait for configure to run through... Then:
% make (and wait...)
% make install (and wait more...)
So now you have the TCL libraries in /tmp/tcl. Now tell eggdrop where to find it, by setting the environment:

On bash/sh/ksh shells:
% TCLINC=/tmp/tcl/include
% TCLLIB=/tmp/tcl/lib
% export TCLINC TCLLIB
On csh/tcsh shells:
% setenv TCLINC /tmp/tcl/include
% setenv TCLLIB /tmp/tcl/lib
After setting this, just run eggdrops 'configure' script and make sure it detects the TCL version 7.6. If it does (and it should, if you followed all the steps carefully), you can compile the bot as usual, and it will include the TCL 7.6 libraries. After the bot is compiled, you can delete everything in /tmp/tcl, since it will already be included in your bot. Or leave it there, if your provider don't delete it you will be able to compile future bots using it, too. If you have space you could have done the whole /tmp thing somewhere in your $HOME directory.

8. My compile dies at the last minute with "ld fatal signal 11"!

This happens on Linux machines that have recently been converted to ELF by upgrading to Slackware 3.0. Apparently Slackware 3.0 comes with a non-ELF (a.out) Tcl library, and the compiler doesn't handle that well. (It should give you an error; instead it barfs.) Fixing it is tricky because even if you recompile libtcl.a, the linker will most likely find the "bad" one first, and your work will be in vain.

Here's a fix that's been floating around on the Eggdrop list:

  1. Recompile 'libtcl.a' for yourself, to make sure an ELF librar is created.
  2. Copy it into your eggdrop/src directory, naming it 'libtcl2.a'.
  3. Edit the Makefile and change the line that says '-L/usr/lib -ltcl' to '-L. -ltcl2'.
  4. Recompile Eggdrop.

Also send hate-mail to the Slackware guy telling him to stop f***ing up the libraries. He seemed to assume that everyone would still want to compile old-style (a.out) binaries.

9. Where can i get a precompiled eggdrop for my computer?

It is HIGHLY recommended AGAINST using precompiled Eggdrops from untrusted sources. Eggdrop has been a regular target for hacking and crashing. Distribution of precompiled (binary) versions of Eggdrop are the easiest way of hackers to provide you with the easiest (and most dangerous) way of gaining access to not only your bot, but to your computer account directly. Don't advertise your precompiled Eggdrop binary sites on the Eggdrop list either =P

10. I get 'Makefile:3 :invalid operator' or some-such-thing when I try to 'make'

Try 'gmake'


C. Running the bot

1. My bot needs a nick with the '[' ('$', '"', etc) char in it, but it just keeps giving errors when starting...

Some characters are reserved for special uses in TCL. Since the eggdrop configuration is TCL script, you need to make sure it can be read by the TCL interpreter.

Quote strange characters by adding a slash '/' before it. The chars you surely will want to quote that way are:

[ ] { } " \ $

If you are unsure, quote all dubious chars. It won't hurt.
2. I get '*** Can't load Userinfo v1.01 -- At least Eggdrop v1.3.0 required' when starting the bot!

This is a problem when you run the bot with TCL 8.0 libraries. Just edit the scripts/userinfo1.0.tcl file and remove the lines that do this checking:

if {![info exists numversion] || ($numversion < 1030000)} {
putlog "*** Can't load $userinfover -- At least Eggdrop v1.3.0 required"
return 0
}
3. What do I need to make the bot join a channel with a key?
In your channel settings set the key as usual:

channel add #thechannel { chanmode "+k theKey" }

This will not only make the bot enforce this mode, it will also be used by your bot to join this specific channel.
4. When I try to start the bot from the config file it says "Permission denied". How can I start my bot simply by executing the config file?
To do this, you need to edit the first line of the config to make it point to the full path of where your eggdrop binary is. For example you have

your eggdrop binary in: /home/justme/eggdrop/eggdrop
your bots configuration in: /home/justme/eggdrop/mybot.conf

So you edit the configuration and replace its first line with:

#!/home/justme/eggdrop/eggdrop

Next set the file as executable using: chmod +x mybot.conf
Test it, by running it: ./mybot.conf
This should start your eggdrop bot.
5. How do I set up my bot to come back after it dies?
You must set up a crontab which checks every 10 minutes if your bot is still alive. If the script detect that it is not, it should reload the bot.

Setting up the botchk script

There is a script included with the eggdrop distribution to do this. It is the scripts/autobotchk file. You should set the following to make the script work:

Make sure your bots config file is runnable (see previous question).

Make sure you are in the directory containing the config file. Then type:

./scripts/autobotchk <configfilename> [-noemail] [-5|-10|-15|-30]

This will create a script to start up the bot, and set up a cron job to check the bot every 5,10,15 or 30 minutes depending on what you specify. If you do not want mail to be sent to the account every time the bot restarts add the switch -noemail

6. My bot is making clones! Another joins with a different nick each 10 minutes!

This means your bot checking script that is run in your crontab isn't working. It is never able to detect your bot running, and simply runs another copy.

Two main causes:

  1. You didn't edit the configuration correctly as explained in the previous question. Read it again and recheck everything.
  2. Your quota is exceeded. To solve this problem, you need to add some checking to your botchk script. If your system has the 'quota' command, see if you have the 'X days left' output somewhere when your quota is exceeded. If it does, you can try adding the following at the top of your botchk script. If created automatically by following the instructions in the last question then the file will be called configfilename.botchk:
    if [ -n `quota -v | grep days` ]; then
    echo Quota exceeded!
    exit 0
    fi
7. My bot is writing 1000Mb log files! Help!

For some reason the bots net connection might have gone mad, and the bot is cycling at one or another step until eternity, while logging it's action happily to your log files. Since this can go VERY fast, your log file will rapidly grow to terrible sizes.

There are no known ways to prevent this. You might try to disable the logging of server disconnect/connect notices if you are totally scared (remove the '+s' from the logfile command in your config). Or simply pray for it not to happen one more time. This is not very usual.

You might take a look at your scripts, maybe one of them makes this mess. If you have scripts that use the 'control/listen' procedures, they might be your problem.

8. Can I make the bot mail me the logs from yesterday?

If you set the bot to rotate logs at 5am, you can try to add to your crontab:

5 3 * * * mail your@email.here < /home/justme/eggdrop/mybot.log.yesterday

This will mail you the specified file at 5:03am.
9. How can I set up eggdrops file-area?

To enable eggdrop's filesystem, you need to make sure you have set the following in your bots configuration file:

loadmodule transfer
This will enable DCC SEND and DCC GET from your bot.
loadmodule filesys
set files-path "/home/justme/eggdrop/filesys"
set incoming-path "/home/justme/eggdrop/filesys/incoming"
The loadmodule filesys' will load the filesystem feature. The next settings will tell the bot which is the root of your filesystem. You can also enter paths relative to your bots directory:

set files-path "filesys"
set incoming-path "filesys/incoming"
Make sure these directories exist (filesys and filesys/incoming are created by default by the eggdrop installation) and the filesystem should work.
10. I get '-NOTICE- No Ident response' when trying to connect to a server.

If you get notices like this:

[18:24] -NOTICE- Looking up your hostname...
[18:24] -NOTICE- Found your hostname, cached
[18:24] -NOTICE- Checking Ident
[18:24] -NOTICE- No Ident response

when trying connecting to a server, this is not eggdrop's fault, it is that your machine does not have a identd server to answer ident queries. Some irc servers require this for you to connect. Simply ask your system administrator to install a identd server. Non super-user users do not have permissions to install this, since it must be listening at a privileged port (113).

11. How can my eggdrop know about nicks >9 chars on IRC?

New to eggdrop1.5 is the ability to have bots with different length nicks able to link to each other. This setting can only be changed when net-type is set to 5. Refer to the server module documentation for more information.

12. I just compiled my bot, and tried to start it, but I get 'eggdrop: command not found'. What should I do?

Try calling it using './eggdrop', this should start it. This means that the current directory is not in your PATH. You can add it, before calling eggdrop:

If your shell is csh/tcsh:
setenv PATH ".:$PATH"
If your shell is sh/bash/ksh:
PATH=".:$PATH"
export PATH
Then you can call eggdrop directly, without the './'.
13. How can I kill my bot from the Unix command prompt?
Simplest way: kill -9 `cat pid.Botname`

Note the use of backquotes. Change the "Botname" to the name of your bot. If this do not work, telling you "no such process", go ahead:

14. While loading my bot it says something about: 'Tcl error in file 'eggdrop.conf': invalid command name "channel"'
You probably did not 'make install', which places the modules in the right directory.
15. Can I use the userfile from my 1.0 bot on a 1.3/1.4/1.5 bot?
This will involve two conversions.

1) convert the userfile from the 1.0 format to the 1.1 format.
2) convert the 1.1 userfile to the 1.3/1.4/1.5 format.

Step 1) is the most difficult one, since you will need a running 1.1.x bot. Get and compile eggdrop 1.1.5 and load the userfile with this bot. It will auto-convert the file to the 1.1 format. Make the bot save the file (issue a .save command) and kill the bot.

In step 2) you can use the scripts/weed script included with the 1.3.x distribution, which can read the 1.1 userfile and convert it to the 1.3 format. Use it like this: tclsh scripts/weed userfile.old c The 'c' will tell it to "convert". The new userfile will be called 'userfile.old.weed', just rename and use it. The later versions of eggdrop will update the userfile from the 1.3 version automatically

16. I sometimes get '(!) timer drift -- spun 5 minutes', what does this mean?

This can mean several things:

If you get this very often, this is bad, and probably means the machine your eggdrop is running on is very busy doing other things or you have some buggy script doing strange things. Unload all dubious scripts, and see if the problem vanishes.

17. What do I do if I get the error "User file not found"?

18. My Eggdrop won't run; it just says "can't find your hostname!"

Your machine is set up strangely, and Eggdrop can't figure out its network hostname. You can get around this by setting an environment variable called HOSTNAME.

In sh or ksh:
$ HOSTNAME=myhost.domain.edu
$ export HOSTNAME

In csh or tcsh:
% setenv HOSTNAME myhost.domain.edu

It should work after that. You may want to bug your system administrator to set up her /etc/hosts file correctly, or add those above commands to your '.login' file (sh or ksh: '.profile').

19. My bot dies and the last entry in the logfile is "received terminate signal". What does that mean and can i prevent it?

There's nothing you can do to prevent it. It means the system administrator is killing the Eggdrop process. Most of the time, it's an automatic thing that happens when the system is being rebooted, so it's harmless. If you have a crontab running, the bot will get restarted when the system is back online. Occasionally the system administrator will kill the bot manually -- for example, if he/she doesn't want bots running on the system.

20. Someone else set up a bot I don't like. Are there any backdoors I can use to take their bot down?

No, there have never been any backdoors and there never will be, so please stop asking. Every once in a while, someone finds a way to exploit a bug in Eggdrop, but we fix these bugs as soon as we find out about them. If you want to bring down someone else's bot, you will not have our help.

21. What are modules?

Modules are a way of adding extra C code from the bot, much like Tcl scripts, without requiring the bot recompiling, see doc/MODULES for more info.

22. Can I compile eggdrop without dynamic modules?

Yes, you can, if ./configure detects that your system CAN'T run modules it will setup 'make' to link the modules in statically for you, you can also choose this option if you can do dynamic modules by typing 'make static'. You can also try to compile dynamic modules on a static-only system by typing 'make eggdrop'.

22a. Do I still need to 'loadmodule modules'?

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

23. When I 'tclsh scripts/weed <userfile> c' it barfs chunks at me and dies :(

UPGRADE YOUR TCL, you are probably using Tcl 7.5 or earlier, some of the commands in weed require tcl7.6 or later to run, so either upgrade it, or removing the offending lines from you userfile (those starting with '.' generally) and accept the loss of that data.

24. I get "ld-elf.so.1: Shared object "libtcl80.so.1" not found" or "eggdrop: error in loading shared libraries / libtcl8.1.so: cannot open shared object file: No such file or directory" when I try to start my bot.

'./configure' is looking in the wrong place for Tcl; it looks like it compiled with one version of Tcl and tries to load another. Maybe your sysadmin upgraded Tcl and didn't tell you. In that case, you should just need to recompile your bot.

Or maybe when upgrading he didn't clean the old version of Tcl, and './configure' is looking for the files in the wrong places, or trying to use different versions of tcl.h and libtcl*. Smack your admin and have him install Tcl properly ;) Or try to:

./configure --with-tcllib=<path-to-tcl-lib> --with-tclinc=<path-to-tcl-inc>

Tell configure where to look for the Tcl files.

Try looking for libtcl by:
ls /usr/lib/libtcl*
ls /usr/local/lib/libtcl*

Try looking for tcl.h by:
ls /usr/include/*/tcl.h
ls /usr/local/include/*/tcl.h

If everything else fails, try to install Tcl to your home dir ;)

(Suggested by dw@Undernet, dw@lixom.nu)

25. I get a whole pile of "Unresolved symbol 'Tcl_AppendResult'" (or some other symbol) when I try to load a modules.

Possibility A: see 12.

Possibility B:

Some of the standard libraries have been compiled for static linking only on your machine, you have 3 options:

  1. If it's your own machine, recompile TCL using dynamic linking by using './configure --enable-shared' when you configure TCL (not the bot) and then remake, & reinstall
  2. If it's not you machine, you make have to resort to 'make static' and 'make DEST="path" install' to make and install your bot.
  3. If you are of a more aggressive sense of mind, go beat the stuffing out of your admin for have lame static libraries :)

D. Using the bot

1. I need a TCL script to...
2. I don't want certain people to be kicked by "idle-kick". How?
Just set the +f flag (friend) for those, and they will not be kicked.
3. I try to add an user, and eggdrop says "user isn't on the channel"

When you use .adduser, the given nick but be in the channel of your current console. Check out by typing .channel if the bot sees him there. If you are in the incorrect console channel, switch to the correct one using .console #channel and then use .adduser nick.

An alternative way is to use the .+user nick host command. There the bot will only create the user record, without any hostmask or flags, so you will have to do it on your own. For example:

.+user NewUser *!*new@*.ibm.net
.chattr NewUser +xph
4. I just edited my configuration, changed a channel setting, and .rehash'ed, but the old settings are back! Why?
Try to delete your channel file before .rehash'ing, because these settings are loaded after your configuration file, and they will override them.
5. When I relay to another bot the bold and characters are not shown correctly

If the output looks something like:

<bot> Hey [1mNick![0m My name is [1mBot1.1[0m and I

It means you should use: .fixcodes off

6. What does the "cache hits" in the .status all mean?
Date: Mon, 30 Mar 1998 17:49:44 +0100
From: Q

To be short, cache hit depends on how many users he knows from those who are on the channel. So when their are a lot of users, and he doesn't know anybody of them, cache hit is low, when their are few, and he knows them all, cache hit is high.

7. I type '.match |thenick|' and although |thenick| exists, it returns nothing! Why?
The '|' and '&' characters have a special meaning when matching users. It is a separator for global/channel flags. So use
.whois |thenick|

instead to see the information about this nick. If you need to search for nicks with the '|' character, try:

.match \|thenick\|
8. Does eggdrop currently support DCC RESUMES?
Yes. This is a new feature in eggdrop1.5
9. When I use the .+ban command I want it to add the hostmask of that nick, but it doesn't!

The .+ban command is used to add a ban-mask to the channels, and not to ban a specific user. If you need to use it, you will have to find out the hostmask before using the .+ban command. The syntax is:

.+ban *!*the@*.ban.mask #channel Comment

You can omit the #channel if you want to make a global ban.

If you use the kickban command, it will kick the specified nick, and set a proper (temporary) ban with its hostmask:

.kickban Nick #channel

E. Linking and Sharing

1. How do I link two bots?

Two bots can link through a TCP connection (telnet) and you will then be able to talk to the people on others bots partyline. You will need at least Botnet Master access on both bots to link them, or have someone do their stuff on the other side. You will have to know the address and port each bot is listening to.

Then, all you need to link them is to set the following:

2. How can I find out in which port one bot is listening on?

Use the .dccstat command, it will give you some output similar to:

  SOCK ADDR     PORT  NICK      HOST              TYPE
  ---- -------- ----- --------- ----------------- ----
  3    D01E1C15  2323 (telnet)  *                 lstn
  4    D01E1C15  8080 (script)  http:new_idx      lstn
  8    00000000  6667 (server)  irc.trends.ca     serv  (lag: -1)
  6    00000000  5555 OtherBot  lamesthost.org    bot   flags: pucOsgwliA
  22   D01E1C15  1357 (users)   *                 lstn
  11   81451FAA  1684 Ernst     .uni-stuttgart.de chat  flags: cPtEp/429496
  14   00000000  2324 LagBot    host.lagnet.net   conn  bot
  34   C8F1E217  1083 *         200.241.226.23    scri  http:readsock

You can see that it is listening at port 2323 for telnet connections. The TYPE = "lstn" and NICK = "(telnet)" gives you that indication.

3. What if my bots won't link for some reason?
  1. The password is incorrect.
    • Remove the password on both bots:
      on BotB: .chpass BotA
      on BotA: .chpass BotB
    • Link again
  2. Some other error occurred:
    • Check if you have set the telnet-addresses and the port number correct.
    • Use the .dccstat command on both bots to see if they are really listening "(telnet) * lstn" on the ports you specified.
    • Make sure you are not using a firewall, if you are, you need to guarantee that the telnet connection from one bot to the other can come through it. See some settings in the sample configuration file for further help.
4. How can I make my bots always connect to each other when they start (+h)?

You will want to make one of the bots the HUB of your little botnet, that is, other bots will *always* try to connect to it first. For this, you must set it with the +h bot flag on all other bots. In the case you have BotA and BotB, and want BotA to connect to BotB and vice-versa, you set the +h flag to the opposite bot:

on BotB: .botattr +h BotA
on BotA: .botattr +h BotB
5. Why would I want alternate HUBS (+a)?

If your botnet is getting bigger, you should try to decide over two or three bots which have fast connections to all others, and set one of them as your HUB and the other(s) as your ALTERNATE HUB(s), in case the main HUB is dead.

Say your botnet looks like

    BotHUB
     |-- BotA
     |-- BotB
     `-- BotC

And you have alread set BotHUB as your main HUB with:

on BotA: .botattr +h BotHUB
on BotB: .botattr +h BotHUB
on BotC: .botattr +h BotHUB
on BotHUB: .botattr +h BotA (in case BotHUB dies and comes back)

Now you want BotA to become the alternate HUB.

on BotB: .botattr +a BotA
on BotC: .botattr +a BotA

So if BotHUB dies, BotB and BotC will try to connect to their alternate HUB, BotA. For this to work, you must make sure they have linked to each other at least one time. Do this one time manually (link BotB and BotC to BotA, so that they can their password.

6. How do I share a userfile between two bots?
From: David Fedoruk <kittkat@cascadia-net.com>

on your Hub bot (BotHUB) do this:
.botattr ShareBot +s|+s #sharedchannel
on your passive bot (ShareBot) do this:
.botattr BotHUB +p|+s #sharedchannel .botattr BotHUB +h (only do this when you want the bots to connect)

The |+s is used to make the bot also share flags for the given channel. For this to work, you must also set the channel in your configuration file to be "shared".

channel set #sharedchannel +shared
in both bots configuration.
7. I get "Rejected flags for unshared channel #channel from Hub_Bot". Why?
8. I always get 'wrong password' when relinking two bots that were just connected, why?

If you are trying to link bots with different major version numbers (for example linking a 1.3 bot with an 1.0 one, there is a problem with the passwords, when the bots make the first link without a pass. So to be sure, set the password on your own on both bots. Say you have BotA (1.3.x) and BotB (1.0s), you do:

on BotA: .chpass BotB mylink
on BotB: .chpass BotA mylink
9. Sharing users between bots (an example)
04/08/98
ArmrOfGod
send comments to: silas@technologist.com

This is NOT an introduction to setting up a botnet. This document expects that you already know how to set up bots to link to hubs and alternate hubs, and that know how to use the Get-Ops scripts. If you don't know these things, don't even bother to read this document.

For our first example, we will be using three bots. We will call them Peter, Paul, and Mary. We will also use three channels: #Music, #Folk, #GetReal. Here is the way the bots live in the channels:

#Music Peter, Paul, Mary
#Folk Peter, Mary
#GetReal Peter, Paul

Here is the way the bots will be linked:

     Peter
      |-- Paul
      `-- Mary

The records for each bot are listed below:

---Peter---

  <Peter> #ArmrOfGod# whois Paul
  <Peter> HANDLE    PASS NOTES FLAGS
  <Peter> Paul       yes     0 b
  <Peter>   #Music             sof
  <Peter>   #GetReal           sof
  <Peter>   #Folk              of
  <Peter>   BOT FLAGS: p

  <Peter> #ArmrOfGod# whois Mary
  <Peter> HANDLE    PASS NOTES FLAGS
  <Peter> Mary      yes      0 b
  <Peter>   #Music             sof
  <Peter>   #GetReal           of
  <Peter>   #Folk              sof
  <Peter>   BOT FLAGS: p
---Paul---
  <Paul> #ArmrOfGod# whois Peter
  <Paul> HANDLE    PASS NOTES FLAGS
  <Paul> Paul       yes     0 b
  <Paul>   #Music             sof
  <Paul>   #GetReal           sof
  <Paul>   #Folk
  <Paul>   BOT FLAGS: sh
---Mary---
  <Mary> #ArmrOfGod# whois Peter
  <Mary> HANDLE    PASS NOTES FLAGS
  <Mary> Mary       yes     0 b
  <Mary>   #Music             sof
  <Mary>   #GetReal
  <Mary>   #Folk              sof
  <Mary>   BOT FLAGS: sh

Peter, (the hub bot) contains the master userfile for all three channels. However, we only want to share some of that information with the other two bots, not all of it. In the bot's config files, each channel must have the 'channel set <#channelname> +shared' for each channel it will be sharing.

In this case, Peter will have:

channel set #Music +shared
channel set #GetReal +shared
channel set #Folk +shared

Paul will have:

channel set #Music +shared
channel set #GetReal +shared

Mary will have:

channel set #Music +shared
channel set #Folk +shared

Since Peter is in all three channels, we must define those channels as being shared, since Peter is sharing user records with the other two bots.

Now, here is the tricky part of the .whois fields. The +p (passive share) and +s (active share) flags are often confusing.

When a bot is set with BOT FLAG: p

  <Peter> #ArmrOfGod# whois Paul
  <Peter> HANDLE    PASS NOTES FLAGS
  <Peter> Paul       yes     0 b  
  <Peter>   #Music             sof
  <Peter>   #GetReal           sof
  <Peter>   #Folk                 
  <Peter>   BOT FLAGS: p

This means "this bot (Paul) will accept user files that I (Peter) send it."

When a bot is set with BOT FLAG: s

  <Paul> #ArmrOfGod# whois Peter
  <Paul> HANDLE    PASS NOTES FLAGS
  <Paul> Paul       yes     0 b    
  <Paul>   #Music             sof  
  <Paul>   #GetReal           sof  
  <Paul>   #Folk                   
  <Paul>   BOT FLAGS: s

This means "I (Paul) expect to get a user file from this bot (Peter)."

So, looking at the above two listings, we can see that Paul expects Peter to send it a user file, and Peter expects Paul to receive the user file. THIS IS ONE OF TWO CRITICAL POINTS TO GET RIGHT! If you reverse or don't get these flags correct, your user files WILL NOT TRANSFER. This flags is set with the .botattr command.

On Paul: .botattr Peter +s
On Peter: .botattr Paul +p

The second step is the `s' flags for each channel. This is simpler. It means "I'm sharing user records for this channel." If you don't get these right, no user records will be sent or accepted for the channel in question. Here is a more detailed explanation:

  <Peter> #ArmrOfGod# whois Paul
  <Peter> HANDLE    PASS NOTES FLAGS
  <Peter> Paul       yes     0 b    
  <Peter>   #Music             sof  
  <Peter>   #GetReal           sof  
  <Peter>   #Folk                   
  <Peter>   BOT FLAGS: p

  <Peter> #ArmrOfGod# whois Mary
  <Peter> HANDLE    PASS NOTES FLAGS
  <Peter> Mary      yes      0 b    
  <Peter>   #Music             sof  
  <Peter>   #GetReal                
  <Peter>   #Folk              sof  
  <Peter>   BOT FLAGS: p

Peter expects bots Mary and Paul to accept user files (the 'p' BOT FLAG). The specific channels it will share with each bot is identified with the `s' channel flag ('s' == share). Peter will attempt to send Paul all flags that users have for both #Music and #GetReal, and will send Mary all flags that users have for #Music and #Folk. Mary will receive nothing regarding #GetReal, because even though there is a channel record, the 's' flag is not present.

---Mary---
  <Mary> #ArmrOfGod# whois Peter
  <Mary> HANDLE    PASS NOTES FLAGS
  <Mary> Mary       yes     0 b    
  <Mary>   #Music             sof  
  <Mary>   #GetReal                
  <Mary>   #Folk              sof  
  <Mary>   BOT FLAGS: sh

Mary expects Peter to send her ('s' BOT FLAG) user flags and info for #Music and #Folk. If Peter were to send anything for #GetReal, Mary would automatically reject it, since the 's' flag is missing for that channel.

You can share the entire userfile for all channels by typing

.botattr botname +g

F. TCL-Scripting

1. How can I learn the secrets to be an eggdrop TCL scripter?
  1. Learn more about TCL.
    Resource: http://www.tclconsortium.org/
  2. Learn about what specific commands are added by eggdrop to TCL
    Resource: docs/tcl-commands.doc that comes with every eggdrop distribution
  3. Get other scripts that do something similar than what you intend to do, and learn by following these examples
    Resource: ftp://ftp.eggheads.org/pub/eggdrop/scripts1.3
    Resource: ftp://ftp.eggheads.org/pub/eggdrop/scripts1.4
    Resource: ftp://ftp.eggheads.org/pub/eggdrop/scripts1.5
2. How do I add mIRC colours/bolds/etc to my scripts output?
These can be added using the following code:
  meaning     key in    TCL
              mIRC      equivalent
  ---------------------------------
  colour      CTRL-K    /003
  bold        CTRL-B    /002
  underline   CTRL-U    /031
  reverse     CTRL-R    /022
So you can use: putserv "PRIVMSG #chan :/00312,4BLUE ON RED!/003"
3. How can I match users in my script with this AND that flag?

Use the 'userlist flags channel' command to get persons with the specified flags. If you use:

userlist AB

You will get all users that have flags A *or* B. If you want it to be A *and* B, you must use:

userlist AB&

The default matching method used in eggdrop is OR, so you must tell it when you want another thing (an AND). '|' and '&' are equivalent separators, one meaning OR, one meaning AND.

4. How can I bind an event to an ACTION (/me text)?
bind ctcp - "ACTION" action_proc

This will trigger 'action_proc' when someone does an action to the channel or to the bot in private. You need to pick up what you want inside your proc.

Send to the bot privately:

proc action_bind { nick uhost hand dest keyword text } {
if {[string index $dest 0] == "#"} { return 0 }
...
}

Send to a channel:

proc action_bind { nick uhost hand dest keyword text } {
if {[string index $dest 0] != "#"} { return 0 }
...
}

The ACTION will be triggered if sent to a channel or when sent to the bot privately, that's why you need to check which was the destination right at the beginning of the proc. The '$dest' will be a channel name or the nickname of your bot.

5. I miss the addhost command in 1.3.x!
This was replaced with: setuser <nick> HOST <hostmask>
6. How to bind an event to occur at a specific time of the day?
Use the time binding:

bind time - <mask> time:proc
proc time:proc { min hour day moth year } {
}

The <mask> should be a set of 5 integer numbers, in the form: "min hour day month year". Examples:

7. How to make the bot execute a TCL procedure every XX minutes?
if {![info exists myproc_running]} {
timer 20 myproc
set myproc_running 1
}

proc myproc {} {
# your stuff here ...
# ...
timer 20 myproc
return 1
}

This will guarantee that your script will not start another timer if the owner rehashes the bot.

8. The RAW binding does not work after switching from 1.1 to 1.3!
The syntax was changed:

In 1.1.x:
bind raw - "% 372 %" proc

In 1.2.x and 1.3.x:
bind raw - "372" proc

The matched mask now just includes the "keyword" of the raw command, and it can be a numeric, or another thing (NOTICE, PRIVMSG, etc).

9. How can I remove all hosts from an user in one command?
bind dcc n|- zaphosts dcc:zaphosts

proc dcc:zaphosts { idx hand text } {
foreach host [getuser $text hosts] { delhost $text $host }
return 1
}
10. What should I be aware of when I port my scripts from 1.1 to 1.3?

This will try to make a summary of *all* changes that you must consider when you port a script from an 1.1 bot to a 1.3 bot.

  1. Numeric flags are gone

    Search for the use of the +1 - +9 flags and eventual redefinitions to other names with the 'set flagX Y' command or the 'newflag' procedure. If you have something like these, you must now use the new flaging standard:

    • Lowercase flags are for eggdrops own use
    • All uppercase letters are custom flags and can be used by scripts
    • Numerical flags are gone

  2. Userflag matching system

    The way you match for channel flags has changed. All commands now use the same matching method, where you have:

    [globalflags]{&/|}[channelflags]{&/|}[botflags] #channel

    The '|' means an OR concatenation, the '&' an AND. For example:

           +op|+o #channel  -> global +o OR global +p OR channel +o
           +n&+o #channel   -> global +n AND channel +o
           +mn&             -> global +m AND global +n
    

    This makes some old commands break, but opens many new possibilities to simplify and shorten pieces of scripts.

    The commands you need to check if they need - or would benefit from - an update:

    • matchattr

      'matchchanattr' is NOT usable anymore. Change it to the 'matchattr' with the proper syntax for checking for channel flags.

      In 1.1: matchattr nick +globalflag
      In 1.3: matchattr nick +globalflag

      In 1.1: matchchanattr nick +chanflag #channel
      In 1.3: matchattr nick |+chanflag #channel

      New in 1.3: matchattr nick +globalflag|+chanflag #channel

    • userlist

      Was only extended in 1.3, channel matching wasn't possible in 1.1

      In 1.1: userlist +globalflag
      In 1.3: userlist +globalflag

      New in 1.3: userlist |+chanflag #channel

      New in 1.3: userlist +globalflag|+chanflag #channel

    • chattr

      Don't forget to add the '|' before the flag you are checking for, if you are checking for a channel flag. Otherwise it will only check for global flags.

      In 1.1: chattr nick +globalflag
      In 1.3: chattr nick +globalflag

      In 1.1: chattr nick +chanflag #channel
      In 1.3: chattr nick |+chanflag #channel

      New in 1.3: chattr +globalflag|+chanflag #channel
      New in 1.3: botattr +botflags [#channel]

    • chanlist

      Was extended in 1.3 to also allow '|' (OR) matches

      In 1.1: chanlist #channel [+globalflag&+chanflag]
      In 1.3: chanlist #channel [+globalflag&+chanflag]

      New in 1.3: chanlist #channel +globalflag|+chanflag

    • bind

      Uppercase flags that were used to match for channel owners, channel masters and channel ops (+N, +M and +O) should be changed to the new matching system! Uppercase flags now are custom flags!!

      In 1.1: bind type +globalflag command proc
      In 1.3: bind type +globalflag command proc

      In 1.1: bind type +CHANFLAG command proc (flag in UPPER-case)
      In 1.3: bind type |+chanflag command proc (flag in lower-case)

      New in 1.3: bind type +globalflag|+chanflag command proc

  3. User information

    There used to be dozens of procs to get and set the various information stored with each user. Now there are only two procs to handle this: 'getuser' and 'setuser'.

    PASSWORD:
    In 1.1: chpass <handle> [pass]
    In 1.3: setuser <handle> PASS [pass]

    INFO LINE:
    In 1.1: setinfo <handle> <info>
    In 1.3: setuser <handle> INFO <info>

    In 1.1: getinfo <handle>
    In 1.3: getuser <handle> INFO

    In 1.1: setchaninfo <handle> <channel> <info>
    In 1.3: setchaninfo <handle> <channel> <info>

    In 1.1: getchaninfo <handle> <channel>
    In 1.3: getchaninfo <handle> <channel>

    COMMENT:
    In 1.1: getcomment <handle>
    In 1.3: getuser <handle> COMMENT

    In 1.1: setcomment <handle> <comment>
    In 1.3: setuser <handle> COMMENT <comment>

    DCCDIR:
    In 1.1: getdccdir <handle>
    In 1.3: setuser <handle> DCCDIR

    In 1.1: setdccdir <handle> <dccdir>
    In 1.3: setuser <handle> DCCDIR <dccdir>

    EMAIL:
    In 1.1: getemail <handle>
    In 1.3: getuser <handle> XTRA EMAIL

    In 1.1: setemail <handle> <email>
    In 1.3: setuser <handle> XTRA EMAIL <email>

    LASTON:
    In 1.1: getlaston <handle> <channel>
    In 1.3: getuser <handle> LASTON <channel>

    In 1.1: getchanlaston <handle>
    In 1.3: lindex [getuser <handle> LASTON] 1

    In 1.1: getlaston <handle> (global laston)
    In 1.3: lindex [getuser <handle> LASTON] 0

    In 1.1: setlaston <handle> <channel> <unixtime>
    In 1.3: setuser <handle> LASTON <unixtime> <place>
    (<place> can also be 'partyline' or '@otherbot')

    New in 1.3: setuser <handle> LASTON <unixtime> <place> *
    (only sets laston for specified place, don't set global laston)

    HOSTS:
    In 1.1: gethosts <handle>
    In 1.3: getuser <handle> HOSTS

    In 1.1: addhost <handle> <hostmask>
    In 1.3: setuser <handle> HOSTS <hostmask>

    New in 1.3: setuser <handle> HOSTS
    (clears all hostmasks for that user)

    In 1.1: delhost <handle> <hostmask>
    In 1.3: delhost <handle> <hostmask> (only command that remained in 1.3)

    BOTADDR:
    In 1.1: getaddr <handle>
    In 1.3: getuser <handle> BOTADDR

    In 1.1: setaddr <handle> <addr>
    In 1.3: setuser <handle> BOTADDR <addr>

    XTRA FIELD:
    In 1.1: getxtra <handle>
    In 1.1: setxtra <handle> <xtrastuff>

    The access to the XTRA field was uncoordinated and scripts could do with it whatever they liked. So some standard use was adopted with the following commands from the scripts/toolkit.tcl:

    In 1.1: user-get <handle> <key>
    In 1.3: getuser <handle> XTRA <key>

    In 1.1: user-set <handle> <key> <data>
    In 1.3: setuser <handle> XTRA <key> <data>

    If your script uses 'getxtra' and 'setxtra' directly, you should port it to use this structured access now. If your script used 'user-get' and 'user-set', then you can just switch over to the new commands.

  4. Bindings

    Some bindings have changed their mask matching and/or the number of arguments of the procs they call:

    • RAW
      In 1.1: bind raw - "% 372 %" proc
      In 1.3: bind raw - "372" proc

    • CHPT

      Now the mask is checked agains the text the user used to leave, and the channel is given as a further argument to your proc.

      bind chpt <flags> <mask> <proc>
      In 1.1: proc <proc> <bot> <nick> <sock>
      In 1.3: proc <proc> <bot> <nick> <sock> <chan>

    • TIME

      The first argument was <bot>, this is useless and was removed.

      bind time - <mask> <proc>
      In 1.1: proc <proc> <bot> <min> <hour> <day> <month> <year>
      In 1.3: proc <proc> <min> <hour> <day> <month> <year>

  5. Misc
    • dumpfile
      Now the file should be in the 'help/text' and not in the 'text' directory.

    • putidx <idx> <text>
      Was removed in 1.3
11. What new features are avaliable on 1.3 bots that were not found in 1.1?

Some things were already pointed out in the last question, you can recognize them by the 'New in 1.3'. Here are other new things you might want to use:

  1. New commands
    • botattr <handle> [changes [channel]]
      Similar to chattr except for bot attributes rather than normal user attributes, this includes the channel-specific +s share flag

    • addchanrec <handle> <channel>
      Add a channel record for the user

    • delchanrec <handle> <channel>
      Removes a channel record for the user; this includes all associated channel flags

    • unames
      Returns the current operating system the bot is using.

    • storenote <from> <to> <msg>l <idx>
      stores a note for later reading, notify idx of any results (use idx == -1 for no notify).

  2. New possibilities
    • whom <chan>
      if you specify a channel of * every user on the botnet is returned with an extra argument indicating the channel the user is on

    • killassoc <chan>
      use 'killassoc &' to kill all assocs.

  3. New global variables
    • numversion
      current numeric bot version (ie: "1031401" = 1.3.14, patch #1);
      Numerical version is "MMNNRRPP" where:
      MM Major release NN Minor release RR sub-release PP patch level
    • server-online
      Unixtime when the bot was started

    • lastbind
      The last command binding which triggered. This allows you to identify which command triggered a tcl routine.

  4. New bindings
    • AWAY
      bind away - <mask> <proc>
      proc <proc> <bot> <idx> <msg>
      triggers when a user goes away or comes back on the botnet
      (msg == "" when returning)
    • NKCH
      bind nkch - <mask> <proc>
      proc <proc> <oldnick> <newnick>
      triggered whenever a local users nick is changed (in the userfile)
    • LOAD
      bind load - <mask> <proc>
      proc <proc> <module>
      triggers when a module is loaded.
    • UNLD
      bind unld - <mask> <proc>
      proc <proc> <module;>
      triggers when a module is unloaded.

There may be more things, almost all of this was extracted from the documentation changes.

12. How to bind an event to NOTICEs?
Send to the bot:
bind notc <flags> <mask> <proc>
13. I have a proc with an parameter called 'args' and I always get '{' and '}' around the text passed to it. Why?

When you use the parameter name "args", it has a special meaning to TCL. It means: Accept any number of parameters here, and put each argument into a separate list item. If you pass just one argument, it still makes a list of it.

If you are confused, just avoid using 'args', use 'arg' or something else instead.

14. How to find out how long time one's bot has been online (connected to a server) in a TCL script?

You can use the (undocummented) TCL global variable "server-online" to find out the timestamp of when your bot connected to the server.

set time [expr [unixtime] - ${server-online}]

would give you the ammount of seconds your bot is connected.
15. Why does 'putserv "PRIVMSG $nick :[OP]"' gives an error 'invalid command name "OP"'?
Use a bachslash to "quote" characters that might be misinterpreted by TCL, like "[", "{", "$" or sometimes "(".
16. I tried the 'exec' TCL command and it tells me 'couldn't execute "command bla": no such file or directory', but 'command' is a valid command!

Don't quote the whole command, pass each argument separately. So if you want to execute 'ls -l DEBUG':

WRONG: exec "ls -l DEBUG" -> this will give you an error
RIGHT: exec ls -l DEBUG

G. Misc

1. Where do I find the latest releases and patches?
2. I found a bug, here is the output of DEBUG. Please fix!

You should first try to reproduce the bug, and find a pattern that will trigger the bot's crashing (or whatever) in a consistant manner. Just sending one copy of your DEBUG file will not help very much, you need to see if you can reproduce the error over and over.

Having that, describe exactly the situation, append relevant DEBUG information and information about your system (output of the 'uname -a' command, for example) and the TCL version your bot was compiled with, and send it to one of the main mailing lists:

eggheads@eggheads.org
eggdev@eggheads.org
3. How can I find out with what version of TCL my bot was really compiled?

In your partyline, type: .tcl info tclversion

If this gives you an error that the .tcl command is not avaliable, you can append a line to your bots configuration file:

putlog "TCL Version: [info tclversion]"

Do a .rehash or restart the bot, and pay attention, after loading everything you will see it telling you the version number.

4. Can you recommend a good shell provider?
From: Chuck Byam <crb6x@virginia.edu>
Date: Wed, 11 Feb 98 20:54:39 -0500

For a listing of nearly 4000 ISP's worldwide see:

http://thelist.internet.com

Don't come to the mailing lists asking for suggestions. The best shell is the shell that works best for you.


$Id: faq1.html,v 1.1 2000/04/12 15:25:23 jason Exp $
1998 Ernst <ernst@studbox.uni-stuttgart.de>
2000 Eggheads Development Team