zaterdag 5 juni 2010

Part 2 of setting up an UnReal + Anope IRC server

Anope is a bit harder, start the UnReal server, and connect to your server.

Copy the services.conf to the Data directory of Anope. Open it with notepad or something.

IRCDModule "unreal32" //the server you're using, unreal32 in this case.
The next line, the remote server. Use the password you specified in the UnReal config.

RemoteServer 127.0.0.1 7001 "PassWord"
#RemoteServer2 localhost 7001 "PassWord" //remove the # if you wanna use //localhost.
#RemoteServer3 localhost 6667 "mypass"
The line
LocalAddress *
Isn't important.

ServerName "127.0.0.1"
I've nothing to say about this, except that you can change the IP with the IP the server is on.

ServerDesc "Services for IRC Networks"
ServiceUser "service@192.168.2.15"
The ServiceUser defines the host of the service, here I decided to call them 'service@myserversip'.
NetworkName "*"
Have to be the same as you specified in your UnReal configuration.

UserKey1 1234567
UserKey2 1234567
UserKey3 1234567

Put in 3 random numbers here. This is to encrypt data! Don't share them with anyone.

If you've any questions, you can ask them. You can test if it works by sending a message to nickserv.

Setting up an UnReal + Anope IRC server

When I setted up an UnReal & Anope IRC server the first time, it took me a lot of time. Ill place a tutorial here, hopefully I help someone with it. First of all you need to download UnReal IRCD & Anope. After you downloaded them, install them both. Don't start one of them.

First we will configure the UnReal server. You'll need to know the IP address of your pc. You can find this out by typing "ipconfig" in the command line, start -> run/search -> cmd -> ipconfig.
We need the IPV4 not the IPV6. In this tutorial Ill use the IP '192.168.2.15'.

Copy the 'example.conf' to the UnReal directory and call it 'unrealircd.conf'. Open it with notepad or something.

Remove the quotes from (we're installing for Windows):
loadmodule "modules/commands.dll";
loadmodule "modules/cloak.dll";
I enabled the extra includes also:

include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
The 'me' line I did this:

me
{
name "192.168.2.15";
info "IRC Server";
numeric 1;
};
Short explanation:
Name -> I used the IP of the server, so it's always unique.
Info -> IRC server, could be everything.
Nummeric -> should be '1' except if you want it to link it with an existing server.

The next lines, will be the admin-lines (A-line).

admin {
"Remco";
"example@example.net";
};
Here you can fill in some information about yourself, for example your nickname and e-mail address. You can add as many lines as you want, but beware, it have to match your actual account!

The next lines, class{} (Y-line).

class clients //for the clients
{
pingfreq 90; //seconds between pings
maxclients 500; //max number of clients
sendq 100000; //how much messages can we sent before time-out
recvq 8000; //flood control
};

class servers //class for the servers (necessary)
{
pingfreq 90; //ping in seconds
maxclients 10; //max amount of linked servers
sendq 1000000; //how much messages
connfreq 100; // amount of seconds between a try to connect to the //other server
}
I placed the comments after the lines to make it more clear.

The oper lines are next, well known as O:line.

oper Name {
class clients;
from {
userhost *@*;
};
password "PasswordHere";
flags
{
netadmin;
can_zline;
can_gzline;
can_gkline;
global;
};
};

Remember the password and the name specified. You'll need them later.

Now you'll need to specify the port and IP you want to listen on.
The ports:

listen 6667
{
options
{
clientsonly;
};
};

listen 7001
{ options
{
serversonly; //keep this! We'll need it for Anope!
};
};

Well, do I've to explain anything about this? I don't think I've to, you can always ask in the comments!

The next line is for the IP,

listen 192.168.2.15; // here your IP
Then we continue to the link lines, also known as C/N lines.

link 127.0.0.1
{
username *;
hostname 127.0.0.1;
bind-ip 127.0.0.1;
port 7001;
hub irc.test.net;
leaf *;
password-connect "Password";
password-receive "Password";
class servers;
options {
};

};


ulines {
hub.test.net;
};

This is so the service (Anope) can connnect. The next and last part I'll write about is the Set{} part. (Network configuration)

set {
network-name "";
default-server "";
services-server "";
stats-server "";
help-channel "";
hiddenhost-prefix "";
/* prefix-quit "no"; */
cloak-keys {
"Random numbers and letters, min 5 chars";
"Random numbers and letters, min 5 chars";
"Random numbers and letters, min 5 chars";
};
I'll post a part 2 later about Anope. :)

IRC bot

I was thinking awhile ago, to start my IRC server again. I decided I don't want it to be flooded. So I thought there had to be a moderator or admin 24/7, but no one will be on 24/7. I decided to make an IRC bot. I want to make the bot public, so Ill upload it here also.

The bot is free to use, it doesn't contain any ad, adware, trojan or virus. It includes options to code functions by yourself inside a DLL. It's written in C# for the ones who's intrested in that. Note, you aren't allowed to sell the it on any way or abuse it for illegal stuff. I'm not responsible for any actions taken with it.

Here you can read the result of a scan with VirusTotal.com.

Download link RapidShare
MD5: B256765FF23C6F4EDBBE2D5F3744CD07.

Download link MegaUpload

If you get an error, please delete the config file ^^ thanks.

Known bugs:
  1. Can't reconnect after disconnecting. Need to restart the application.
  2. Can't start with windows.
  3. Can't log-in automatically.
  4. Need NickServ to be enabled.