summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/BUGS4
-rw-r--r--docs/DEFCON19
-rw-r--r--docs/EVENTS305
-rw-r--r--docs/INSTALL278
-rw-r--r--docs/IRCD853
-rw-r--r--docs/MODULES50
-rw-r--r--docs/MYSQL79
7 files changed, 850 insertions, 738 deletions
diff --git a/docs/BUGS b/docs/BUGS
index 4474f2d7d..be03aacf7 100644
--- a/docs/BUGS
+++ b/docs/BUGS
@@ -1,5 +1,5 @@
-Reported Bugs from Bugzilla: http://bugs.anope.org
-===================================================
+Reported Bugs from Bugzilla: http://bugs.anope.org/
+---------------------------------------------------
.- Strange Segfault on expiring nicknames. Almost arbitrary, very hard
to reproduce.
diff --git a/docs/DEFCON b/docs/DEFCON
index 1b7b169de..ba46744e8 100644
--- a/docs/DEFCON
+++ b/docs/DEFCON
@@ -1,7 +1,14 @@
Anope DefCon
------------
-Introduction:
+1) Introduction
+2) Installation
+3) Configuration
+4) Usage
+5) Usage Example
+6) Support
+
+1) Introduction
Anope 1.6 onwards supports a unique protection mechanism based on the
military "Defense Readiness Condition" (DefCon) system. It is based on
@@ -20,7 +27,7 @@ Introduction:
are running. Also to protect the users, primarily in the event of Clones
and/or FloodBOT attacks.
-Installation:
+2) Installation
The DefCon system is part of Anope's core,
@@ -32,7 +39,7 @@ Installation:
Make sure you restart Anope after changing the DefCon configuration
directives.
-Configuration:
+3) Configuration
Pre-defined DefCon actions:
@@ -71,14 +78,14 @@ Configuration:
The recommended default values are safe to use on any network.
-Usage:
+4) Usage
Anope starts up in DEFCON5 (normal readiness). To change the Defcon level
in action use:
/msg OperServ DEFCON 1|2|3|4|5
-Example:
+5) Usage Example
Place the network on DEFCON4:
@@ -104,7 +111,7 @@ Example:
-Global- Services are now back to normal, sorry for any inconvenience
-Support:
+6) Support
You might get DefCon support by posting on our online forum, or maybe on
our #anope channel at /server irc.anope.org.
diff --git a/docs/EVENTS b/docs/EVENTS
index 594df325b..869257d31 100644
--- a/docs/EVENTS
+++ b/docs/EVENTS
@@ -1,156 +1,163 @@
-Internal Events
+Anope Internal Events
+---------------------
-1. Intro
-2. Complex Events
-3. Triggered Events
-4. Triggered Events List
+1) Intro
+2) Complex Events
+3) Triggered Events
+4) Triggered Events List
-==============================================================================================
-1. Introduction to Internal Events
-==============================================================================================
+1) Introduction to Internal Events
- Internal Events are setup to give module developers more information about what the core
-is doing at different times. This information can be as complex as data we are feeding to the
-uplink, to simple triggered events such as the databases being saved. A list of triggered
-events can be found below. Additional there is a module included with the core which can
-provide some clue as to how to use the code in your modules. The rest of this document assumes
-that you are used to writting modules.
+ Internal Events are setup to give module developers more information
+ about what the core is doing at different times. This information can
+ be as complex as data we are feeding to the uplink, to simple triggered
+ events such as the databases being saved. A list of triggered events
+ can be found below. Additional there is a module included with the core
+ which can provide some clue as to how to use the code in your modules.
+ The rest of this document assumes that you are used to writting modules.
-==============================================================================================
-2. Complex Events
-==============================================================================================
+2) Complex Events
- This type of events are based around what happens when we talk to the IRCD, much like
-MESSAGE events that the IRCD sends to us. The events are triggered when Anope writes to the
-ircd. To watch for these events you must have some knowledge of how the IRCD command system
-works. In our example we will trap for NICK events.
+ This type of events are based around what happens when we talk to the
+ IRCd, much like MESSAGE events that the IRCD sends to us. The events
+ are triggered when Anope writes to the ircd. To watch for these events
+ you must have some knowledge of how the IRCd command system works. In
+ our example we will trap for NICK events.
-A. All functions most be formatted as
-
- int functioname(char *source, int ac, char **av);
-
-B. In AnopeInit you must declare EvtMessage in some fashion, it is into this variable that
- we will create the event handler. Here is what the base AnopeInit should look like at
- this point.
-
- int AnopeInit(int argc, char **argv)
- {
- EvtMessage *msg = NULL;
- int status;
-
- moduleAddAuthor(AUTHOR);
- moduleAddVersion(VERSION);
- return MOD_CONT;
- }
-
-C. Pass "createEventHandler" the name of the message in this case NICK, and the function
- that was created in Step A. At this point you should assign the return of
- "createEventHandler" to the EvtMessage variable.
-
- msg = createEventHandler("NICK", my_nick);
-
-D. The Handler is not ready for use, now you must add it to the hash, with
- "moduleAddEventHandler", you will want to pass to this function the return
- of "createEventHandler"
-
- status = moduleAddEventHandler(msg);
-
- it will return the module error code so you can confirm that it was added
- correctly.
-
-E. With that setup in your function you will be passed 3 items. The source most of the time
- this will be set to ServerName or NULL, consult our ircd documentation about how messages
- are formatted. AC is the count of variables you will find in AV.
-
- int my_nick(char *source, int ac, char **av)
- {
- alog("Internal Event - nick is %s",av[0]);
- return MOD_CONT;
- }
-
-==============================================================================================
-3. Triggered Events
-==============================================================================================
-
- These events also known as "event hooks" are internal events such as expiring of nicks to
-the saving of databases.
-
-A. All functions most be formatted as
-
- int functioname(char *message);
-
-B. In AnopeInit you must declare EvtHook in some fashion, it is into this variable that
- we will create the event handler. Here is what the base AnopeInit should look like at
- this point.
-
- int AnopeInit(int argc, char **argv)
- {
- EvtHook *hook = NULL;
- int status;
-
- moduleAddAuthor(AUTHOR);
- moduleAddVersion(VERSION);
- return MOD_CONT;
- }
-
-C. Pass "createEventHook" the name of the event, in this case we are going to hook to the
- saving of databases, "EVENT_DB_SAVING"
-
- hook = createEventHook(EVENT_DB_SAVING, my_save);
-
-D. The Handler is not ready for use, now you must add it to the hash, with
- "moduleAddEventHook", you will want to pass to this function the return
- of "createEventHook"
-
- status = moduleAddEventHook(hook);
-
- it will return the module error code so you can confirm that it was added
- correctly.
-
-E. With that setup in your function you will be passed 1 items, the message is very simple
- it could be as simple as a start, stop or message. In the case of saving it has a start
- and stop
-
- int my_save(char *source)
- {
-
- if (!stricmp(source, EVENT_START)) {
- alog("Saving the databases! has started");
- } else {
- alog("Saving the databases is complete");
- }
- return MOD_CONT;
- }
-
-==============================================================================================
-4. Triggered Events List
-==============================================================================================
-| Event Hook | Event Argument |
-==============================================================================================
-| EVENT_DB_SAVING | EVENT_START, EVENT_STOP |
-| EVENT_NEWNICK | Nick as it connected |
-| EVENT_BOT_UNASSIGN | Channel name |
-| EVENT_BOT_JOIN | Channel name |
-| EVENT_BOT_CREATE | Bot Nick |
-| EVENT_BOT_CHANGE | Bot Nick |
-| EVENT_BOT_DEL | Bot Nick |
-| EVENT_BOT_ASSIGN | Bot Nick |
-| EVENT_TOPIC_UPDATED | Channel Name |
-| EVENT_CHAN_EXPIRE | Channel Name |
-| EVENT_CHAN_REGISTERED | Channel Name |
-| EVENT_CHAN_DROP | Channel Name |
-| EVENT_CHAN_FORBIDDEN | Channel Name |
-| EVENT_CHAN_SUSPENDED | Channel Name |
-| EVENT_CONNECT | EVENT_START, EVENT_STOP |
-| EVENT_DB_EXPIRE | EVENT_START, EVENT_STOP |
-| EVENT_RESTART | EVENT_START |
-| EVENT_SHUTDOWN | EVENT_START, EVENT_STOP |
-| EVENT_SIGNAL | Quit Message |
-| EVENT_NICK_REGISTERED | Nick |
-| EVENT_NICK_DROPPED | Nick |
-| EVENT_NICK_FORBIDDEN | Nick |
-| EVENT_NICK_EXPIRE | Nick |
-| EVENT_CHANGE_NICK | Nick |
-| EVENT_USER_LOGOFF | Nick |
-==============================================================================================
+ A) All functions most be formatted as:
+ int functioname(char *source, int ac, char **av);
+
+ B) In AnopeInit you must declare EvtMessage in some fashion, it is into
+ this variable that we will create the event handler. Here is what the
+ base AnopeInit should look like at this point:
+
+ int AnopeInit(int argc, char **argv)
+ {
+ EvtMessage *msg = NULL;
+ int status;
+
+ moduleAddAuthor(AUTHOR);
+ moduleAddVersion(VERSION);
+ return MOD_CONT;
+ }
+
+ Note that AUTHOR and VERSION should be defined above the AnopeInit
+ function, just like you should do with any module.
+
+ C) Pass "createEventHandler" the name of the message in this case NICK,
+ and the function that was created in Step A. At this point you should
+ assign the return of "createEventHandler" to the EvtMessage variable.
+
+ msg = createEventHandler("NICK", my_nick);
+
+ D) The Handler is not ready for use yet; now you must add it to the hash
+ with "moduleAddEventHandler". You will want to pass to this function
+ the return of "createEventHandler".
+
+ status = moduleAddEventHandler(msg);
+
+ It will return the same module error codes as adding a regular message,
+ which you can use to confirm it was added correctly.
+
+ E) With that setup in your function you will be passed 3 items. The source
+ most of the time this will be set to ServerName or NULL; consult our
+ IRCd documentation about how messages are formatted. AC is the count of
+ variables you will find in AV.
+
+ int my_nick(char *source, int ac, char **av)
+ {
+ alog("Internal Event - nick is %s",av[0]);
+ return MOD_CONT;
+ }
+
+3) Triggered Events
+
+ These events also known as "event hooks" are internal events such as
+ expiring of nicks to the saving of databases.
+
+ A) All functions most be formatted as:
+
+ int functioname(char *message);
+
+ B) In AnopeInit you must declare EvtHook in some fashion; it is into
+ this variable that we will create the event handler. Here is what
+ the base AnopeInit should look like at this point:
+
+ int AnopeInit(int argc, char **argv)
+ {
+ EvtHook *hook = NULL;
+ int status;
+
+ moduleAddAuthor(AUTHOR);
+ moduleAddVersion(VERSION);
+ return MOD_CONT;
+ }
+
+ C) Pass "createEventHook" the name of the event. In this case we are
+ going to hook to the saving of databases, "EVENT_DB_SAVING".
+
+ hook = createEventHook(EVENT_DB_SAVING, my_save);
+
+ D) The Handler is not ready for use yet; now you must add it to the hash
+ with "moduleAddEventHook". You will want to pass to this function the
+ return of "createEventHook"
+
+ status = moduleAddEventHook(hook);
+
+ It will return the same module error codes as adding a regular message,
+ which you can use to confirm it was added correctly.
+
+ E) With that setup in your function you will be passed 1 item. The message
+ is very simple; it could be as simple as a start, stop or message. In
+ the case of saving it has a start and stop.
+
+ int my_save(char *source)
+ {
+ if (!stricmp(source, EVENT_START)) {
+ alog("Saving the databases! has started");
+ } else {
+ alog("Saving the databases is complete");
+ }
+ return MOD_CONT;
+ }
+
+4) Triggered Events List
+
+ Here's a list of all event hooks we currently offer, with a description
+ of what argument is being passed to the event functions for this type of
+ event.
+
+ Note that all events are emitted AFTER the action has taken place, so
+ any deleted nick/channel/etc won't exist anymore when your function is
+ being run.
+
+ |------------------------|-------------------------------------------|
+ | Event Hook | Event Argument |
+ |------------------------|-------------------------------------------|
+ | EVENT_DB_SAVING | EVENT_START, EVENT_STOP |
+ | EVENT_NEWNICK | Nick that just connected to the network |
+ | EVENT_BOT_UNASSIGN | Channel name the bot is on |
+ | EVENT_BOT_JOIN | Channel name the bot is on |
+ | EVENT_BOT_CREATE | Nick of the bot involved |
+ | EVENT_BOT_CHANGE | Nick of the bot involved |
+ | EVENT_BOT_DEL | Nick of the bot involved |
+ | EVENT_BOT_ASSIGN | Nick of the bot involved |
+ | EVENT_TOPIC_UPDATED | Channel name of the channel involved |
+ | EVENT_CHAN_EXPIRE | Channel name of the channel involved |
+ | EVENT_CHAN_REGISTERED | Channel name of the channel involved |
+ | EVENT_CHAN_DROP | Channel name of the channel involved |
+ | EVENT_CHAN_FORBIDDEN | Channel name of the channel involved |
+ | EVENT_CHAN_SUSPENDED | Channel name of the channel involved |
+ | EVENT_CONNECT | EVENT_START, EVENT_STOP |
+ | EVENT_DB_EXPIRE | EVENT_START, EVENT_STOP |
+ | EVENT_RESTART | EVENT_START |
+ | EVENT_SHUTDOWN | EVENT_START, EVENT_STOP |
+ | EVENT_SIGNAL | Quit message sent |
+ | EVENT_NICK_REGISTERED | Nick of the account involved |
+ | EVENT_NICK_DROPPED | Nick of the account involved |
+ | EVENT_NICK_FORBIDDEN | Nick of the account involved |
+ | EVENT_NICK_EXPIRE | Nick of the account involved |
+ | EVENT_CHANGE_NICK | Nick of the user involved |
+ | EVENT_USER_LOGOFF | Nick of the user involved |
+ |------------------------|-------------------------------------------|
diff --git a/docs/INSTALL b/docs/INSTALL
index 2c1cd3883..634560f61 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -1,182 +1,184 @@
-ANOPE INSTALLATION INSTRUCTIONS
-===============================
-
-Table of contents
------------------
- 1. Installing Anope
- 2. Upgrading Anope
- 3. Setting up the IRCd
- 4. Starting Anope
- 5. Setting up a crontab
+Anope Installation Instructions
+-------------------------------
+
+1) Installing Anope
+2) Upgrading Anope
+3) Setting up the IRCd
+4) Starting Anope
+5) Setting up a crontab
-You should also read the README and FAQ files!
+Note: You should also read the README and FAQ files!
-1. Installing Anope
--------------------
+1) Installing Anope
-IMPORTANT NOTE: it is not recommended to use (and therefore install)
-Anope as root. Use an unprivileged user instead -- the one you're
-using for the ircd or a dedicated one will be good enough.
+ IMPORTANT NOTE: it is not recommended to use (and therefore install)
+ Anope as root. Use an unprivileged user instead -- the
+ one you're using for the ircd or a dedicated one will
+ be good enough.
-The very first thing you need to do is to get the Anope package
-(if not already done). You can find it at the following place:
+ The very first thing you need to do is to get the Anope package (if not
+ already done). You can find it at:
- http://www.anope.org/
-
-Next, unpack the package in your home directory, and go into the
-created directory.
-
-Now type ./Config to start the configuration script. It will
-ask you a few questions, and figure out how to compile Anope on
-your system. If you are unsure about the answer to a question,
-use the default value.
+ http://www.anope.org/
+
+ Next, unpack the package in your home directory, and go into the created
+ directory.
+
+ Now type ./Config to start the configuration script. It will ask you a
+ few questions, and figure out how to compile Anope on your system. If
+ you are unsure about the answer to a question, use the default value.
+
+ NOTE: although you may specify different binary and data paths, it is
+ RECOMMENDED that you use the same value for both.
+
+ You can now type make to compile Anope. If there are errors in the
+ Makefile, *try to use gmake* instead. If it still doesn't work, you (or
+ the system administrator if it's a shell) must install GNU make. You may
+ find it at ftp://prep.ai.mit.edu/pub/gnu/.
-NOTE: although you may specify different binary and data paths,
- it is RECOMMENDED that you use the same value for both.
+ Now type make install (or gmake install; see above). This will install
+ all the needed files in the paths you specified with the configure
+ script, and setup file permissions. You should ensure that the data
+ directory is not accessible by other users, as malicious users may
+ cause troubles on your network if passwords are not encrypted, or read
+ the memos of any user.
-You can now type make to compile Anope. If there are errors in the
-Makefile, *try to use gmake* instead. If it still doesn't work, you
-(or the system administrator if it's a shell) must install GNU
-make. You may find it at ftp://prep.ai.mit.edu/pub/gnu/.
+ If you see errors during this process, please mail us with the *complete*
+ error output, and don't forget to mention your OS, compiler and C library
+ versions.
-Now type make install (or gmake install; see above). This will
-install all the needed files in the paths you specified with the
-configure script, and setup file permissions. You should ensure
-that the data directory is not accessible by other users, as malicious
-users may cause troubles on your network if passwords are not
-encrypted, or read the memos of any user.
+ Now go into the data directory (by default, ~/services). Copy the example
+ configuration file (example.conf) to services.conf, and open the latter
+ with your favorite text editor. It contains all the configuration
+ directives Anope will use at startup. Read the instructions contained in
+ the file carefully. Using the default values is NOT a good idea, and will
+ most likely not work!
-If you see errors during this process, please mail us with the
-*complete* error output, and don't forget to mention your OS,
-compiler and C library versions.
+ If you need help, you should subscribe to the Anope mailing list and mail
+ there to get help from other users. See the README file for more
+ information.
-Now go into the data directory (by default, ~/services). Copy the
-example.conf file to services.conf, and open the latter with your
-favorite text editor. It contains all the configuration
-directives Anope will use at startup. Read the instructions contained
-in the file carefully. Using the default values is NOT a good idea,
-and will most likely not work!
+2) Upgrading Anope
-If you need help, you should subscribe to the Anope mailing list and
-mail there to get help from other users. See the README file for more
-information.
+ If you got a .diff file and want to patch the old Anope sources with it,
+ do the following:
+ * Copy the .diff file into the root Anope sources directory.
+ * Type patch -p1 <file.diff
-2. Upgrading Anope
-------------------
+ Note that upgrading anope with a patchfile isn't recommended. You should
+ download a new, clean source package, as this will give the best results.
-If you got a .diff file and want to patch the old Anope sources with it, do
-the following:
- * Copy the .diff file into the root Anope sources directory.
- * Type patch -p1 <file.diff
+ To upgrade Anope, just follow the installation instructions described in
+ section 1. There are however a few specific guidelines:
-To upgrade Anope, just follow the installation instructions described in
-section 1. There are however a few specific guidelines:
+ * IMPORTANT: Back up your old databases!
+ * If you are upgrading to a new major release, ALWAYS restart a
+ fresh configuration file from example.conf.
- * IMPORTANT: Back up your old databases!
- * If you are upgrading to a new major release, ALWAYS restart a
- fresh configuration file from example.conf.
+3) Setting up the IRCd
+ Services acts as an IRC server with pseudo-clients on it. To link them to
+ your network, you'll need to add some lines in the ircd.conf of their hub
+ server (as stated in the RemoteServer configuration directive).
-3. Setting up the IRCd
-----------------------
+ For samples below we'll take services.localhost.net as the name of the
+ Services (as stated in the ServerName configuration directive). Note that
+ this samples are made to be as generic as possible, but there might be
+ small variations, depending on your IRCd. For IRCd-specific help with
+ configuration, read near the end of this section.
-Services acts as an IRC server with pseudo-clients on it. To link
-them to your network, you'll need to add some lines in the ircd.conf
-of their hub server (as stated in the RemoteServer configuration
-directive).
+ First, the C/N lines, that allow Services to link. They also need a
+ Y:line to work correctly.
-For samples below we'll take Services.LocalHost.Net as the name of
-the Services (as stated in the ServerName configuration directive).
+ Y:27:180:0:0:4000000
+ C:127.0.0.1:mypass:services.localhost.net::30
+ N:127.0.0.1:mypass:services.localhost.net::30
-First, the C/N lines, that allow Services to link. They also need a
-Y:line to work correctly.
+ "mypass" is the same password you mentioned in the RemoteServer
+ configuration directive. 127.0.0.1 is the IP from which Services connect
+ from (linking in localhost is the most efficient way to run Services).
-Y:27:180:0:0:4000000
-C:127.0.0.1:mypass:Services.LocalHost.Net::30
-N:127.0.0.1:mypass:Services.LocalHost.Net::30
+ Then, you have to set-up an U:line, that will allow Services to change
+ channel modes, topics, and much more without being opped in the channel.
-mypass is the same password you mentioned in the RemoteServer
-configuration directive. 127.0.0.1 is the IP from which Services
-connect from (linking in localhost is the most efficient way
-to run Services).
+ U:services.localhost.net:*:*
-Then, you have to set-up an U:line, that will allow Services to
-change channel modes, topics, and much more without being opped
-in the channel.
+ NOTE: if you have more than one server in your network, this line MUST
+ be added on ALL servers, or things won't work correctly.
-U:Services.LocalHost.Net:*:*
+ Finally, you'll need to add an H:line, to make the OperServ JUPE command
+ work correctly.
-NOTE: if you have more than one server in your network, this line
-MUST be added on ALL servers, or things won't work.
+ H:*::Services.LocalHost.Net
-Finally, you'll need to add an H:line, to make the OperServ JUPE
-command work correctly.
+ Don't forget to /rehash your IRCd to apply changes.
-H:*::Services.LocalHost.Net
+ A new trend in ircd configuration is popping all over the place, good
+ examples are the latest Hybrid, Unreal and Bahamut, which use a more
+ "readable" form of configuration. For those, use something like:
-Don't forget to /rehash to apply changes.
+ link services.localhost.net
+ {
+ username *;
+ hostname localhost;
+ bind-ip *;
+ port 6667;
+ hub *;
+ password-connect "mypass";
+ password-receive "mypass";
+ class servers;
+ };
-A new trend in ircd configuration is popping all over the place,
-good examples are the latest Hybrid and Unreal, which use a more
-"readable" for of configuration. For those, use something like:
+ Note that this block-style configuration files differ heavily, depending
+ on the IRCd. Consult the interactive link maker (link is below) for more
+ details on the exact configuration used by your IRCd.
-link Services.LocalHost.Net
-{
- username *;
- hostname localhost;
- bind-ip *;
- port 6667;
- hub *;
- password-connect "mypass";
- password-receive "mypass";
- class servers;
-};
+ If you're unable to get a link with your IRCd after reading this section,
+ you might try the interactive link maker, which is located at:
-If you're unable to get a link with your IRCd after reading this section,
-you might try the interactive link maker, which is located at:
+ http://heinz.anope.org/ilm.php
- http://heinz.anope.org/ilm.php
+4) Starting Anope
+ Go into the directory where binaries were installed (by default, this is
+ ~/services). Type ./services to launch Anope.
-4. Starting Anope
------------------
+ If there are syntax errors in the configuration file they will be
+ displayed on the screen. Correct them until there are no errors anymore.
+ A successful startup won't generate any message.
-Go into the directory where binaries were installed (by default,
-~/services). Type ./services to launch Anope.
+ Give Services at least one minute to link to your network, as certain
+ IRCds on some OSes may be really slow for the link process. If nothing
+ happens after about a minute, it is probably a configuration problem. Try
+ to launch Anope with ./services -debug -nofork to see any errors that it
+ encounters, and try to correct them.
-If there are syntax errors in the configuration file they will be
-displayed on the screen. Correct them until there are no errors
-anymore. A successful startup won't generate any message.
+ If you need help to solve errors, feel free to subscribe to the Anope
+ mailing list and ask there. See the README file for details.
-Give to Services at least one minute to link to your network, as
-certain IRCds on some OSes may be really slow for the link process.
-If nothing happens then, it is probably a configuration problem.
-Try to launch Anope with ./services -debug -nofork to see any errors
-that it encounters, and try to correct them.
+5) Setting up a crontab
-If you need help to solve errors, feel free to subscribe to the
-Anope mailing list and ask there. See the README file for details.
+ A crontab entry will allow you to check periodically whether Anope is
+ still running, and restart it if not. You'll need to have Anope binaries
+ and data installed in the same directory for this to work without
+ modification.
+ First rename the example.chk script that is in Anope path (by default,
+ this is ~/services) to services.chk and edit it. You'll need to modify
+ the CONFIGURATION part of the file. Then ensure that the file is marked
+ as executable by typing chmod +x services.chk, and try to launch the
+ script to see if it works (Anope must not be running when you do this ;))
-5. Setting up a crontab
------------------------
+ When this is done, you'll have to add the crontab entry. Type crontab -e.
+ This will open the default text editor with the crontab file. Enter the
+ following (with correct path):
-A crontab entry will allow you to check periodically whether Anope
-is still running, and restart it if not. You'll need to have
-Anope binaries and data installed in the same directory for this to
-work without modification.
+ */5 * * * * /home/ircd/services/services.chk >/dev/null 2>&1
-First rename the example.chk script that is in Anope path (by default,
-~/services) to services.chk and edit it. You'll need to modify the
-CONFIGURATION part of the file. Then ensure that the file is marked as
-executable by typing chmod +x services.chk, and try to launch the script
-to see if it works (Anope must not be running when you do this ;).
+ The */5 at the beginning means "check every 5 minutes". You may replace
+ the 5 with other another number if you want (but less than 60). Consult
+ your system's manual pages for more details on the syntax of the crontab
+ file. Interesting manpages are crontab(5), crontab(1) and cron(8).
-When this is done, you'll have to add the crontab entry. Type crontab -e.
-This will open the default text editor with the crontab file. Enter the
-following (with correct path):
-*/5 * * * * /home/ircd/services/services.chk >/dev/null 2>&1
-The */5 at the beginning means "check every 5 minutes". You may replace
-the 5 with other another number if you want (but less than 60).
-Save and exit, and it's installed.
+ Save and exit, and it's installed.
diff --git a/docs/IRCD b/docs/IRCD
index fa56ce77e..678c1545f 100644
--- a/docs/IRCD
+++ b/docs/IRCD
@@ -1,466 +1,557 @@
-HOW TO ADD IRCD SUPPORT
-
-1. Files to edit
-2. Modifing the header file
-3. The code
-4. Modes
-5. Functions / Events
-6. CAPAB/PROTOCTL
-
-=============================================================================================
+How To Add IRCd Support
+-----------------------
+
+1) Files to Edit
+2) Modifing the Header File
+3) The Code
+4) Modes
+5) Functions / Events
+6) CAPAB/PROTOCTL
+
+1) Files to Edit
+
+ When preparing to add support to Anope for your ircd, you need to edit
+ the following files.
+
+ A) Make a copy of the .c and .h file of the IRCd that matches the ircd
+ that you are attempting to add support for best.
+ B) Make a backup copy of include/services.h, include/sysconf.h.in
+ C) Make a backup copy of Config and configure.in
+
+ First step in this process is to rename the .c and .h file after the IRCd
+ that you are going to be adding support for. Its recommened that you come
+ up with a name that is clear and easy to understand.
+
+ Now that you have the files that you will need to create your own ircd
+ support, starting with Config. This file is a shell script file; scroll
+ down untill you find the list of ircs for the user to select. Indicate
+ the based ircd version which is supported such as a series 1.x or 2.2.x,
+ placing in the comment side an exact version that the support is for or
+ "experimental" if you are not the ircd developer. The next step is to
+ decide how the IRCd will be defined, following the existing examples edit
+ 'IRCTYPE_DEF="IRC_RATBOX"' to be the descriptive define for your ircd.
+
+ With the Config file ready to go, edit configure.in and find in there the
+ reference to --with-ircd. You should see see the various other ircds, and
+ you will want to add yours in there using the same IRC_ name you came up
+ with above. Important in this step is to make sure that you set the
+ IRCDFILE to the name of the .c file you set in step 1. Once you have the
+ configure.in created you can remove the old configure and at the command
+ prompt type "autconf"; this will generate the new configure file.
+
+ Getting close to actually modify code. Open sysconf.h.in and add two
+ lines for your given ircd, which is similar to this:
+
+ /* "First IRCD type" */
+ #undef IRC_RATBOX
+
+ Open services.h and add a line with the rest of the ircd include files to
+ match the name of the .h file you set in step 1.
+
+ #include "ratbox.h"
+
+ Taking the .c and .h file open them and replace the #ifdef IRC_* with the
+ IRC_ name you set in step two. Ensure that the code comments at the top
+ of the file match the ircd that the code will be for.
+
+ You are now ready to start getting into the code.
+
+2) Modifing the Header File
+
+ Now that you have gotten past the first part of the creation process, you
+ are into the code. This part is the harder and more complex part. You
+ will need a general understanding of C code to continue. Here are the
+ step by step instructions required to make this work.
+
+ Open the .h file and find the section of code with
+
+ #define PROTECT_SET_MODE "+"
+ #define PROTECT_UNSET_MODE "-"
+ #define CS_CMD_PROTECT "PROTECT"
+ #define CS_CMD_DEPROTECT "DEPROTECT"
+ #define FANT_PROTECT_ADD "!protect"
+ #define FANT_PROTECT_DEL "!deprotect"
+ #define LEVEL_PROTECT_WORD "AUTOPROTECT"
+ #define LEVELINFO_PROTECT_WORD "PROTECT"
+ #define LEVELINFO_PROTECTME_WORD "PROTECTME"
+
+ If the ircd supports a protective/admin (not owner) mode, set the
+ PROTECT_SET_MODE and PROTECT_UNSET_MODE to be that mode. On most ircds
+ it's usermode "a" so you will be setting it to "+a" and "-a". The next
+ two are based more on what this mode is called. When you message ChanServ
+ to get this mode, this is the command you will be using. After this are
+ the fantasy commands which can be used in channel to get these modes. The
+ next three relate to the ACCESS LEVEL list system. Again these are the
+ words to gain these levels in the ACCESS LEVEL system. If your ircd does
+ not have these functions, leave them at what ever value is currently set;
+ the core code will ignore the request of the user.
+
+ Now that this is set, you can define the MODES. All user modes are stored
+ with UMODE_ followed by a letter matching the modes case; be careful to
+ use the correct case as this will make it clear when you setup MODES in
+ the .c in a few. Use hex values for the modes so starting at 0x00000001
+ to 0x8000000. In most cases you want to list all modes. If you run out of
+ values look at removing any modes that do not impact services.
+
+ Channel modes are done much like user modes, with the exception that
+ bans, exceptions, invites, and modes that are applied to a user such as
+ op and voice are not defined here. All other modes are defined in here.
+ Again be clear and use the correct case and use hex values as done with
+ user modes.
+
+ Finally we come to DEFAULT_MLOCK; this is the mode that services will set
+ by default on channels when they are registered. In general you want this
+ to be whats acceptable by the ircd; in most cases this is "+nt"
+
+3) The Code
+
+ Here is where the code of the .c file comes in. Be prepared to spend at
+ least an hour, if not longer, going over the code and getting it right;
+ Especially if you are setting up an ircd that is completely different
+ than the one you used as a base. This section covers the majority of the
+ code that is in use.
+
+ The first bit of code you will face is:
+
+ const char version_protocol[] = "Ratbox IRCD";
+
+ This the protocol name which will appear in various places; especially
+ when you do -version at the command prompt, this is where you state the
+ server name. The version is not always needed unless you are showing that
+ the support is for one branch of a ircd family, such as Unreal 3.1 and
+ Unreal 3.2.
+
+ Once you have decided on this little piece of code, you will come to
+ flood mode characters being used for setting and removing. If your IRCd
+ does not support flood modes, you can just use ""; we will be setting if
+ your IRCD supports flooding or not in a little bit.
+
+ const char flood_mode_char_set[] = "+f";
+ const char flood_mode_char_remove[] = "-f";
+
+ The next task that you will face is setting whether the IRCD sends time
+ stamps on modes but does not tell us that it will do so. If it does, set
+ UseTSMODE to 1; if it does not set it to be 0. If you're not sure