Howto Install And Run Noxbot
From NoxBot the modular PHP IRC bot
Contents |
Installation
Windows, Linux, Mac OSX, Others
We assume here that you already have installed PHP 5 and can run command line php.
Just extract one of the archives available on the Downloads page.
copy the config.example.php to config.php and edit its contents.
It is important that you alter the ADMIN_USER configuration option to be your nickname. If you don't do this you may never be able to login to your bot. The rest of the options can be left alone or altered if you wish.
start the bot using for example:
php -c php.ini noxbot.php
Configuration
Initial setup
All setup and configuration is done through irc by talking directly to the bot.
The bot (by default) attempts to connect to irc.freenode.net on port 6667. If successful it will join the channel #noxbot. So make sure you are already there. The bot will come online with a nick looking something like noxbot_1234 where the numbers can be different. You can configure the bot in that channel.
NoxBot requires that you are logged in and have the right privileges to perform certain operations. If its the first run of the bot it will generate a file called adminpw.txt where you installed NoxBot and it will tell the admin password in the console. This file will contain a 8 character password that can be used to login with the default admin account.
The procedure will look something like the following example. In this example we asume the password in the adminpw.txt file is "12345678" (This is all on irc).
The bot joins and we query it since most of the commands we will be using need to be said in private:
16:32 -!- noxbot_6541 [i=mark@g240104.upc-g.chello.nl] has joined #noxbot /query noxbot_6541
Now that we are private with it we should make our own account first:
16:37 <CyaNox> login 12345678 16:37 -noxbot_6541(i=mark@g240104.upc-g.chello.nl)- You are loggedin.
and now you are the admin of the bot. The admin can perform everything the bot offers.
So no that you have all rights ... we can start changing its settings. We will start by changing some of its trivial things:
16:45 <CyaNox> nick noxbot-testing 16:45 -noxbot_6541(i=mark@g240104.upc-g.chello.nl)- Attempting to change nick to noxbot-testing. 16:45 -!- Irssi: noxbot_6541 is now known as noxbot-testing 16:46 <CyaNox> load ChannelCommands 16:46 -noxbot-testing(i=mark@g240104.upc-g.chello.nl)- Plugin loaded: ChannelCommands. 16:46 <CyaNox> save 16:46 -noxbot-testing(i=mark@g240104.upc-g.chello.nl)- Yes master.
What we dit here is change the bots nickname and load the plugin ChannelCommands. And after that we made sure the settings where saved.
Changing IRC network
This section asumes the same things as in the previous section.
Changing the network is relativly simple .. once you know how ... :p
17:14 <CyaNox> settings set servers.1.host irc.barafranca.com 17:14 -noxbot-testing(i=mark@g240104.upc-g.chello.nl)- Yes master. 17:14 <CyaNox> save 17:14 -noxbot-testing(i=mark@g240104.upc-g.chello.nl)- Yes master. 17:14 <CyaNox> quit Changing IRC server. 17:14 -noxbot-testing(i=mark@g240104.upc-g.chello.nl)- Yes master. 17:14 -!- noxbot-testing [i=mark@g240104.upc-g.chello.nl] has quit ["Changing IRC server."]
As you can see it is simple ... but remember this asumes the bot has no multiple networks to connect to and asumes that you want to change the primary server.
Now lets see it connect to irc.barafranca.com in the channel #noxbot instead of the same channel on irc.freenode.net:
17:17 -!- noxbot-testing [mark@g240104.upc-g.chello.nl] has joined #noxbot
It worked !!! ... but ... well of course it worked. Note that you most likely need to login again to your bot and that your nickname must be the same as on the previous IRC server.
Adding another IRC network
Adding another network is also simple. But yet again if you know how ... :p
Let me show you (We are doing this in private message with the bot):
18:24 <CyaNox> addserver irc.freenode.net noxbot-test #noxbot @ 18:24 -noxbot-testing(mark@g240104.upc-g.chello.nl)- Server "irc.freenode.net" added as "2".
You can look at the command addserver to see what the arguments mean.
Now that we added it ... it also tells us what number that server got. In this case its number 2. Now ... the bot is still not online there. So we say it to do:
18:24 <CyaNox> connect 2 18:24 -noxbot-testing(mark@g240104.upc-g.chello.nl)- Connecting to server "irc.freenode.net" with number "2".
And voila ... it works.
Changing the Command Character
The command character is the character to which NoxBot reacts in channels. By default (and with most bots) this is the ! (Exclamation mark). NoxBot allows this to be changed on a per server basis. Lemme show you:
18:35 <CyaNox> settings get servers.1.commandchar 18:35 -noxbot-testing(mark@g240104.upc-g.chello.nl)- servers.1.commandchar=! 18:36 <CyaNox> settings set servers.1.commandchar @ 18:36 -noxbot-testing(mark@g240104.upc-g.chello.nl)- Yes master. 18:36 <CyaNox> settings get servers.1.commandchar 18:36 -noxbot-testing(mark@g240104.upc-g.chello.nl)- servers.1.commandchar=@
Now that was easy wasn't it ...
That is for our primary server. We can also change the other commandchars by substituting the 1 with a 2 for the second server.

