loadmodule "src/modules/commands.so";
loadmodule "src/modules/cloak.so";


include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";

me
{
	name "irc.chat.loc";
	info "chat Server";
	numeric 1;
};


admin {
	"A";
	"A";
	"A@mail.com";
};

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 */
};


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

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

allow           channel {
	channel "#ss";
};


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


listen 127.0.0.1:6697
{
 options
 {
 serversonly;
 };
};


listen         *:8067;
#listen         *:6667;

link            services.chat.loc
{
	username	*;
	hostname 	127.0.0.1;
	bind-ip 	127.0.0.1;
	port 		6697;
	hub             *;
	password-connect "*****";
	password-receive "*****";
	class           servers;

};

ulines {
	services.chat.loc;
	stats.chat.loc;
};

drpass {
	restart "******";
	die "******";
};


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;
		sadmin-commands;
		chg-commands;
		oper-override;
		spamfilter;
	};
};




/* Standard aliases */
alias NickServ { type services; };
alias ChanServ { type services; };
alias OperServ { type services; };
alias HelpServ { type services; };
alias StatServ { type stats; };





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

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

/* This is an example of a real command alias */
/* This maps /GLINEBOT to /GLINE <parameter> 2d etc... */
alias "glinebot" {
	format ".+" {
		command "gline";
		type real;
		parameters "%1 2d Bots are not allowed on this server, please read the faq at http://www.example.com/faq/123";
	};
	type command;
};




tld {
	mask *@*;
	motd "ircd.motd";
	rules "ircd.rules";
};

ban nick {
	mask "*C*h*a*n*S*e*r*v*";
	reason "Reserved for Services";
};

ban ip {
	mask 195.86.232.81;
	reason "Delinked server";
};


ban server {
	mask eris.berkeley.edu;
	reason "Get out of here.";
};


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



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

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



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


deny dcc {
	filename "*sub7*";
	reason "Possible Sub7 Virus";
};


deny channel {
	channel "*warez*";
	reason "Warez is illegal";
};


vhost {
	vhost           i.hate.microsefrs.com;
	from {
		userhost       *@*.image.dk;
	};
	login           stskeeps;
	password        moocowsrulemyworld;
};

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

/* Network configuration */
set {
	network-name 		"Chat";
	default-server 		"irc.chat.loc";
	services-server 	"services.chat.loc";
	stats-server 		"stats.chat.loc";
	help-channel 		"#ss";
	hiddenhost-prefix	"ch";
	/* prefix-quit 		"no"; */
	
	cloak-keys {
		"Asdfg1";
		"Asdfg2";
		"Asdfg3";
	};
	/* on-oper host */
	hosts {
		local		"locop.chat.com";
		global		"ircop.chat.com";
		coadmin		"coadmin.chat.com";
		admin		"admin.chat.com";
		servicesadmin 	"csops.chat.com";
		netadmin 	"netadmin.chat.com";
		host-on-oper-up "no";
	};
};

/* Server specific configuration */

set {
	kline-address "A@mail.ru";
	modes-on-connect "+ixw";
	modes-on-oper	 "+xwgs";
	oper-auto-join "#opers";
	options {
		hide-ulines;
		/* You can enable ident checking here if you want */
		/* identd-check; */
		show-connect-info;
	};

	maxchannelsperuser 10;
	anti-spam-quit-message-time 10s;
	oper-only-stats "okfGsMRUEelLCXzdD";

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

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

	/* Spam filter */
	spamfilter {
		ban-time 1d; /* default duration of a *line ban set by spamfilter */
		ban-reason "Spam/Advertising"; /* default reason */
		virus-help-channel "#help"; /* channel to use for 'viruschan' action */
		/* except "#help"; channel to exempt from filtering */
	};
};


