/* Copyright (C) 2005 by MusIRCd Development.
 * $Id: example.conf,v 1.87 2005/07/15 03:34:06 musirc Exp $
 * IMPORTANT NOTES:
 * auth blocks MUST be specified in order of precedence. The first one
 * that matches a user will be used. So place spoofs first, then specials,
 * then general access, then restricted.
 * Shell style (#), C style (*/
                             /* */
			     /*), and C++ style (//) comments are supported.
 * Files may be included by either:
 *        .include "filename"
 *        .include <filename>
 * Times/durations are written as:
 *        12 hours 30 minutes 1 second
 * Valid units of time:
 *        month, week, day, hour, minute, second
 * Valid units of size:
 *        megabyte/mbyte/mb, kilobyte/kbyte/kb, byte
 * Sizes and times may be singular or plural. 
 */ 

 /* serverinfo {}:  Contains information about the server. */
serverinfo {
	/* name: the name of our server */
	name = "irc.MusIRCd.com";

	/* description: the description of our server. */
	description = "MusIRCd test server";

	/* network info: the name and description of the network this server
	 * is on. Shown in the 005 reply and used with serverhiding.
	 */
	network_name = "MusIRC";

	/* hub: allow this server to act as a hub and have multiple servers
	 * connected to it.
	 */
	hub = no;

	/* vhost: the IP to bind to when we connect outward to ipv4 servers.
	 * This should be an ipv4 IP only.
	 */
	#vhost = "192.169.0.1";

	/* vhost6: the IP to bind to when we connect outward to ipv6 servers.
	 * This should be an ipv6 IP only.
	 */
	#vhost6 = "3ffe:80e8:546::2";

	/* max clients: the maximum number of clients allowed to connect */
	max_clients = 999999;
};

/* admin {}: contains admin information about the server. */
admin {
	name = "Admin";
	description = "Server Administrator";
	email = "<admin@email.com>";
};

/* logging {}: contains information about logfiles. */
logging {
	/* Do you want to enable logging to ircd.log? */
	use_logging = yes;

        /* logfiles: the logfiles to use for user connects, /oper uses,
         * and failed /oper. These files must exist for logging to be used.
         */
        fuserlog = "logs/userlog";
        foperlog = "logs/operlog";
        ffailed_operlog = "logs/foperlog";

	/* log level: the amount of detail to log in ircd.log. The
	 * higher, the more information is logged. May be changed
	 * once the server is running via /quote SET LOG. Either:
	 * CRIT, ERROR, WARN, NOTICE, TRACE, or INFO
	 */
	log_level = INFO;
};

/* class {}: contain information about classes for users */
class {
	/* name: the name of the class. classes are text now */
	name = "users";

	/* ping time: how often a client must reply to a PING from the
	 * server before they are dropped.
	 */
	ping_time = 2 minutes;

	/* how many local users are allowed to connect from one IP */
	number_per_ip = 2;

	/* how many local users are allowed to connect from one ident@host */
	max_local = 2;

	/* network-wide limit of users per ident@host */
	max_global = 10;
 
	/* max number: the maximum number of users allowed in this class */
	max_number = 999999;

	/* sendq: the amount of data allowed in a clients queue before
	 * they are dropped.
	 */
	sendq = 100 kbytes;
};

class {
	name = "restricted";
	ping_time = 1 minute 30 seconds;
	number_per_ip = 1;
	max_number = 100;
	sendq = 60 kb;
};

class {
	name = "opers";
	ping_time = 5 minutes;
	number_per_ip = 10;
	max_number = 100;
	sendq = 100 kbytes;
};

class {
	name = "server";
	ping_time = 5 minutes;

	/* connectfreq: only used in server classes. specifies the delay
	 * between autoconnecting to servers.
	 */
	connectfreq = 5 minutes;

	/* max number: the amount of servers to autoconnect to */
	max_number = 1;

	/* sendq: servers need a higher sendq as they send more data */
	sendq = 2 megabytes;
};

/* listen {}: contain information about the ports ircd listens on */
listen {
	/* port: the specific port to listen on. if no host is specified
	 * before, it will listen on all available IPs.
	 *
	 * ports are seperated via a comma, a range may be specified using ".."
	 */
	
	/* port: listen on all available IPs, ports 6665 to 6669 */
	port = 6665 .. 6669;

	/* host: set a specific IP/host the ports after the line will listen 
	 * on. This may be ipv4 or ipv6.
	 */
	host = "1.2.3.4";
	port = 7000, 7001;

	host = "3ffe:1234:a:b:c::d";
        port = 7002;
};

/* auth {}: allow users to connect to the ircd */
auth {
	/* user: the user@host allowed to connect. Multiple IPv4/IPv6 user 
	 * lines are permitted per auth block.
	 */
	user = "*@172.16.0.0/12";
	user = "*test@123D:B567:*";

	/* password: an optional password that is required to use this block */
	password = "letmein";
	
        /* need password: don't allow users who haven't supplied the correct
	 * password to connect using another auth block
	 * ('W' prefix on /stats I if disabled)
         */
        need_password = yes;

	/* spoof: fake the users host to be be this. This is free-form,
	 * just do everyone a favor and don't abuse it. ('S' prefix on /stats I)
	 */
        spoof = "spoofed.host.name";

        /* spoof notice: enable spoofing notification to admins */
        spoof_notice = yes;

	/* exceed limit: allow a user to exceed class limits
	 * ('L' prefix on /stats I) */
	exceed_limit = yes;

	/* kline exempt: exempt this user from k-lines
	 * ('E' prefix on /stats I) */
	kline_exempt = yes;

        /* jupe exempt: exempt this user from jupes
         * ('J' prefix on /stats I) */
        jupe_exempt = yes;

	/* no tilde: remove ~ from a user with no ident
	 * ('T' prefix on /stats I) */
	no_tilde = yes;
	
	/* can flood: allow this user to exceed flood limits
	 * ('F' prefix on /stats I) */
	can_flood = yes;

        /* can flood: allow this user to exceed flood limits
         * ('I' prefix on /stats I) */
	can_idle = yes;

	/* class: the class the user is placed in */
	class = "opers";
};

auth {
	user = "*@*";
	class = "users";
	
	/* restricted: stop the client sending mode changes
	 * ('r' prefix on /stats I) */
	#restricted = yes;

	/* have ident: require the user has identd to connect
	 * ('i' prefix on /stats I) */
	need_ident = yes;
};

/* operator {}: defines ircd operators. Privileges are controlled via flags. */
operator {
	/* name: the name of the oper */
	name = "god";

	/* user: the user@host required for this operator. CIDR is not
	 * supported. multiple user="" lines are supported.
	 */
	user = "*god@*";
	user = "*@127.0.0.1";

	/* password: the password required to oper. By default this will
	 * need to be encrypted using 'mkpasswd'. MD5 is supported.
	 */
	password = "etcnjl8juSU1E";

	/* encrypted: controls whether the oper password above has been
	 * encrypted.
	 */
	encrypted = yes;

	/* class: the class the oper joins when they successfully /oper */
	class = "opers";

	/* privileges: controls the activities and commands an oper are 
	 * allowed to do on the server. All options default to no.
	 * Available options:
	 *
	 * global:	 allows global kill/ban/commands
	 * kline:        allows KILL, KLINE, and UNKLINE
	 * dline:	 allows DLINE and UNDLINE
	 * xline:	 allows XLINE
	 * jupe:	 allows juping
	 * nick_changes: allows oper to see nickchanges
	 *               via usermode +n
	 * rehash:       allows oper to REHASH config
	 * die:          allows DIE and RESTART
	 * admin:        gives admin privileges. admins
	 *               may (un)load modules and see the
	 *               real IPs of servers.
	 */
	global = yes;
	kline = yes;
	dline = yes;
	xline = yes;
	jupe = yes;
        nick_changes = yes;
        rehash = yes;
	die = yes;
	admin = yes;
};

/* connect {}: controls servers we connect to */
connect {
	/* name: the name of the server */
	name = "irc.uplink.com";

	/* host: the host or IP to connect to. If a hostname is used it
	 * must match the reverse dns of the server.
	 */
	host = "192.168.0.1";

	/* passwords: the passwords we send and accept.
	 * The remote server will have these passwords reversed.
	 */
	send_password = "password";
	accept_password = "anotherpassword";

	/* encrypted: controls whether the accept_password above has been
	 * encrypted.
	 */
	encrypted = no;

	/* port: the port to connect to this server on */
	port = 6666;

	/* hub mask: the mask of servers that this server may hub. Multiple
	 * entries are permitted
	 */
	hub_mask = "*";

	/* leaf mask: the mask of servers this server may not hub. Multiple
	 * entries are permitted. Useful for forbidding EU -> US -> EU routes.
	 */
	#leaf_mask = "*.uk";

	/* class: the class this server is in */
	class = "server";

	/* autoconnect: controls whether we autoconnect to this server or not,
	 * dependent on class limits.
	 */
	autoconn = yes;
	
	/* masking: the servername we pretend to be when we connect */
	#fakename = "*.arpa";
};

connect {
        name = "ipv6.some.server";
        host = "3ffd:dead:beef::1";
        send_password = "password";
        accept_password = "password";
        port = 6666;

	/* aftype: controls whether the connection uses "ipv4" or "ipv6".
	 * Default is ipv4.
	 */
	aftype = ipv6;
        class = "server";
};

/* shared {}: users
that are allowed to remote kline */
shared {
	/* name: the server the user must be on to set klines. If this is not
	 * specified, the user will be allowed to kline from all servers.
	 */
	name = "irc.some.server";

	/* user: the user@host mask that is allowed to set klines. If this is
	 * not specified, all users on the server above will be allowed to set
	 * a remote kline.
	 */
	user = "oper@spoofed.host";
        /* type: list of what to share, options are as follows:
         *      kline   - allow oper/server to kline/unkline
         *      xline   - allow oper/server to xline/unxline
         *      jupes   - allow oper/server to jupe nicks/channels
         *      all     - allow oper/server to do all of the above (default)
         */
        type = all;
};

/* kill {}: users that are not allowed to connect
 * Oper issued klines will be added to the specified kline config
 */
kill {
	user = "root@*";
	reason = "Do not IRC as root";
};

/* deny {}: IPs that are not allowed to connect (before DNS/ident lookup)
 * Oper issued dlines will be added to the specified dline config
 */
deny {
	ip = "10.0.1.0/24";
	reason = "Reconnecting vhosted bots";
};

/* exempt {}: IPs that are exempt from deny {} and Dlines. */
exempt {
	ip = "192.168.0.0/16";
};

/* cjupe {}: channels users may not join */
cjupe {
	reason = "There are no services on this network";
	channel = "#services";
};

/* njupe {}: nicks users may not use. */
njupe {
        /* reason: the reason for the proceeding njupes */
        reason = "There are no services on this network";
	/* nick: the nick to njupe. */
	nick = "nickserv";
	nick = "chanserv";
	nick = "clone*";
};

/* xline {}:  The X: replacement, used for banning users based on their */
xline {
	name = "sub7server";
	reason = "Trojan bot";
};

/* The channel block contains options pertaining to channels */
channel {
	/* Dline clients attempting to join cjuped channels */
	cjupe_dline = yes;

        /* disable local channels: prevent users from joining &channels.
         * This is extreme, but it is still a flaw in serverhide. It will
         * however remove far more from users than it will give back in
         * security.
         */
        disable_local_channels = no;

	/* knock delay: The amount of time a user must wait between issuing
	 * the knock command.
	 */
	knock_delay = 5 minutes;

	/* knock channel delay: How often a knock to any specific channel
	 * is permitted, regardless of the user sending the knock.
	 */
	knock_delay_channel = 1 minute;

	/* max chans: The maximum number of channels a user can join/be on. */
	max_chans_per_user = 15;

        /* quiet on ban: stop banned people talking in channels. */
        quiet_on_ban = yes;

        /* max bans: maximum number of +b/e/I modes in a channel */
        max_bans = 100;

	/* splitcode: The ircd will now check splitmode every few seconds.
	 *
	 * Either split users or split servers can activate splitmode, but
	 * both conditions must be met for the ircd to deactivate splitmode.
	 *
	 * You may force splitmode to be permanent by /quote set splitmode on
	 */

	/* split users: when the usercount is lower than this level, consider
	 * ourselves split. this must be set for automatic splitmode
	 */
	default_split_user_count = 0;

	/* split servers: when the servercount is lower than this, consider
	 * ourselves split. this must be set for automatic splitmode
	 */
	default_split_server_count = 0;

	/* split no create: disallow users creating channels on split. */
	no_create_on_split = no;

	/* split: no join: disallow users joining channels at all on a split */
	no_join_on_split = no;
};


/* The serverhide block contains the options regarding serverhiding */
serverhide {
	/* flatten links: this option will show all servers in /links appear
	 * that they are linked to this current server
	 */
	flatten_links = no;

	/* links delay: how often to update the links file when it is
	 * flattened.
	 */
	links_delay = 5 minutes;

	/* hidden: hide this server from a /links output on servers that
	 * support it. this allows hub servers to be hidden etc.
	 */
        hidden = no;

	/* disable hidden: prevent servers hiding themselves from a
	 * /links output.
	 */
	disable_hidden = no;

	/* hide servers: hide remote servernames everywhere and instead use
	 * network_name and server description.
	 */
	hide_servers = no;

	/* If this is disabled, opers will be unable to see servers ips and will be
	 * shown a masked ip, admins will be shown the real ip.
	 *
	 * If this is enabled, nobody can see a servers ip. *This is a kludge*, it
	 * has the side effect of hiding the ips everywhere, including logfiles.
	 *
	 * We recommend you leave this disabled, and just take care with who you
	 * give admin=yes; to.
	 */
	hide_server_ips = no;
};

/* The general block contains many of the options that were once compiled
 * in options in config.h. The general block is read at start time.
 */
general {
	/* Enable services commands. You must edit m_services.c and recompile to use
	 * this feature.
	 */
	use_services = no;

	/* Max time from the nickname change that still causes KILL
	 * automatically to switch for the current nick of that user. (seconds)
	 */
	kill_chase_time_limit = 90;

	/* If hide_spoof_ips is disabled, opers will be allowed to see the real IP of spoofed
	 * users in /trace etc. If this is defined they will be shown a masked IP.
	 */
	hide_spoof_ips = yes;

        /* disable auth: completely disable ident lookups; if you enable this,
         * be careful of what you set need_ident to in your auth blocks
         */
        disable_auth = no;

        /* disable remote commands: disable users doing commands on remote servers */
        disable_remote_commands = no;

	/* floodcount: the default value of floodcount that is configurable
	 * via /quote set floodcount. This is the amount of lines a user
	 * may send to any other user/channel in one second.
	 */
        default_floodcount = 10;

	/* floodjoin: the default value of floodjoin that is configurable
	 * via /quote set floodjoin. This is the maximum number of joins a
	 * channel can have in one second, 0 to disable.
	default_floodjoin = 5;

	/* dots in ident: the amount of '.' characters permitted in an ident
	 * reply before the user is rejected.
	 */
	dots_in_ident = 2;

        /* min nonwildcard: the minimum non wildcard characters in k/d lines
	 * placed via the server. klines hand placed are exempt from limits.
	 * wildcard chars: '.' '*' '?' '@'
	 */
	min_nonwildcard = 4;

        /* min nonwildcard simple: the minimum non wildcard characters in
         * xline bans. wildcard chars: '*' '?'
         */
        min_nonwildcard_simple = 3;

        /* max accept: maximum allowed /accept's for +I usermode */
        max_accept = 20;

	/* nick flood: enable the nickflood control code */
	anti_nick_flood = yes;

	/* nick flood: the nick changes allowed in the specified period */
	max_nick_time = 20 seconds;
	max_nick_changes = 5;

        /* anti spam time: the minimum time a user must be connected before
	 * custom quit messages are allowed.
	 */
        anti_spam_exit_message_time = 5 minutes;

	/* ts delta: the time delta allowed between server clocks before
	 * a warning is given, or before the link is dropped. all servers
	 * should run ntpdate/rdate to keep clocks in sync
	 */
	ts_warn_delta = 30 seconds;
	ts_max_delta = 5 minutes;

	/* ban_reason : show this message to users on channel
	 * instead of the oper reason.
 	 */
	ban_reason = "Connection Closed";

	/* stats o oper only: make stats o (opers) oper only */
	stats_o_oper_only = yes;

	/* stats P oper only: make stats P (ports) oper only */
	stats_P_oper_only = no;

	/* stats i oper only: make stats i (auth {}) oper only. set to:
	 *     yes:    show users no auth blocks, made oper only.
	 *     masked: show users first matching auth block
	 *     no:     show users all auth blocks.
	 */
	stats_i_oper_only = masked;

	/* stats k/K oper only: make stats k/K (klines) oper only. set to:
	 *     yes:    show users no auth blocks, made oper only
	 *     masked: show users first matching auth block
	 *     no:     show users all auth blocks.
	 */
	stats_k_oper_only = masked;
                                    
	/* ssignore wait: time between notifying a +g user that somebody
	 * is messaging them.
	 */
	ssignore_wait = 1 minute;

	/* pace wait simple: time between use of less intensive commands
	 * (HELP, remote WHOIS, WHOWAS)
	 */
	pace_wait_simple = 1 second;

	/* pace wait: time between more intensive commands
	 * (ADMIN, INFO, LIST, LUSERS, MOTD, STATS, VERSION)
	 */
	pace_wait = 10 seconds;

	/* no oper flood: increase flood limits for opers. */
	no_oper_flood = yes;

	/* true no oper flood: completely eliminate flood limits for opers
         * and for clients with can_flood = yes in their auth blocks
	 */
	true_no_oper_flood = yes;

        /* oper_pass_jupes: allow opers to over-ride jupes on nicks/channels */
        oper_pass_jupes = yes;

	/* Automatic detection of drones */
	drone_detect = yes;

	/* Automatically dline detected drones (drone_detect must be
	 * enabled for this to work)
	 */
	autodline_drones = yes;

	/* Dline time for drones (drone_detect and autodline_drones must be
	 * enabled for this to work)
	 */
	drone_dline_time = 120 minutes;

	/* Dline time for joining a juped channel (cjupe_dline must be enabled
	 * for this to work)
	 */
	cjupe_dline_time = 120 minutes;

	/* idletime: the maximum amount of time a user may idle before
	 * they are disconnected
	 */
        idletime = 0;

	/* nochanidletime: the maximum amount of time a user may idle without
	 * being in a channel before they are disconnected
	nochanidletime = 100 minutes;

	/* maximum links: the maximum amount of servers to connect to for
	 * connect blocks without a valid class.
	 */
	maximum_links = 1;

	/* REMOVE ME. The following line checks you've been reading. */
	havent_read_conf = 1;

	/* max targets: the maximum amount of targets in a single 
	 * PRIVMSG/NOTICE. set to 999 NOT 0 for unlimited.
	 */
	max_targets = 4;

	/* client flood: maximum amount of data in a clients queue before
	 * they are dropped for flooding.
	 */
	client_flood = 2560 bytes;

	/* message locale: the default message locale
	 * Use "standard" for the compiled in defaults.
	 */
	message_locale = "custom";

	/* usermodes configurable: a list of usermodes for the options below
	 *
	 * +b - floodbots  - See floodbot and drone flooding notices
	 * +c - cconn      - Client connection/quit notices
	 * +f - full       - See I: line full notices
	 * +g - callerid   - Server Side Ignore
	 * +i - invisible  - Not shown in NAMES or WHO unless you share a 
	 *                   a channel
	 * +k - skill      - See server generated KILL messages
	 * +l - locops     - See LOCOPS messages
	 * +n - nchange    - See client nick changes
	 * +r - rej        - See rejected client notices
	 * +s - servnotice - See general server notices
	 * +u - unauth     - See unauthorized client notices
	 * +w - wallop     - See server generated WALLOPS
	 * +x - external   - See remote server connection and split notices
	 * +y - spy        - See LINKS, STATS, TRACE notices etc.
	 */
	 
	/* oper umodes: default usermodes opers get when they /oper */
	oper_umodes = locops, servnotice, wallop;

	/* throttle time: the minimum amount of time between connections from
	 * the same ip. exempt blocks are excluded from this throttling.
	 * Offers protection against flooders who reconnect quickly. 
	 * Set to 0 to disable.
	 */
	throttle_time = 10;
};

/* Uncomment this section if you want to load other modules
 * module path: other paths to search for modules specified below
 * and in /modload.
 * module: the name of the module to load on startup/rehash
 */
/*
modules {
	path = "/usr/local/ircd/modules";
	module = "some_module.so";
};
*/
