
/*
 * example.conf by Daniel Hawton AKA Osiris (osiris@unrealircd.org).
 * $Id: example.conf,v 1.1.1.1.6.17 2003/11/24 19:42:12 syzop Exp $
 * 
 * Works for Unreal3.2 and up
 * 
 * Okay guys.  This is the new example.conf. Its look is much like C++, kinda.
 * Anyway it is time to go over this.  It's hard to pick up at first, but
 * with some pratice and reading you'll understand.
 *
 * Just copy this file to your main unrealircd dir and call it 'unrealircd.conf'.
 * 
 * NOTE:  All lines, except the opening { line, end in an ;, including the
 * closing } line. The IRCd will ignore commented lines.
 *
 * PLEASE READ doc/unreal32docs.html! The online version is also available at:
 * www.vulnscan.org/UnrealIrcd/unreal32docs.html
 * It contains a lot information about the configfile: gives information about
 * every block, variable, etc..
 */

/* Type of comments */
#Comment type 1 (Shell type)
// Comment type 2(C++ style)
/* Comment type 3 (C Style) */
#those lines are ignored by the ircd.

/*
 * At *NIX UnrealIrcd supports modules.
 * Loading the commands module is required:
 */
loadmodule "src/modules/commands.so";
loadmodule "src/modules/cloak.so";
loadmodule "src/modules/m_ircops.so";
#loadmodule "src/modules/m_getinfo.so";
loadmodule "src/modules/m_uptime.so";

/*
 * You can also include other configuration files. help.conf contains all the
 * /helpop text so you probably want this include:
 */
include "help.conf";

/*
 * NEW: me {} 
 * OLD: M:Line 
 * me {} defines the name, description and unreal server numeric for
 * this server. Syntax is as follows: 
 * me { 
 *  name "server.name"; 
 *  info "Server Description";
 *  numeric (server numeric*);
 * }; 
 * If linking, this numeric may not be used by any other server on the network.
 */
me
{
	name "rc6.org";
	info "rc6.org IRC server";
	numeric 1;
};

/*
 * NEW: admin {} 
 * OLD: A:Line Admin gives information on the server admin. you
 * may put as many lines under admin { as you wish. 
 * Syntax is as follows:
 * admin {
 *   "first line"; 
 *   "second line"; 
 *   [etc]
 * };
 */
admin {
	"nilicule";
	"Blyant";
	"Foo";
	"furre";
	"Eilhan";
};

/*
 * NEW: class {} 
 * OLD: Y:line (old was confusing) 
 * These define settings for classes. A class is a group setting for 
 * connections. Example, server connections, instead of going to a client's
 * class, you direct it to the server class. Syntax is as follows
 * class (class name)
 * {
 *     pingfreq (how often to ping a user/server in seconds);
 *     maxclients (how many connections for this class);
 *     sendq (maximum send queue from a connection);
 *     recvq (maximum receive queue from a connection [flood control]);
 *  };
 */

class           clients
{
	pingfreq 90;
	maxclients 500;
	sendq 100000;
	recvq 8000;
};

class           servers
{
	pingfreq 90;
	maxclients 10;		/* Max servers we can have linked at a time */
	sendq 1000000;
	connfreq 100; /* How many seconds between each connection attempt */
};

/*
 * NEW: allow {} 
 * OLD: I:Line
 * This defines allowing of connections...
 * Basically for clients, it allows them to connect so you can have some
 * control and/or set a password. 
 * Syntax is as follows: 
 * allow {
 *    ip (ip mask to allow);
 *    hostname (host mask);
 *    class (class to send them to [see class {}]);
 *    password "(password)"; (optional)
 *    maxperip (how many connections per ip); (optional) 
 * };
 */

allow {
	ip             *@*;
	hostname       *@*;
	class           clients;
	maxperip 10;
};

/* Passworded allow line */
allow {
	ip             *@255.255.255.255;
	hostname       *@*.passworded.ugly.people;
	class           clients;
	password "XXXXXX";
	maxperip 1;
};

/*
 * NEW: allow channel {} 
 * OLD: chrestrict 
 * Allows a user to join a channel...
 * like an except from deny channel. 
 * Syntax:
 * allow channel {
 *   channel "channel name";
 * };
 */
allow           channel {
	channel "#WarezSucks";
};

/*
 * NEW: oper {} 
 * OLD: O:Line 
 * Defines an IRC Operator
 * IRC operators are there to keep sanity to the server and usually keep it
 * maintained and connected to the network. 
 * The syntax is as follows: 
 * oper (login) { 
 *     class (class to put them in, if different from I, moves them to new
 *                class); 
 *     from { 
 *        userhost (ident@host);
 *        userhost (ident@host);
 *     }; 
 *     flags
 *     { 
 *       (flags here*);
 *     };
 *     OR
 *     flags "old type flags, like OAaRD";
 * };
 */

/* OLD OPER FLAG  | NEW FLAG NAME
	O		global
	o		local
	a		services-admin
	A		admin
	r		can_rehash
	D		can_die
	R		can_restart
	h		helpop
	w		can_wallops
	g		can_globops
	c		can_localroute
	L		can_globalroute
	k		can_localkill
	K		can_globalkill
	b		can_kline
	Z		can_gzline
	t		can_gkline
	B		can_unkline
	n		can_localnotice
	G		can_globalnotice
	N		netadmin
	C		coadmin
	z		can_zline
	W		get_umodew
	H		get_host
	v		can_override
*/

/*
Note: netadmin gives you OaAN
admin and services-admin give you o as well
*/

oper nilicule {
	class           clients;
	from {
		userhost flow@192.168.0.*;
		userhost flow@10.0.0.*;
		userhost flow@localhost;
	};
	password "XXXXXX";
	flags
	{
		global;
		admin;
		netadmin;
		can_override;
		get_host;
		can_gkline;
		can_gzline;
		can_zline;
		can_restart;
		can_die;
		can_setq;
		can_addline;
		global;
	};
	snomask feqFvGns;
};

oper Cerberus {
	class           clients;
	from {
		userhost bopm@localhost;
	};
	password "XXXXXX";
	flags
	{
		netadmin;
		global;
		can_override;
		get_host;
	};
	snomask feqFvGns;
};

oper blyant {
	class           clients;
	from {
		userhost blyant@192.168.0.*;
		userhost blyant@10.0.0.*;
		userhost blyant@localhost;
		userhost blyant@jolla.uio.no;
		userhost blyant@*.adsl.no;
		userhost blyant@213.184.206.236;
		userhost blyant@217.144.249.240;
		userhost blyant@83.243.151.44;
	};
	password "XXXXXX";
	flags
	{
		global;
		admin;
		netadmin;
		can_override;
		get_host;
		can_gkline;
		can_gzline;
		can_zline;
		can_restart;
		can_die;
		can_setq;
		can_addline;
		global;
	};
	snomask feqFvGns;
};

oper foo {
	class           clients;
	from {
		userhost f00__@*.comcast.net;
	};
	password "XXXXXX";
	flags
	{
		global;
		admin;
		netadmin;
		can_override;
		get_host;
		can_gkline;
		can_gzline;
		can_zline;
		can_restart;
		can_die;
		can_setq;
		can_addline;
		global;
	};
	snomask feqFvGns;
};

oper furre {
	class           clients;
	from {
		userhost NNSCRIPT@*.cust.bredbandsbolaget.se;
	};
	password "XXXXXX";
	flags
	{
                global;
                admin;
                netadmin;
                can_override;
                get_host;
                can_gkline;
                can_gzline;
                can_zline;
                can_restart;
                can_die;
                can_setq;
                can_addline;
                global;
	};
	snomask feqFvGns;
};

oper Eilhan {
	class           clients;
	from {
		userhost *@*.nextgentel.com;
	};
	password "XXXXXX";
	flags
	{
		global;
	};
	snomask feqFvGns;
};

/*
 * NEW: listen {}
 * OLD: P:Line
 * This defines a port for the ircd to bind to, to
 * allow users/servers to connect to the server. 
 * Syntax is as follows:
 * listen (ip number):(port number) 
 * { 
 *   options {
 *     (options here);
 *   };
 * };
 * or for a plain
 * listen: listen (ip):(port);
 * 
 * NOTICE: for ipv6 ips (3ffe:b80:2:51d::2 etc), use listen [ip]:port;
 * 
 * That works also.
 */

/* Options for listen:
	OLD	| 	NEW
	S		serversonly
	C		clientsonly
	J		java
	s		ssl
	*		standard
*/


listen         *:6601
{
	options
	{
		ssl;
		clientsonly;
	};
};

listen         *:7999
{
	options
	{
		ssl;
		serversonly;
	};
};

#listen         *:8067;
listen         *:6667;
listen         *:7000;

/*
 * NEW: link {}
 * OLD: C/N:Lines
 * This defines an okay for a server connection.
 * NOTE: BOTH SERVERS NEED A LINK {} SETTING TO CONNECT PROPERLY!
 * Syntax is as follows:
 * link (server name)
 * {
 *	username	(username, * works too);
 * 	hostname	(ip number/hostmask);
 *	bind-ip		(What IP to bind to when connecting, or *);
 *	port		(port to connect to, if any);
 *	hub (If this is a hub, * works, or servermasks it may bring in);
 *	[or leaf *;]
 *	password-connect "(pass to send)";
 *	password-receive "(pass we should receive)";
 *	class		(class to direct servers into);
 *	options {
 *		(options here*);
 *	};
 *      /* If we use SSL, we can choose what cipher to use in SSL mode
 *       * Retrieve a list by "openssl ciphers", seperate ciphers with :'s
 *      */
 *      ciphers "DES-CBC3-MD5";
 * 
 * };
*/

/*
	options:
	OLD	|	NEW
	S		ssl
	Z		zip
	N/A		autoconnect
	N/A		quarantine
	N/A		nodnscache
*/


link            noob.rc6.org
{
	username	*;
	hostname 	127.0.0.1;
	bind-ip 	*;
	port 		7029;
	hub             *;
	password-connect "XXXXXX";
	password-receive "XXXXXX";
	class           servers;
		options {
			#autoconnect;
		};
};

link            waste.rc6.org
{
	username	*;
	hostname 	127.0.0.1;
	bind-ip 	*;
	port 		7029;
	hub             *;
	password-connect "XXXXXX";
	password-receive "XXXXXX";
	class           servers;
		options {
			#autoconnect;
		};
};

link            alyson.blyant.org
{
	username	*;
	hostname 	alyson.blyant.org;
	bind-ip 	*;
	port 		7999;
	hub             *;
	password-connect "XXXXXX";
	password-receive "XXXXXX";
	class           servers;
	options {
		#autoconnect;
		nohostcheck;
		nodnscache;
		ssl;
	};
};

link		tehfoo.homelinux.org
{
	username	*;
	hostname	tehfoo.homelinux.org;
	bind-ip		*;
	port		7999;
	hub		*;
	password-connect "XXXXXX";
	password-receive "XXXXXX";
	class		servers;
	options {
		#autoconnect;
		nohostcheck;
		nodnscache;
		ssl;
	};
};

# DENY LINK for blyant
#
# deny link { 
#	mask "tehfoo.homelinux.org";
#	rule "connected(rc6.org)"; 
#	type auto; 
# };

# DENY LINK for foo
# 
# deny link {
#       mask "alyson.blyant.org";
#       rule "connected(rc6.org)";
#       type auto;
# };

/*
 *
 * NEW: ulines {}
 * OLD: U:Line
 * U-lines give servers more power/commands, this should ONLY be set
 * for services/stats servers and NEVER for normal UnrealIRCd servers!
 * Syntax is as follows:
 * ulines {
 *	(server to uline);
 *	(server to uline);
 *  [etc]
 * };
*/
ulines {
	noob.rc6.org;
	waste.rc6.org;
};

/*
 * NEW: drpass {}
 * OLD: X:Line
 * This defines the passwords for /die and /restart.
 * Syntax is as follows:
 * drpass { 
 *  restart		"(password for restarting)";
 *  die		        "(password for die)";
 * };
 */
drpass {
	restart "XXXXXX";
	die "XXXXXX";
};

/*
 * NEW: log {} OLD: N/A Tells the ircd where and what to log(s). You can have
 * as many as you wish.
 * 
 * FLAGS: errors, kills, tkl, connects, server-connects, kline, oper
 * 
 * NOTICE: Right now, SEGV messages are *always* sent to ircd.log. codemastr is
 * working on a way to redirect the messages to this log file. *
 * Syntax: 
 * log "log file" 
 * {
 *    flags
 *    {
 *        flag;
 *        flag; 
 *        etc.. 
 *    }; 
 * };
 */

log "ircd.log" {
	/* Delete the log file and start a new one when it reaches 2MB, leave this out to always use the 
	   same log */
	maxsize 2097152;
	flags {
		oper;
		kline;
		connects;
		server-connects;
		kills;
		errors;
	};
};

/*
 * NEW: alias {}
 * OLD: N/A
 * This allows you to set command aliases such as /nickserv, /chanserv etc
 * FLAGS: services, stats, normal
 *
 * Syntax:
 * alias "name" {
 *	nick "points to";
 *	type aliastype;
 * };
 *
 * [NOTE: You could also include a pre-defined alias file here, see doc/unreal32docs.html section 2.9]
 */

// This points the command /nickserv to the user NickServ who is connected to the set::services-server server
/*alias NickServ {
	nick "NickServ";
	type services;
};*/

// If you want the command to point to the same nick as the command, you can leave the nick entry out
//alias ChanServ { type services; };

// Points the /statserv command to the user StatServ on the set::stats-name server
//alias StatServ { type stats; };

// Points the /superbot command to the user SuperBot
//alias SuperBot { type normal; };


/* Standard aliases */
alias NickServ { type services; };
alias HAL-9000 { type services; };
alias God { type services; };
alias HelpServ { type services; };
alias StatMaker { type stats; };

/*
 * NEW: alias {}
 * OLD: N/A
 * This allows you to set command aliases such as /identify, /services, etc
 *
 * Syntax:
 * alias "name" {
 *	format "format string" {
 *		nick "points to";
 *              type aliastype;
 *		parameters "parameters to send";
 *	};
 *	type command;
 * };
 */
/* This is shown seperately because even though it has teh same name as the previous directive, it is very
 * different in syntax, although it provides a similar function and relys on the standard aliases to work.
 */
/*
alias "identify" {
	format "^#" {
		nick "chanserv";
		type services;
		parameters "IDENTIFY %1-";
	};
	format "^[^#]" {
		nick "nickserv";
		type services;
		parameters "IDENTIFY %1-";
	};
	type command;
};
*/
/* The alias::format directive is a regular expression. The first format matches the /identify command when
 * the first character is a #. It then passes this along to the chanserv alias with the parameters IDENTIFY
 * %1-. The second format matches then /identify command when the first character is not a #. It then
 * passes the command to the nickserv alias with parameters IDENTIFY %1-.
 */

/* The alias::format::parameters is similar to scripting languages. %N (where N is a number) represents a
 * parameter sent to the command (in this case /identify). If you specify %N- it means all parameters from
 * N until the last parameter in the string.
*/

/* Standard aliases */
alias "services" {
	format "^#" {
		nick "chanserv";
		type services;
		parameters "%1-";
	};
	format "^[^#]" {
		nick "nickserv";
		type services;
		parameters "%1-";
	};
	type command;
};

alias "identify" {
	format "^#" {
		nick "chanserv";
		type services;
		parameters "IDENTIFY %1-";
	};
	format "^[^#]" {
		nick "nickserv";
		type services;
		parameters "IDENTIFY %1-";
	};
	type command;
};


/*
 * NEW: tld {}
 * OLD: T:Line
 * This sets a different motd and rules files
 * depending on the clients hostmask.
 * Syntax is as follows: 
 * tld {
 *    mask (ident@host);
 *    motd "(motd file)";
 *    rules "(rules file)";
 * };
 */
/*
tld {
	mask *;
	motd "ircd.motd";
	rules "ircd.rules";
};
*/
/*
 * NEW: ban nick {}
 * OLD: Q:Line
 * Bans a nickname, so it can't be used.
 * Syntax is as follows:
 * ban nick {
 *	mask "(nick to ban)";
 *	reason "(reason)";
 * };
*/
ban nick {
	mask "*C*h*a*n*S*e*r*v*";
	reason "Reserved for Services";
};
/*
 * NEW: ban ip {}
 * OLD: Z:Line
 * Bans an ip from connecting to the network.
 * Syntax:
 * ban ip { mask (ip number/hostmask); reason "(reason)"; };
*/
ban ip {
	mask 195.86.232.81;
	reason "Delinked server";
};
/*
 * NEW: ban server {}
 * OLD: Server Q:Line
 * Disables a server from connecting to the network.
 * if the server links to a remote server, local server
 * will disconnect from the network.
 * Syntax is as follows:
 * ban server {
 *	mask "(server name)";
 *	reason "(reason to give)";
 * };
*/

ban server {
	mask eris.berkeley.edu;
	reason "Get out of here.";
};
/*
 * NEW: ban user {}
 * OLD: K:Line
 * This makes it so a user from a certain mask can't connect
 * to your server.
 * Syntax:
 * ban user { mask (hostmask/ip number); reason "(reason)"; };
*/

ban user {
	mask *tirc@*.saturn.bbn.com;
        reason "Idiot";
};

/*
 * NEW: ban realname {}
 * OLD: n:Line
 * This bans a certain realname from being used.
 * Syntax:
 * ban realname {
 *	mask "(real name)";
 * 	reason "(reason)";
 * };
*/

ban realname {
	mask "Swat Team";
	reason "mIRKFORCE";
};

ban realname {
	mask "sub7server";
	reason "sub7";
};

/*
 * NOTE FOR ALL BANS, they may be repeated for addition entries!
 * 
 * NEW: except ban {} 
 * OLD: E:Line
 * This makes it so you can't get banned. 
 * Syntax:
 * except ban { mask (ident@host); };
 * Repeat the except ban {} as many times
 * as you want for different hosts.
 */

except ban {
	/* don't ban stskeeps */
	mask           *stskeeps@212.*;
};

/*
 * NEW: deny dcc {} 
 * OLD: dccdeny.conf
 * Use this to block dcc send's... stops
 * viruses better. 
 * Syntax: 
 * deny dcc 
 * { 
 *   filename "file to block (ie, *exe)";
 *   reason "reason";
 * };
 */
deny dcc {
	filename "*sub7*";
	reason "Possible Sub7 Virus";
};

/*
 * NEW: deny channel {}
 * OLD: N/A (NEW)
 * This blocks channels from being joined.
 * Syntax:
 * deny channel {
 * 	channel "(channel)";
 * 	reason "reason";
 * };
*/
deny channel {
	channel "*warez*";
	reason "Warez is illegal";
};

/*
 * NEW: vhost {}
 * OLD: Vhost.conf file
 * This sets a fake ip for non-opers, or
 * opers too lazy to /sethost :P
 * Syntax:  
 *   vhost { 
 *       vhost (vhost.com); 
 *       from {
 *            userhost (ident@host to allow to use it);
 *       };
 *       login (login name);
 *       password (password);
 *   };
 *        then to use this vhost, do /vhost (login) (password) in IRC
 */
vhost {
	vhost           no.tux.no.glory.com;
	from {
		userhost       *@pat.opera.com;
	};
	login           opera;
	password        XXXXXX;
};

/* You can include other configuration files */
/* include "klines.conf"; */

/* Network configuration */
set {
	network-name 		"rc6.org";
	default-server 		"irc.rc6.org";
	services-server 	"noob.rc6.org";
	stats-server 		"waste.rc6.org";
	help-channel 		"#rc6";
	hiddenhost-prefix	"nubi";
	timesynch {
		enabled		"yes";
		server		"time.xs4all.nl";
	};
	/* prefix-quit 		"no"; */
	/* Your cloak keys should be 3 random numbers between 10000 and 2147483646
	 * and should be the same at all servers on the network.
	 * They are used for generating masked hosts and should be kept secret.
	 */
	cloak-keys {
		XXXXXXXXXXXXXXXXX;
		XXXXXXXXXXXXXXXXX;
		XXXXXXXXXXXXXXXXX;
	};
	/* on-oper host */
	hosts {
		host-on-oper-up "yes";
		local		"locop.rc6.org";
		global		"ircop.rc6.org";
		coadmin		"coadmin.rc6.org";
		admin		"admin.rc6.org";
		servicesadmin 	"csops.rc6.org";
		netadmin 	"netadmin.rc6.org";
	};
	allowed-nickchars { latin1; hebrew; };
};

/* Server specific configuration */

official-channels {
	"#rc6" { topic "Welcome to #rc6"; };
	"#oper" { topic "Official network oper channel"; };
};

set {
	kline-address "admin@rc6.org";
	gline-address "admin@rc6.org";
	modes-on-connect "+xw";
	modes-on-oper	 "+xwgs";
	oper-auto-join "#oper";
	dns {
		nameserver 127.0.0.1;
		timeout 2s;
		retries 2;
	};
	options {
		hide-ulines;
		/* You can enable ident checking here if you want */
		/* identd-check; */
		show-connect-info;
	};

	maxchannelsperuser 10;
	/* The minimum time a user must be connected before being allowed to use a QUIT message,
	 * This will hopefully help stop spam */
	anti-spam-quit-message-time 10s;
	/* Make the message in static-quit show in all quits - meaning no
           custom quits are allowed on local server */
	/* static-quit "Client quit";	*/
	/* This allows you to make certain stats oper only, use * for all stats,
	 * leave it out to allow users to see all stats. Type '/stats' for a full list.
	 * Some admins might want to remove the 'kGs' to allow normal users to list
	 * klines, glines and shuns.
	 */
	oper-only-stats "okGsMRUEelLCXzdD";

	/* Throttling: this example sets a limit of 3 connections per 60s (per host). */
	throttle {
		connections 5;
		period 60s;
	};


	/* Anti flood protection */
	anti-flood {
		nick-flood 3:60;	/* 3 nickchanges per 60 seconds (the default) */
	};

};

except throttle {
	mask 192.168.1.*;
};

set
{
        /*
         * Specifies the path where your network staff file is
         * located. This is usually a relative path starting from
         * your main Unreal3.2 directory, or it may also be
         * an absolute path. If remote includes are enabled, you can
         * also specify an URL here to download the file remotely
         * before loading. The default value is "network.staff".
         * Examples:
         *
         *     staff-file "network.staff";
         *     staff-file "/home/dir/Unreal3.2/network.staff";
         *     staff-file "http://www.yourserver.com/network.staff";
         */
#        staff-file "ircd.staff";
};


/*
 * Problems or need more help?
 * 1) www.vulnscan.org/UnrealIrcd/unreal32docs.html
 * 2) www.vulnscan.org/UnrealIrcd/faq/ <- contains 80% of your questions!
 * 3) If you still have problems you can go irc.ircsystems.net #unreal-support,
 *    note that we require you to READ THE DOCUMENTATION and FAQ first!
 */
