summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/example.conf112
-rw-r--r--docs/Changes.conf2
-rw-r--r--include/bots.h2
-rw-r--r--include/channels.h4
-rw-r--r--include/config.h13
-rw-r--r--include/extern.h15
-rw-r--r--include/logger.h100
-rw-r--r--include/modules.h4
-rw-r--r--include/services.h41
-rw-r--r--include/users.h8
-rw-r--r--modules/core/bs_act.cpp6
-rw-r--r--modules/core/bs_assign.cpp3
-rw-r--r--modules/core/bs_badwords.cpp19
-rw-r--r--modules/core/bs_bot.cpp6
-rw-r--r--modules/core/bs_kick.cpp21
-rw-r--r--modules/core/bs_say.cpp6
-rw-r--r--modules/core/bs_set.cpp3
-rw-r--r--modules/core/bs_unassign.cpp3
-rw-r--r--modules/core/cs_access.cpp38
-rw-r--r--modules/core/cs_akick.cpp32
-rw-r--r--modules/core/cs_ban.cpp5
-rw-r--r--modules/core/cs_clear.cpp6
-rw-r--r--modules/core/cs_drop.cpp13
-rw-r--r--modules/core/cs_forbid.cpp11
-rw-r--r--modules/core/cs_getkey.cpp3
-rw-r--r--modules/core/cs_invite.cpp5
-rw-r--r--modules/core/cs_kick.cpp3
-rw-r--r--modules/core/cs_modes.cpp38
-rw-r--r--modules/core/cs_register.cpp10
-rw-r--r--modules/core/cs_saset.cpp4
-rw-r--r--modules/core/cs_set.cpp3
-rw-r--r--modules/core/cs_set_founder.cpp2
-rw-r--r--modules/core/cs_set_successor.cpp2
-rw-r--r--modules/core/cs_set_xop.cpp4
-rw-r--r--modules/core/cs_suspend.cpp11
-rw-r--r--modules/core/cs_topic.cpp14
-rw-r--r--modules/core/cs_xop.cpp22
-rw-r--r--modules/core/db_plain.cpp33
-rw-r--r--modules/core/enc_md5.cpp2
-rw-r--r--modules/core/enc_none.cpp2
-rw-r--r--modules/core/enc_old.cpp2
-rw-r--r--modules/core/enc_sha1.cpp2
-rw-r--r--modules/core/enc_sha256.cpp2
-rw-r--r--modules/core/hs_del.cpp2
-rw-r--r--modules/core/hs_delall.cpp2
-rw-r--r--modules/core/hs_off.cpp1
-rw-r--r--modules/core/hs_on.cpp1
-rw-r--r--modules/core/hs_set.cpp3
-rw-r--r--modules/core/hs_setall.cpp2
-rw-r--r--modules/core/ms_rsend.cpp2
-rw-r--r--modules/core/ns_drop.cpp4
-rw-r--r--modules/core/ns_forbid.cpp5
-rw-r--r--modules/core/ns_getemail.cpp2
-rw-r--r--modules/core/ns_getpass.cpp4
-rw-r--r--modules/core/ns_ghost.cpp4
-rw-r--r--modules/core/ns_group.cpp12
-rw-r--r--modules/core/ns_identify.cpp6
-rw-r--r--modules/core/ns_logout.cpp2
-rw-r--r--modules/core/ns_recover.cpp2
-rw-r--r--modules/core/ns_register.cpp18
-rw-r--r--modules/core/ns_release.cpp4
-rw-r--r--modules/core/ns_resetpass.cpp6
-rw-r--r--modules/core/ns_saset.cpp6
-rw-r--r--modules/core/ns_sendpass.cpp2
-rw-r--r--modules/core/ns_set.cpp4
-rw-r--r--modules/core/ns_set_email.cpp2
-rw-r--r--modules/core/ns_suspend.cpp4
-rw-r--r--modules/core/os_defcon.cpp18
-rw-r--r--modules/core/os_ignore.cpp2
-rw-r--r--modules/core/os_modunload.cpp2
-rw-r--r--modules/core/os_news.cpp10
-rw-r--r--modules/core/os_reload.cpp2
-rw-r--r--modules/core/os_set.cpp76
-rw-r--r--modules/core/ss_main.cpp4
-rw-r--r--modules/extra/cs_appendtopic.cpp2
-rw-r--r--modules/extra/cs_enforce.cpp6
-rw-r--r--modules/extra/cs_set_misc.cpp2
-rw-r--r--modules/extra/db_mysql.cpp38
-rw-r--r--modules/extra/hs_request.cpp16
-rw-r--r--modules/extra/m_mysql.cpp10
-rw-r--r--modules/extra/m_ssl.cpp8
-rw-r--r--modules/extra/ns_maxemail.cpp2
-rw-r--r--modules/extra/ns_set_misc.cpp2
-rw-r--r--modules/protocol/bahamut.cpp8
-rw-r--r--modules/protocol/inspircd11.cpp20
-rw-r--r--modules/protocol/inspircd12.cpp22
-rw-r--r--modules/protocol/inspircd20.cpp26
-rw-r--r--modules/protocol/ratbox.cpp12
-rw-r--r--modules/protocol/unreal32.cpp20
-rw-r--r--modules/socketengines/m_socketengine_epoll.cpp14
-rw-r--r--modules/socketengines/m_socketengine_select.cpp2
-rw-r--r--src/bots.cpp15
-rw-r--r--src/channels.cpp72
-rw-r--r--src/chanserv.cpp16
-rw-r--r--src/commands.cpp8
-rw-r--r--src/config.cpp127
-rw-r--r--src/encrypt.cpp4
-rw-r--r--src/init.cpp157
-rw-r--r--src/language.cpp19
-rw-r--r--src/log.cpp264
-rw-r--r--src/logger.cpp399
-rw-r--r--src/mail.cpp4
-rw-r--r--src/main.cpp268
-rw-r--r--src/memoserv.cpp2
-rw-r--r--src/messages.cpp10
-rw-r--r--src/misc.cpp4
-rw-r--r--src/modes.cpp40
-rw-r--r--src/modulemanager.cpp26
-rw-r--r--src/modules.cpp22
-rw-r--r--src/nickalias.cpp2
-rw-r--r--src/nickcore.cpp2
-rw-r--r--src/nickserv.cpp8
-rw-r--r--src/process.cpp24
-rw-r--r--src/regchannel.cpp10
-rw-r--r--src/send.cpp8
-rw-r--r--src/servers.cpp30
-rw-r--r--src/sessions.cpp12
-rw-r--r--src/sockets.cpp2
-rw-r--r--src/users.cpp110
119 files changed, 1510 insertions, 1216 deletions
diff --git a/data/example.conf b/data/example.conf
index 7dc9c1685..65d94ad5f 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -202,23 +202,6 @@ serverinfo
networkinfo
{
/*
- * If set, Services will output log messages to the given channel. This
- * directive is optional.
- *
- * IMPORTANT: This can be a security risk, so make certain this channel is
- * sufficiently protected from normal access.
- */
- #logchannel = "#services"
-
- /*
- * If set, Services will output all BotServ chatter to the defined logchannel
- * above. It shows all uses of BotServ ACT and SAY commands. Note that there
- * is no logging to the log file. Only works if logchannel is also defined.
- * This directive is optional.
- */
- #logbot = yes
-
- /*
* This is the name of the network that Services will be running on.
*/
networkname = "LocalNet"
@@ -476,13 +459,6 @@ options
#dumpcore = yes
/*
- * If set, Anope will log user connections, disconnections, and nickname
- * changes. You may have to do so in case you ever need to transmit user
- * information to your local authorities. This directive is optional.
- */
- #logusers = yes
-
- /*
* If set, Services will only show /stats o to IRC Operators. This directive
* is optional.
*/
@@ -547,12 +523,6 @@ options
ulineservers = "stats.your.network"
/*
- * If set, Services will start logging to the log channel immediatly on startup.
- * This directive is optional, and has no effect if logchannel is not defined.
- */
- #enablelogchannel = yes
-
- /*
* Default modes for mode lock, these are set on newly registered channels.
*/
mlock = "+nrt"
@@ -580,6 +550,80 @@ options
hideprivilegedcommands = no
}
+/*
+ * [RECOMMENDED] Logging Configuration
+ *
+ * This section is used for configuring what is logged and where it is logged to.
+ * You may have multiple log blocks if you wish. Remember to properly secure any
+ * channels you choose to have Anope log to!
+ */
+log
+{
+ /*
+ * Target(s) to log to. If it starts with a # it is assumed to be a channel, otherwise
+ * it will log to a file.
+ */
+ target = "services.log"
+ /* Log to both services.log and the channel #services */
+ //target = "services.log #services"
+
+ /*
+ * The source(s) to only accept log messages from. Leave commented to allow all sources.
+ * This can be a users name, a channel name, one of our clients (eg, OperServ), or a server name.
+ */
+ //source = ""
+
+ /*
+ * The number of days to keep logfiles, only useful if you are logging to a file.
+ * Set to 0 to never delete old logfiles.
+ *
+ * Note that Anope must run 24 hours a day for this feature to work correctly.
+ */
+ logage = 7
+
+ /*
+ * What types of log messages should be logged by this block. There are nine general categories:
+ *
+ * admin - Execution of admin commands (OperServ, etc).
+ * override - A services operator using their powers to execute a command they couldn't normally.
+ * commands - Execution of general commands.
+ * servers - Server actions, linking, squitting, etc.
+ * channels - Actions in channels such as joins, parts, kicks, etc.
+ * users - User actions such as connecting, disconnecting, changing name, etc.
+ * normal - Miscelanious messages.
+ * rawio - Logs raw input and output from services
+ * debug - Debug messages (log files can become VERY large from this).
+ *
+ * These options determin what messages from the categories should be logged. Wildcards are accepted, and
+ * you can also negate values with a ~. For example, "operserv/* ~operserv/akill" would log all operserv
+ * messages except for operserv/akill.
+ *
+ * Valid admin, override, and command options are:
+ * pesudo-serv/commandname (eg, operserv/akill, chanserv/set)
+ *
+ * Valid server options are:
+ * connect, quit, sync
+ *
+ * Valid channel options are:
+ * create, destroy, join, part, kick, leave, mode
+ *
+ * Valid user options are:
+ * connect, disconnect, quit, nick, ident, host, mode, maxusers
+ *
+ * Normal and debug are simple yes/no answers, there are no types for them.
+ *
+ * Note that modules may add their own values to these options.
+ */
+ admin = "operserv/*"
+ override = "chanserv/* nickserv/* memoserv/set botserv/* ~botserv/set"
+ commands = "~operserv/* *"
+ servers = "*"
+ //channels = "~mode *"
+ users = "connect disconnect nick"
+ normal = yes
+ rawio = no
+ debug = no
+}
/*
* [RECOMMENDED] Oper Access Config
@@ -594,7 +638,7 @@ options
*
* Available privileges:
* botserv/administration - Can perform certain BotServ administrative tasks
- * chanserv/access/modify - Can modify channel access lists
+ * chanserv/access/modify - Can modify channel access and akick lists
* chanserv/auspex - Can see any information with /chanserv info
* chanserv/no-register-limit - May register an unlimited number of channels and nicknames
* chanserv/set - Can modify the settings of any channel (incl. changing of the owner and password!)
@@ -1302,12 +1346,6 @@ operserv
#superadmin = yes
/*
- * If set, causes Services to write a message to the log every time a new user maximum is set.
- * This directive is optional.
- */
- logmaxusers = yes
-
- /*
* These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
* SQLINEs, and SZLINEs.
*/
diff --git a/docs/Changes.conf b/docs/Changes.conf
index 404a06bc2..01227d8b2 100644
--- a/docs/Changes.conf
+++ b/docs/Changes.conf
@@ -11,6 +11,7 @@ opertype:commands added nickserv/saset/* and chanserv/saset/*
options:socketengine added to choose what socket engine to use
module:cs_set_misc and module:ns_set_misc added to replace the old set url/icq/email modules
options:hideprivilegedcommands added to hide privileged commands from normal users
+log block added to customize logging
** MODIFIED CONFIGURATION DIRECTIVES **
opertype:commands changed operserv/sgline to opserv/snline
@@ -21,6 +22,7 @@ operserv:notifications ossgline changed ossnline
** DELETED CONFIGURATION DIRECTIVES **
serverinfo:helpchannel removed because it has been readded in m_helpchan
+networkinfo:logchannel, logbot, logusers, logmaxusers, and logchannel removed because of the log block
Anope Version 1.9.2
--------------------
diff --git a/include/bots.h b/include/bots.h
index f6b8d2e14..0a84cce71 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -23,6 +23,8 @@ enum BotFlag
{
BI_BEGIN,
+ /* This bot is a core bot. NickServ, ChanServ, etc */
+ BI_CORE,