LizardBot/Windows

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.

Setting up the bot

Read the standard Setup Manual, but when setting up the bot, take into account these considerations:

  1. It is recommended that you download a tagged release as a ZIP file rather than trying to clone from Git, which can be very hard on Windows (mostly because installing Git on Windows can be a lot of trouble).
  2. It is recommended that you save lizardbot.php and lizardbot.conf.php (or whatever your config file is) in the same folder as php.exe (the PHP installation)
  3. When setting up the access lists, remember that you must use Perl Compatible Regular Expressions on Windows. Here is a simple guide to rewriting hostmasks into PCRE format:
    • You must use single quotes to surround the string containing the hostmask
    • After the first single quote (') and before the last, you must enter a # (this serves the purpose as a delimiter - those of you familiar with regexes should know what this is and can replace it with the appropriate character of their choice)
    • All . in the hostmask must become \.
    • Use .* in the PCRE hostmask instead of the standard *
    • Use .{1} in the PCRE hostmask instead of the standard ?
    • You can use .? to match 0 or 1 characters
    • You can use .+ to match 1 or more characters
    • To make the PCRE hostmask case-insensitive, add an i after the last # and before the last '
    • For example, the standard IRC syntax hostmask *!?=username@1-2-3-4.hostname.domain would become #.*!.{1}=username@1-2-3-4\.hostname\.domain# (all of that within 'single quotes' as with standard hostmasks when entered into the access list) or #.*!.{1}=username@1-2-3-4\.hostname\.domain#i if you don't care about whether or not the hostmask is upper case or lower case (case-insensitive)
    • You must rewrite the entry *!*@* as #.*!.*@.*# or there will be no default access level.

Operating and Starting the Bot

As mentioned above, you should save the bot to the same directory that PHP installed. Firstly, to start the bot:

  1. Open a Run prompt, or open the start menu and select the search box (on Vista), and type CMD. Strike <Enter>.
  2. In the command prompt, type the command cd "C:\Path\To\Your\PHP\Installation", so, for example, if you installed PHP to C:\Program Files\PHP, you should get something similar to this (the readout may vary depending on what version of Windows you have)
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\FastLizard4> cd "C:\Program Files\PHP"
C:\Program Files\PHP>
  1. Next, type the command php lizardbot.php "optional-configuration-file-name", where optional-configuration-file-name is the name of the configuration file you plan to use, if not the default lizardbot.conf.php. If you are using lizardbot.conf.php, you do not need to specify it. For example, if you wish to use lizardbot.conf.php, you should type this command:
C:\Program Files\PHP> php lizardbot.php

Or, if you plan to use a different configuration file in the same directory, such as testconf.conf.php, enter a command like this:

C:\Program Files\PHP> php lizardbot.php "testconf.conf.php"

You can now set up the bot's connection per the normal directions here.