LizardBot/FAQ

From LizardWiki, FastLizard4's wiki and website
Jump to: navigation, search



Ambox rewrite orange.svg

Note: Some experience in the PHP programming language - which this bot is written in - is recommended for using this bot. The documentation on this site assumes that you are familiar with at least the basics of PHP (such as declaring variables, how to quote strings, etc.). That said, this is only a recommendation - if you don't know PHP at all, you are welcome to try out LizardBot, and do ask for help on our IRC channel or elsewhere if you need it.

Does the bot work on Windows?

As of version v6.0.0.0b, the bot runs on Windows. See here for instructions.

Starting the Bot

Failure to load

Question

The bot dies when I try to run it! I see an output like below! What did I do wrong?

*******************************************************************************
Loading pandorabot extension...
Pandorabot class loaded!
Welcome to the interface for LizardBot-1!
Loading essential config files...

Warning: require(lizardbot.conf.php): failed to open stream: No such file or directory in
/home/username/lizardbot.php on line 146

Fatal error: require(): Failed opening required 'lizardbot.conf.php'
(include_path='.:/usr/share/php:/usr/share/pear') in /home/username/lizardbot.php on line 146

username@host:~$

Answer

You are not running PHP version 5 or higher or have not properly configured the bot. In this case, the configuration file could not be found. Go back to Bot Setup and recreate the configuration file. Other errors may include the one below, when a required setting is not present. Again, go back to bot setup and reconfigure the bot.

*******************************************************************************
Loading pandorabot extension...
Pandorabot class loaded!
Welcome to the interface for LizardBot-1!
Loading essential config files...
OK!
Verifying required settings are present...
Default nickname missing from config file.
username@host:~$

In this case, $nickname is not set.

Failure to connect

Question

I can't get the bot to connect, and I see strange error messages like the one below. What gives?

Attempting to connect to "irc.myircnetwork.com"...

Now commencing connection process...

Opening socket...

Warning: fsockopen(): unable to connect to irc.myircnetwork.com:6667 (Connection timed out) in
/home/username/lizardbot.php on line 297

Could not connect because: Could not open socket! (ERRNO: 1)
Technical details:
E1: 110
E2: Connection timed out
username@host:~$

Answer

For some reason, the bot can't establish a connection to the server. Double check to make sure that the server address is correct and that the server is up. Also verify that you have a working internet connection. These errors usually give a descriptive error message after "E1" and "E2", with E1 being the error number and E2 being the description. In this case, the error was 110: Connection timed out, meaning that the server is valid but a connection couldn't be established. However, one case where the error message is nondescriptive is a case like this, which I encoutered a few days back:

Attempting to connect to "irc.devnode.com"...

Now commencing connection process...

Opening socket...

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in
/home/fastlizard4/lizardbot.php on line 297

Warning: fsockopen(): unable to connect to irc.devnode.com:6667 (Unknown error) in
/home/fastlizard4/lizardbot.php on line 297

Could not connect because: Could not open socket! (ERRNO: 1)
Technical details:
E1: 0
E2:
fastlizard4@scalar:~$

You look for the error code, but there is none! Just error number 0 (which, as computer experts should know, means "no error") and a blank error description. This means you must look up, as the error message is buried. Don't see it? I'll show it to you below.

Warning: fsockopen(): php_network_getaddresses: getaddrinfo failed: Name or service not known in
/home/fastlizard4/lizardbot.php on line 297

Aha! This means that you entered an address that doesn't resolve to a server. In short, no such server exists. After studying the error, I noticed why (and this is a very common mistake): I typed irc.devnode.com instead of the correct irc.devnode.org. If you see a message like this, remember to check the address you enter.

Operating the Bot

Unresponsive to my commands!

Question

Help! The bot isn't responding to my commands!

Answer

Ahh, I'll bet you didn't setup the bot's access list correctly. You are likely trying to run a command that *!*@* (everyone) doesn't have the access to run (rather, shouldn't have the access to run) such as @die or @rehash. Why? You probably didn't put your correct hostmask in the place of YOUR HOSTMASK HERE in the configuration file. Don't see it? Scroll down to the place where $users is set. Replace this with your correct hostmask (I would recommend using *![username]@[host], replacing username with your ident and host with your hostname) and rehash the bot the manual way: Send the bot SIGHUP (signal 1). It should then rehash and then accept your commands. If you aren't the bot's owner, it isn't responding to you because you are running a command you aren't priveleged for. Ask the bot's operator to put you on the access list.

Also, if you're on Windows, make sure that you have properly formatted your access list entries as regexes. See the Windows guide for details.

What are the bot's commands?

For a list of commands, see General Documentation.