Nanobot manual
Revision as of 13:56, 25 February 2011 by imported>Wikiadmin
User manual
Starting the bot
- Environment
- All you need for this bot to run is a Perl environment.
- You you don't already have Perl installed, please do that first.
- If you have modules you want to load, make a directory named "modules" in the same folder where your nanobot.pl resides, and place your module files in there.
- Configuration
- To configure your bots settings like the server and nickname, open nanobot.pl in a text editor.
- Just a few lines into the file, you will find this block of text:
$version = "Nanobot 3.0"; $server = 'irc.insomnia247.nl'; $port = 6667; $sslport = 6669; $botnick = 'nanobot'; $botuser = 'nanobot'; $nsp = ''; @channels = ("#bots", "#yourchannel"); @opers = ("insomnia247.nl", "rootedker.nl", "fbi.gov", "eye.spy"); $modchan = '#yourchannel'; $datadir = 'botdata'; $moddir = 'modules'; @autoload = (); $wisecrack_seen_botnick = "I'm right here. I mean ... really, how did you miss that one?"; $wisecrack_seen_self = "I can see you! You're right there! That's right, I can see."; $wait_for_ping = 0; $connect_timeout = 120; $ping_timeout = 300;
- We will now go over each of these values and what they do
- version: This is the version number of the bot, normally you will not have to change this.
- server: This holds the value of the server you want your bot to connect to, enclosed in single quotes ( ' ).
- port: The port number of the IRC server you want to connect to. (Usually 6667.)
- sslport: The port number the IRC server uses for SSL connections. (Can be ignored if you don't use SSL.)
- botnick: The bots nickname. This is how the bot will show up in channels etc.
- botuser: Username for the bot. In IRC terms, it is "nickname!username@hostname".
- nsp: NickServ password for your bot's nickname. Can be left blank if the bot's nick is not registered, or if you do not want it to identify with NickServ.
- channels: List of channels the bot will join when it connects to the server. @channels = ("#frist", "#second", "#third");
- opers: Hostnames or hostmasks for bot admins. Note that they must appear as the bot sees them. @opers = ("my.ip.here", "and.some.vhost.com");
- Only the hostname should be added. (So if you are someguy!bob@SOMEHASH-my.isp.com you should add "SOMEHASH-my.isp.com".)
- modchan: This is the bots main channel, auto voice, auto oper and auto kick will be preformed here.
- datadir: Directory where the bot stores data for it's modchan. (Will be created if it doesn't exist.)
- moddir: Directory where the bot will look for modules. (Will be created if it doesn't exist.)
- autoload: List of modules that should be loaded automatically when the bot starts up. (Module name only.) @autoload = ("mymodule", "kickban", "anothermodule");
- wisecrack_seen_botnick: Line the bot will say when the !seen command is given for the bots own nickname.
- wisecrack_seen_self: Line the bot will say when the !seen command is given for the users own nickname.
- wait_for_ping: Used to tell the bot if it needs to wait for a PING request before joining channels. (0 = No, 1 = Yes)
- If your bot seems to connect, but isn't joining channels, this might well be your problem.
- connect_timeout: Time in seconds before giving up trying to connect to the IRC server.
- ping_timeout: Time in seconds the bot will wait before assuming a network timeout and tries to reconnect.
- Command
- To start the bot, simply go into the directory where the nanobot.pl file is located and type:
perl nanobot.pl