LizardBot/Setup

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.

The first thing you need is the bot itself. Go to the Google Code project and check out lizardbot.php and lizardbot.conf.php from SVN.

Next, you'll need a configuration file. Checkout a copy of the default configuration file from SVN (lizardbot.conf.php, if you haven't already, see the download link above) and verify it is named lizardbot.conf.php (if you haven't already) - place it in the same place as lizardbot.php.


Configuration Options

Here is some configuration help.

  • $timezone: String. The timezone the bot is operating in. It is recommended you set this unless your timezone is already set in your PHP configuration file. A list of valid timezones can be found here.
    NOTE: You must restart the bot for changes to this setting to take effect.
  • $nickname: String. The bot's default nickname.
  • $users: Array. This is an array containing the people privleged enough to use the bot. You should be root. *!*@* is everyone.
  • $privgroups: Multidimentional array. This is a multidimentional array containing the various access levels. If you don't know what you should do here, don't touch it.
  • $setFantasy: Boolean. Whether or not the bot's Pandorabot AI should be enabled by default. TRUE enables it. Note that this can be overriden by those with root access by calling @fantasy-on or @fantasy-off. Note that if you set it this way, a rehash of the configuration file will cause the state to fall back to whatever $setFantasy is set to.
  • $setIsOnWindows: Boolean. Set to TRUE if you are running the bot on Windows. FALSE by default. Note: If you want to run the bot on Windows, please read the Windows Manual instead of the standard bot setup and bot operation manuals.
    NOTE: You must restart the bot for changes to this setting to take effect.
  • $setIdent: String. What the bot's username, or IDENT, should be. It is "bot" by default, althouth I recommend setting it to your usual nickname.
    NOTE: You must restart the bot for changes to this setting to take effect.
  • $setGecos: String. What the bot's realname, or gecos, should be. By default, it is the version number of the bot. I recommend adding " operated by x" to the end of it, replacing x with your nickname.
    NOTE: You must restart the bot for changes to this setting to take effect.
  • $setTrigger: String. What the bot's trigger should be. By default, it is @.
  • $setAutoModes: String of characters. Sets the usermodes the bot should set on itself upon connecting to an IRC network. Default null. Do not include the leading + in front of the mode characters. Examples of valid settings here: "B" to set mode +B, "iBw" to set modes +i, +B, and +w, "xiBw" to set modes +x, +i, +B, and +w, etc. NOTE: You can unset modes at startup by preceeding the modes to be unset with a "-". For example, setting $setAutoModes to "B-w" would set mode +B and unset mode +w, "-Bw" would unset both +B and +w, (while setting no other modes) and "Bw-ix" would set modes +B and +w and unset modes +i and +x. Note that modes to be unset must always follow the modes to be set.
  • $setNoBolds: Boolean. If true, the bot will send color codes, but will not send bolds.
  • $setAIDefaultRE: String. The default reply for the AI should the API not return a response.
    NOTE: You must rehash the configuration file then turn fantasy off and on again for changes to this setting to take effect.
  • $setCTCP*: Strings. These CTCP variables control the bot's response to various CTCP commands.
  • $setNSUsername: String. The default username for NickServ, should the bot use a registered nickname.
  • $setEnableExec: Boolean. Whether or not the @exec command should be enabled. True to enable.
  • $setEnableEval: Boolean. Whether or not the @eval command should be enabled. True to enable.
  • $setTrustGoogle: Boolean. If you are extremely paranoid and don't trust the google, set this to false. True by default. (Currently disables only Google Calc)
  • $setUsePCREs: Boolean. Set to true if you want to use PCREs with the access list instead of standard hostmask syntax as used on IRC. Automatically true on Windows. Boolean, default FALSE on POSIX systems, default TRUE on Windows systems (note that you must include the regex delimiters [# is recommended] with the hostmask).
  • $setInsultUsers: Boolean. If true (by default), enables use of the @insult command. See General Documentation for details.
  • $setEnableDelays: Boolean. Default false. When false, the bot is allowed to use system calls to allow the bot to respond instantly to recognized signals on POSIX OS's (1 SIGHUP, 2 SIGINT, and 15 SIGTERM) at the cost of potentially slightly increased CPU usage. When used, developers observed a CPU% spike of 1.3% at idle. It is unknown whether or not this was due to processing of a line sent to IRC or the new system calls. However, if you are concerned about CPU usage, setting this to TRUE may cause less CPU utilization at the cost of the delay in signal response (as experienced before version 6.2.0.0b [r47]). Note that this only has an effect on POSIX systems; Windows users may want to set this to TRUE in any case to potentially minimize CPU usage while maintaining an immediate response to signals (Windows processor signals, whether an interrupt [^C] from the terminal or a TERM signal from Task Manager, are responded to more or less instantly no matter what).
  • $setEnableFishbot: Boolean. Set to TRUE to enable the fishbot module by default. See LizardBot/Fishbot for details.
  • $setEnableAllTriggerHelp: Boolean. When set to TRUE, the bot will enable a "global help command" - i.e., a help command that listens on all common bot triggers, including but not limited to ! and .. Set to TRUE to enable this by default.
  • $setEnableReminders: Boolean. Set this to TRUE to enable the reminders system. MySQL support must be enabled for this to work! TRUE by default (automatically disabled if MySQL support is disabled).
  • $setRemindOnJoin: Boolean. If this is TRUE, the reminders system will send reminders out to their "targets" when they join a channel the bot is in or speak in a channel the bot is in. If this is FALSE, the bot will only deliver reminders if the "target" speaks in a channel the bot is in. Note that enabling this may cause false positive deliveries, such as after netsplits. FALSE by default.
  • $setEnableBitly: Boolean. Set this to TRUE to enable the bit.ly API. Note that this is one of three settings required for the bit.ly API to work, the others being $setBitlyLogin and $setBitlyAPIKey.
  • $setBitlyAPISleep: Integer. The number of seconds after a @bit.ly command that the bot forces one to wait so that you don't exceed your bit.ly API limit. The default is rather high, 30.
  • $setBitlyLogin: String. Required for the bit.ly API to run. This is your username (or API username, if applicable) of your bit.ly account. You need one (which is free, by the way) to use the bit.ly API functions of LizardBot. This is normally your login username. See their website to get an account.
  • $setBitlyAPIKey: String. Required for the bit.ly API to run. This is your API key, which is generated for all users by bit.ly. You need one to use the bit.ly API functions of LizardBot. If you have an account, you can find your API Key here. Otherwise, you'll need to create an account first, then get your API Key. This is not your bit.ly login password.
  • $autoconnect*: Autoconnect functions. See below.

Autoconnect

  • $autoconnect['enabled']: Boolean. Whether or not to process autoconnect block. True to enable autoconnect, false to disable autoconnect. All settings below are only needed if this is set to true
  • $autoconnect['network']: String. What network the bot should connect to. Format: network OR network:port. If no port is provided, defaults to 6667.
  • $autoconnect['nick']: String. What nickname the bot should use. You can specify . as the value for string to use the default you stored in the configuration file (see $nickname above).
  • $autoconnect['identify']: String. Whether or not to identify. 'yes' or 'y' to identify, 'no' or 'n' to prevent identification to services.
  • $autoconnect['id-nick']: String. Nickname to use for identification. Note that this is only usable on Atheme, and cannot be used with other daemons, such as Anope to the point that identification will fail. It is recommended you use this function with Atheme to guarantee your bot correctly identifies. To send the default (if present, see $setNSUsername above), suppy '.'. To send NO primary username, supply '#'. Otherwise, enter the username you would like to use and strike enter. Please note that this is not the same as the bot nickname. This does not need to be set if you disabled autoidentify (above).
  • $autoconnect['id-pass']: String. Password to send for identification. This does not need to be set if you disabled autoidentify (above).
    WARNING: ENTERING YOUR PASSWORD HERE WILL STORE IT IN CLEAR TEXT! IT WILL BE VISIBLE TO THE ENTIRE WORLD UNLESS YOU TAKE STEPS TO PREVENT OTHERS FROM SEEING IT! ON UNIX-BASED MACHINES, USE THE COMMAND chmod 600 lizardbot.conf.php (replace lizardbot.conf.php with the name of your config file as necessary) IN THE TERMINAL TO PREVENT OTHERS FROM READING IT. IF YOU RUN WINDOWS, MAKE SURE A PASSWORD IS SET WITH YOUR USER ACCOUNT AND USE WINDOWS EXPLORER TO MARK THE CONFIGURATION FILE AS 'PRIVATE'. IF YOU DO NOT LIKE STORING YOUR PASSWORD IN A FILE, DO NOT SUPPLY IDENTIFICATION INFO OR DO NOT USE THE AUTOCONNECT FUNCTION!
  • $autoconnect['channels']: String. Comma-delimited list of channels that the bot should join after connecting. For example: #chan1,##chan2,#chan3,#chan4 would be a valid entry, as would #chan1.

MySQL Settings

The configuration file contains a set of variables for configuring how the bot interacts with the MySQL server, if any. See LizardBot/MySQL for more information.

Done?

When you are done configuring the bot, see Operating the Bot.