diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/ASTYLE | 1 | ||||
-rw-r--r-- | docs/C++CASTING | 111 | ||||
-rw-r--r-- | docs/CMakeLists.txt | 4 | ||||
-rw-r--r-- | docs/CODING | 239 | ||||
-rw-r--r-- | docs/Changes.conf | 5 | ||||
-rw-r--r-- | docs/EVENTS | 35 | ||||
-rw-r--r-- | docs/FAQ | 10 | ||||
-rw-r--r-- | docs/INSTALL | 16 | ||||
-rw-r--r-- | docs/INSTALL.fr | 18 | ||||
-rw-r--r-- | docs/LANGUAGE | 2 | ||||
-rw-r--r-- | docs/MODULES | 6 | ||||
-rw-r--r-- | docs/NEWS | 7 | ||||
-rw-r--r-- | docs/README | 6 | ||||
-rw-r--r-- | docs/REDIS | 160 | ||||
-rw-r--r-- | docs/TOOLS | 24 | ||||
-rw-r--r-- | docs/WIN32.txt | 4 | ||||
-rw-r--r-- | docs/XMLRPC/xmlrpc.php | 2 |
17 files changed, 30 insertions, 620 deletions
diff --git a/docs/ASTYLE b/docs/ASTYLE deleted file mode 100644 index be8cf2325..000000000 --- a/docs/ASTYLE +++ /dev/null @@ -1 +0,0 @@ -astyle --style=java --indent=tab --brackets=break-closing --indent-switches --indent-cases --brackets=break diff --git a/docs/C++CASTING b/docs/C++CASTING deleted file mode 100644 index e1beb8f06..000000000 --- a/docs/C++CASTING +++ /dev/null @@ -1,111 +0,0 @@ -C++-style Casting -================= - -In C, you can cast in one of two ways: - -(type)var -type(var) - -The problem with C-style casting is that it allows a programmer to get away -with too much, and is also not designed to handle C++ classes. - -C++ has 4 types of casting in addition to allowing C-style casting. They are: - -static_cast -const_cast -dynamic_cast -reinterpret_cast - -The syntax is usually *_cast<type>(var). - -static_cast ------------ - -From my experience, this cast is closest to C-style casting for non-pointer -types as well as between some (but not all) pointer types. This type of cast, -like C-style casting, is performed at compile-time. static_cast can also do -a downcast of a derived class to a base class, but only if the base class is -not a virtual base class. Sometimes the result of this cast can become -undefined. static_cast is a bit more strict that C-style casting, though. It -disallows certain class conversions that would've been allowed with a C-style -cast. static_cast also doesn't allow you to cast to an incomplete type. In -these cases, I would try either dynamic_cast or reinterpret_cast. - -const_cast ----------- - -This cast is mainly to add or remove const-ness or volatile-ness from a -variable. This is safer than using a C-style cast to change the const-ness -of a variable. In most cases if you try to use one of the other casts and it -complains about const-ness, you will want to either use this cast instead or -wrap the other cast around this cast. An example: - -const int *a; -static_cast<void *>(a); <-- This will fail. - -To remedy the above, you would might try this: - -const int *a; -const_cast<void *>(a); <-- But this will still fail. - -The real solution is this: - -const int *a; -static_cast<void *>(const_cast<int *>(a)); - -It is not recommended to use const_cast on the this variable within a member -function of a class that is declared const. Instead you should use the mutable -keyword on the variable in the class's definition. - -dynamic_cast ------------- - -This cast can only be used on pointers or references to classes. It can cast a -derived class to a base class, a derived class to another derived class -(provided that both are children of the same base class), or a base class to a -derived class. You can also use this to cast a class to void *. This cast is -done at run-time as opposed to the other casts, and relies on C++'s RTTI to be -enabled. It is meant to be used on polymorphic classes, so use static_cast on -non-polymorphic classes. - -derived-to-base conversions are actually done statically, so you use either -dynamic_cast or static_cast on them, regardless of if the classes are -polymorphic or not. - -derived-to-derived or base-to-derived conversions, however, rely on run-time -type information, and this cast is used on those classes that are polymorphic. -This is safer than C-style casting in that an invalid pointer conversion will -return a NULL pointer, and an invalid reference conversion will throw a -Bad_cast exception. - -Note that in Anope we prefer if Anope::debug_cast is used. -This uses dynamic_cast (and checks for a NULL pointer return) on debug builds -and static_cast on release builds, to speed up the program because of dynamic_cast's -reliance on RTTI. - -reinterpret_cast ----------------- - -This cast I would use only as a last resort if static_cast isn't allowed on a -conversion. It allows for conversions between two unrelated types, such as -going from char * to int *. It can also be used to convert a pointer to an -integral type and vica versa. The sites I've read mention how the result is -non-portable, which I assume means the resulting object code is non-portable, -so since the code is compiled on many systems anyways, I don't see this as -being a huge issue. It is recommended to only use this if necessary, though. - -Links -===== - -The following links are web sites I've used to get this information, and might -describe some of the above a bit better than I have. :P - -http://www.acm.org/crossroads/xrds3-1/ovp3-1.html -http://www.cplusplus.com/doc/tutorial/typecasting.html -http://www.codeguru.com/forum/showthread.php?t=312456 -http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/cast.html -http://msdn.microsoft.com/en-us/library/5f6c9f8h(VS.80).aspx -http://en.wikibooks.org/wiki/C%2B%2B_Programming/Type_Casting -http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=134 - --- CyberBotX, Nov 23, 2008 diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 082b1da0e..fd93e81c0 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -6,10 +6,10 @@ if(WIN32) if(IN_SOURCE) # Add README.txt to list of files for CPack to ignore add_to_cpack_ignored_files("README.txt$" TRUE) - endif(IN_SOURCE) + endif() set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES NEWS ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt) install(FILES ${DOCS} DESTINATION ${DOC_DIR} ) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/README.txt") -endif(WIN32) +endif() diff --git a/docs/CODING b/docs/CODING deleted file mode 100644 index 7dbd5afb3..000000000 --- a/docs/CODING +++ /dev/null @@ -1,239 +0,0 @@ -Originally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines - ---- - -InspIRCd Coding Guidelines - -The following are a set of guidelines for writing patches to InspIRCd, or for -creating modules for distribution with the official package. These guidelines -were written a time after InspIRCd development started, and so not all code -yet follows these. This will be rectified with time. - - -1. Comments - - * Multi Line - Multiple line comments should follow the C-style comment, for example: - /* - * This is a multiple line comment, huzzah.. - */ - - * Single Line - Single line comments should also be in the C style, for example: - /* This is a boring one-line comment */ - - * Doxygen commenting - If you wish your comment to show in doxygen, the comment should be directly - above the item you are documenting (a class, function, enum, etc) and the - first line should be "/**". For example: - /** This is a doxygen multiline comment. - * Description of thingymebob here. - */ - - The first line after the "**" is used as the short description of the item - (up to the full stop) and everything afterwards as the detailed description. - - -2. Indentation - - Tabs. Tabs. ONLY TABS. Use a single tab for each level of indentation, - for example: - int main() - { - <tab>if (condition) - <tab>{ - <tab><tab>code - <tab>} - } - - -3. Separation - - Always put a space in between a keyword like if/while and the condition, - for example: - if (foo == bar) - NOT - if(foo == bar) - - -4. Braces - - Always put braces opening and closing blocks on separate lines, see the - identation example. For example, place braces like this: - if (apples == "green") - { - cout << "Apples are green" << endl; - } - - and not: - if (apples == "green") { - cout << "Apples are green" << endl; - } - - The one exception to this is if you are declaring a class method which is - only one line long, in that case the following is acceptable in most cases: - class foo : public bar - { - foo() { } - getrandomfoo() { return rand(); } - }; - - -5. Templates - - Where possible, use templates rather than #defines. Avoid use of RTTI. - - -6. Structs - - Structs should be declared in the following fashion: - struct BodyPartBasket - { - int arms; - int legs; - int scrotalsacs; - }; - and not like this: - typedef struct - { - int arms; - int legs; - int scrotalsacs; - } BodyPartBasket; - - The second way is not required in C++ to be able to do this: - BodyPartBasket mybasket; - - Plus, placing the name at the bottom of the declaration makes readability - more difficult (as you have to scroll down to the bottom of the struct to - find its name). (where possible, call them classes rather than structs.) - - -7. Variable naming - - Class and struct names should be in camel case with a leading capital letter, - for example "MyBagOfBones" and not "my_bag_of_bones" or "mybagofbones". - Variable names can be in either camel case with a leading capital letter or - alternatively all lower case, so long as the same naming convention is - adhered to throughout the class. No classes or variables should be named in - capitals unless this makes sense for the name (for example "class DNS"). - Constants and enum values should always be completely in CAPITALS and - underscores may be used, for example: - enum DecayState - { - DECAYED_MOULDY = 0, - DECAYED_SMELLY = 1, - DECAYED_MAGGOTS = 2 - }; - All value names in an enum should be started with the same text which should - be related in some way to the enum's use. For example "DNS_CNAME, DNS_A, - DNS_AAAA". - - -8. Use of references - - Wherever possible, when dealing with any complex class, pass a const reference - rather than a copy of the class. For example: - MyThingy::MyThingy(const std::string &thingyvalue) - { - } - Of course, if you intended to change the string you can just omit the 'const'. - - -9. Use of char pointers - - Whenever you use char pointers (char*, char**) try to use const equivalents. - This is much safer and avoids ugly and dangerous casts. For example: - MyThingy::Thingify(const char* const* wotsits) - { - } - If it is possible without performance loss, consider avoiding char pointers - altogether and using std::string instead. - - -10. Use of STL - - For more information on use of STL in InspIRCd, please see the separate - STL FAQ. - - -11. Making copies of data - - Never ever make a copy of a piece of data unless it is absolutely necessary. - For example, don't use strlcpy() to make a copy of the const char* string - returned by std::string::c_str(), if the change can be done to the std::string - itself. The same goes for unnecessary variable assignments, especially those - which assign large classes. - - -12. namespace std - - Avoid the following: - using namespace std; - It might take a bit more typing, but things work better if you don't set - (then later assume) the namespace -- specify it explicitly when you want to - use it. - - -13. Linefeeds - - Unix linefeeds only please. We do not like to see our screens covered in ^M. - - -14. Portability - - Always make sure your code is portable to all supported operating systems, - remember of course that as of 1.1.8 this includes windows. Don't write code - that only works on windows, or only works on Linux. Test your code on all - platforms or ask for help from other developers who have the platforms you - want to test on. - - * new() and delete(), malloc() and free() - Apart from the fact that using malloc() and free() is bad practice in C++ - code, you must never use malloc() or free() in InspIRCd, within its modules - or within the core. This is because if you use malloc() or free() in windows, - the memory is claimed from the program's local heap. - In windows, each shared object (module, dll) has its own heap, which is - protected from other dlls and executables. To get around this issue and - allow more posix-like memory access from other dlls in the program (other - modules), InspIRCd overrides the operators new and delete to ensure that - memory allocated by them comes from the windows global heap. If you use - malloc() and free() for this, the ircd will segfault when another module - tries to access the memory you have allocated! - - * strdup() - As with malloc(), above, strdup() should be avoided. Where strdup() is - absolutely necessary, use strnewdup() which is our strdup() implementation - that calls operator new instead of using malloc(). - char arrays allocated by strnewdup() should be deleted with operator delete[]. - - * CoreExport and DllImport - Prefix all types you want to import or export to other modules with CoreExport - and DllImport macros. These do nothing in POSIX operating systems, however - in windows these are expanded to the instructions __declspec(dllimport) and - __declspec(dllexport) respectively depending on where they are used and how. - - -15. External Dependencies - - If a module is compiled as standard, or the code is part of the core, you must - not use any dependencies that are not available as standard on all supported - operating systems beyond libstdc++, libc, and whatever else is currently - required to build the core. Modules which use nonstandard dependencies belong - in the modules/extra directory. - - -16. Profiling and Performance - - It is one thing to assume that code performs bad, it is another thing to prove - that it actually is. A lot of experienced programmers talk about 'premature - optimisation', and here is what it means: if you have a piece of code called - once on startup that takes 10 seconds instead of one second to run, and a - piece of code that takes 0.05 seconds to run when it should take 0.01, and - it is called once per second, the second piece of code is the priority. - - In other words, make sure that what you think is slow, and a performance - problem in Insp actually is. - To do this, use the callgrind tool from Valgrind (valgrind --tool=cachegrind - bin/inspircd -nofork -debug), and kcachegrind (or similar) to view the output - files. diff --git a/docs/Changes.conf b/docs/Changes.conf index 49bf6b783..6cb3341e5 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -1,7 +1,4 @@ -Anope Version 2.0.4-git -------------------- - -Anope Version 2.0.3 +Anope Version 2.0.3-git ------------------- Add operserv/chankill to default globops log Add ns_identify:maxlogins to limit the max number of concurrent logins per account diff --git a/docs/EVENTS b/docs/EVENTS deleted file mode 100644 index ba34f0571..000000000 --- a/docs/EVENTS +++ /dev/null @@ -1,35 +0,0 @@ -Anope Internal Events ---------------------- - -1) Intro -2) Using 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. - - Additionally 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 writing modules. - -2) Using Events - - Each Event in Anope calls a function. - You must override these functions in your main modules class. - The full list of functions and parameters are in modules.h. In this - case, you would be overriding OnJoinChannel() and OnPartChannel() like so: - - void OnJoinChannel(User *u, Channel *c) anope_override { } - void OnPartChannel(User *u, Channel *c) anope_override { } - - Some of these event overrides can be used to prevent or allow things to - happen that would normally not be allowed or denied. You can also use - ModuleManager (not explained here) to set control which order the modules - are queried (when multiple modules hook to the same event). - - The "anope_override" identifier is for compatibility with C++11. - Its usage is highly recommended. - diff --git a/docs/FAQ b/docs/FAQ deleted file mode 100644 index 63a0d1d97..000000000 --- a/docs/FAQ +++ /dev/null @@ -1,10 +0,0 @@ -Frequently Asked Questions (FAQ) concerning Anope ------------------------------------------------- - -The information in the 1.9 FAQ is subject to change at any -moment due to new developments. Please visit our website -for the most up to date information. - -An updated version of the FAQ can be found here: - -http://wiki.anope.org/index.php/FAQ diff --git a/docs/INSTALL b/docs/INSTALL index 0a923ef97..071483b08 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -52,8 +52,8 @@ Note: You should also read the README and FAQ files! cause trouble on your network if passwords are not encrypted, or read the memos of any user. - Now go into the conf directory (by default, ~/services/conf). Copy the example - configuration file (example.conf) to services.conf, and open the latter + Now go into the conf directory (by default, ~/anope/conf). Copy the example + configuration file (anope.example.conf) to anope.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 @@ -71,7 +71,7 @@ Note: You should also read the README and FAQ files! * IMPORTANT: Back up your old databases! * If you are upgrading to a new major release, ALWAYS restart a - fresh configuration file from example.conf. + fresh configuration file from anope.example.conf. 3) Setting up the IRCd @@ -83,7 +83,7 @@ Note: You should also read the README and FAQ files! a shared block), and be sure that the IRCd is listneing on the given port in the link block. - Example link configurations can be found in example.conf for some of the + Example link configurations can be found in anope.example.conf for some of the popular IRCds. Don't forget to /rehash your IRCd to apply changes. @@ -95,7 +95,7 @@ Note: You should also read the README and FAQ files! 4) Starting Anope Go into the directory where binaries were installed (by default, this is - ~/services/bin). Type ./services to launch Anope. + ~/anope/bin). Type ./anope to launch 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. @@ -104,7 +104,7 @@ Note: You should also read the README and FAQ files! 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 + to launch Anope with ./anope -debug -nofork to see any errors that it encounters, and try to correct them. If you need help to solve errors, feel free to subscribe to the Anope @@ -116,7 +116,7 @@ Note: You should also read the README and FAQ files! still running, and restart it if not. First rename the example.chk script that is in Anope path (by default, - this is ~/services/conf) to services.chk and edit it. You'll need to + this is ~/anope/conf) 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 ;)) @@ -125,7 +125,7 @@ Note: You should also read the README and FAQ files! This will open the default text editor with the crontab file. Enter the following (with correct path): - */5 * * * * /home/ircd/services/conf/services.chk >/dev/null 2>&1 + */5 * * * * /home/ircd/anope/conf/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). Consult diff --git a/docs/INSTALL.fr b/docs/INSTALL.fr index f7af3aac8..4cb453d35 100644 --- a/docs/INSTALL.fr +++ b/docs/INSTALL.fr @@ -55,9 +55,9 @@ Note : Vous devrez également lire les fichiers README et FAQ ! mots de passe ne sont pas chiffrés, ou lire les mémos de tous les utilisateurs. - Allez maintenant dans le répertoire conf (par défaut, ~/services/conf). - Copiez l'exemple de fichier de configuration (example.conf) en - services.conf et ouvrez ce dernier avec votre éditeur de texte favori. + Allez maintenant dans le répertoire conf (par défaut, ~/anope/conf). + Copiez l'exemple de fichier de configuration (anope.example.conf) en + anope.conf et ouvrez ce dernier avec votre éditeur de texte favori. Il contient toutes les directives de configuration qu'Anope va utiliser en démarrant. Lisez attentivement les instructions contenues dans le fichier. L'utilisation des valeurs par défaut n'est pas toujours @@ -78,7 +78,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! * IMPORTANT : Sauvegardez vos anciennes bases de données ! * Si vous mettez à jour vers une nouvelle version majeure, recommencez *toujours* toute votre configuration à partir du - fichier example.conf. + fichier anope.example.conf. 3) Configuration de l'IRCd @@ -92,7 +92,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! sur le port donné dans le bloc link. Des exemples de configurations de bloc link peuvent être trouvés dans - le fichier example.conf pour certains des IRCd les plus populaires. + le fichier anope.example.conf pour certains des IRCd les plus populaires. Souvenez-vous de /rehash votre IRCd pour appliquer les changements. @@ -104,7 +104,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! 4) Mettre en route Anope Allez dans le répertoire où les fichiers binaires ont été installés - (par défaut, ~/services/bin). Tapez ./services pour lancer Anope. + (par défaut, ~/anope/bin). Tapez ./anope pour lancer Anope. S'il y a des erreurs de syntaxe dans le fichier de configuration, elles seront affichées à l'écran. Corrigez-les jusqu'à ce qu'il n'y en ait @@ -114,7 +114,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! réseau, car certains IRCds sur certains systèmes peuvent être très lents pour le processus de liaison. Si rien ne se passe après environ une minute, il y a probablement un problème de configuration. Essayez - de lancer Anope en mode debug avec ./services -debug -nofork pour voir + de lancer Anope en mode debug avec ./anope -debug -nofork pour voir toutes les erreurs rencontrées et essayez de les corriger. Si vous avez besoin d'aide pour résoudre des erreurs, n'hésitez pas à @@ -127,7 +127,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! est toujours en cours d'exécution et de le redémarrer s'il n'est pas. D'abord renommez le script example.chk qui est dans les dossiers - d'Anope (par défaut, ~/services/conf) en services.chk et modifiez-le. + d'Anope (par défaut, ~/anope/conf) en services.chk et modifiez-le. Vous aurez besoin de modifier la partie CONFIGURATION du fichier. Assurez-vous ensuite que le fichier est marqué comme exécutable en tapant chmod +x services.chk et essayez de lancer le script pour voir @@ -138,7 +138,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! crontab -e. Cela va ouvrir l'éditeur de texte par défaut avec le fichier crontab. Entrez la ligne suivante (avec le chemin correct) : - */5 * * * * /home/ircd/services/conf/services.chk > /dev/null 2>&1 + */5 * * * * /home/ircd/anope/conf/services.chk > /dev/null 2>&1 Le */5 au début signifie "vérifier toutes les 5 minutes". Vous pouvez remplacer le 5 par un autre numéro si vous voulez (mais moins de 60). diff --git a/docs/LANGUAGE b/docs/LANGUAGE index 33fa240fd..24c47124f 100644 --- a/docs/LANGUAGE +++ b/docs/LANGUAGE @@ -25,7 +25,7 @@ Anope Mutli Language Support Anope uses gettext (http://www.gnu.org/software/gettext/) to translate messages for users. To add a new language install gettext and run `msginit -l language -o anope.language.po -i anope.pot`. For example if I was translating to Spanish I could run `msginit -l es_ES -o anope.es_ES.po -i anope.pot`. Open the newly generating .po file and start - translating. Once you are done simply rerun ./Config; make && make install and add the language to your services.conf. + translating. Once you are done simply rerun ./Config; make && make install and add the language to your anope.conf. Note that on Windows it is not quite this simple, windows.cpp must be edited and Anope recompiled and restarted. Poedit (http://www.poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit diff --git a/docs/MODULES b/docs/MODULES index 1699d2c52..e73412627 100644 --- a/docs/MODULES +++ b/docs/MODULES @@ -22,7 +22,7 @@ Anope Modules 1. If modules are supported by your system, they will be configured automatically when you run ./Config. The modules will be installed to the modules directory in your data path (by default this will - be ~/services/data/modules). + be ~/anope/data/modules). 2. Compile Anope as usual using ./Config. The "make" process will now compile module support into Anope, and compile the default sample @@ -89,7 +89,7 @@ Anope Modules You can download more useful modules from http://modules.anope.org/. Just grab the module file (usually with a .cpp extension). Place the module - file in your modules (anope-1.9.x/modules/third) folder; although any of + file in your modules (anope-x.x.x/modules/third) folder; although any of the other folders within the modules directory will work. The new modules need to be compiled and installed before you can make @@ -98,7 +98,7 @@ Anope Modules 1. Make sure you're in the main source directory. (usually anope-1.X.XX/) 2. Run ./Config to find and configure modules, then `cd build`. 3. Run `make` to compile Anope, and any modules. - 4. Run `make install` to copy the compiled binaries to the ~/services/ + 4. Run `make install` to copy the compiled binaries to the ~/anope/ directory. You can now use /msg OperServ MODLOAD to load the new modules. diff --git a/docs/NEWS b/docs/NEWS deleted file mode 100644 index 1010816cf..000000000 --- a/docs/NEWS +++ /dev/null @@ -1,7 +0,0 @@ -Highlighted News in Anope 1.9 -============================= - -* Added in live updating SQL and the ability to execute commands through SQL -* Re-designed configuration file -* Code refresh / rewrite into C++ - diff --git a/docs/README b/docs/README index a68647d1a..a9cb6ce98 100644 --- a/docs/README +++ b/docs/README @@ -9,8 +9,6 @@ This program is free but copyrighted software; see the file COPYING for details. Information about Anope may be found at http://www.anope.org/ -Information about Epona may be found at http://www.epona.org/ -Information about Services may be found at http://www.ircservices.esper.net/ Table of Contents ----------------- @@ -171,11 +169,11 @@ Table of Contents * Bahamut 1.4.27 or later (including 1.8) * Charybdis 3.4 or later * Hybrid 8.1 or later - * InspIRCd 1.2 or 2.0 + * InspIRCd 2.0 * ngIRCd 19.2 or later * Plexus 3 or later * Ratbox 2.0.6 or later - * UnrealIRCd 3.2 or 4 + * UnrealIRCd 4 or later Anope could also work with some of the daemons derived by the ones listed above, but there's no support for them if they work or don't work. diff --git a/docs/REDIS b/docs/REDIS deleted file mode 100644 index 54358d16f..000000000 --- a/docs/REDIS +++ /dev/null @@ -1,160 +0,0 @@ -Starting in Anope 1.9.9, Anope has Redis database support (http://redis.io/). -This document explains the data structure used by Anope, and explains how -keyspace notification works. - -This is not a tutorial on how to use Redis, see http://redis.io/documentation -for that. - -Table of Contents ------------------ -1) Data structure -2) Keyspace notifications -3) Examples of modifying, deleting, and creating objects - -1) Data structure - - There are 4 key namespaces in Anope, they are: - - id - The keys in id are used to atomically create object ids for new - objects. For example, if I were to create a new BotInfo I would first: - - redis 127.0.0.1:6379> INCR id:BotInfo - - To get the object ID of the new object. - - ids - The keys in ids contain a set of all object ids of the given type. - For example: - - redis 127.0.0.1:6379> SMEMBERS ids:BotInfo - - Returns "1", "2", "3", "4", "5", "6", "7", "8" because I have 8 bots that - have IDs 1, 2, 3, 4, 5, 6, 7, and 8, respectively. - - hash - The keys in hash are the actual objects, stored as hashes. For - example, if I had just looked up all BotInfo ids and wanted to iterate - over all of them, I woulld start by: - - redis 127.0.0.1:6379> HGETALL hash:BotInfo:1 - - Which gets all keys and values from the hash of type BotInfo with id 1. - This may return: - - "nick" -> "BotServ" - "user" -> "services" - "host" -> "services.anope.org" - "created" -> "1368704765" - - value - The keys in value only exist to aid looking up object IDs. They - are sets of object IDs and are used to map key+value pairs to objects. - For example: - - redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nick:Adam - - Returns a set of object ids of NickAlias objects that have the key - 'nick' set to the value 'Adam' in its hash. Clearly this can only - ever contain at most one object, since it is not possible to have - more than one registered nick with the same name, but other keys - will contain more than one, such as: - - redis 127.0.0.1:6379> SMEMBERS value:NickCore:email:adam@anope.org - - Which would return all accounts with the email "adam@anope.org". - - redis 127.0.0.1:6379> SMEMBERS value:ChanAccess:mask:Adam - - Which would return all access entries set on the account "Adam". - - Behavior similar to SQL's AND, can be achieved using the - SINTER command, which does set intersection on one or more sets. - -2) Keyspace notifications - - Redis 2.7 (unstable) and 2.8 (stable) and newer support keyspace notifications - (http://redis.io/topics/notifications). This allows Redis to notify Anope of - any external changes to objects in the database. Once notified, Anope will - immediately update the object. Otherwise, Anope keeps all objects in memory - and will not regularly read from the databaes once started. - - You can use this to modify objects in Redis and have them immediately reflected - back into Anope. Additionally you can use this feature to run multiple Anope - instances simultaneously from the same database (see also, Redis database - replication). - - To use keyspace notifications you MUST execute - - redis 127.0.0.1:6379> CONFIG SET notify-keyspace-events KA - OK - - or set notify-keyspace-events in redis.conf properly. Anope always executes - CONFIG SET when it first connects. - - If you do not enable keyspace events properly Anope will be UNABLE to see any - object modifications you do. - - The key space ids and value are managed entirely by Anope, you do - not (and should not) modify them. Once you modify the object (hash), Anope will - update them for you to correctly refelect any changes made to the object. - - Finally, always use atomic operations. If you are inserting a new object with - multiple commands, or inserting multiple objects at once, specifically if the - objects depend on each other, you MUST use a transaction. - -3) Examples of modifying, deleting, and creating objects - - These examples will ONLY work if you meet the criteria in section 2. - - If I want to change the email account 'Adam' to 'Adam@anope.org', I would execute the following: - - redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam - - Which returns a value of "1", which is the object id I want to modify. - Now to change the email: - - redis 127.0.0.1:6379> HSET hash:NickCore:1 email Adam@anope.org - - You can now see this in NickServ's INFO command: - -NickServ- Email address: Adam@anope.org - - If I want to drop the account "Adam", I would execute the following: - - redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam - - Which returns a value of "1". I would then check: - - redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nc:Adam - - To see what nicknames depend on this account to exist, as I will - have to remove those too. This returns the values "2", and "3". - - Finally, I can drop the nick using a transaction via: - - redis 127.0.0.1:6379> MULTI - OK - redis 127.0.0.1:6379> DEL hash:NickAlias:2 - QUEUED - redis 127.0.0.1:6379> DEL hash:NickAlias:3 - QUEUED - redis 127.0.0.1:6379> DEL hash:NickCore:1 - QUEUED - redis 127.0.0.1:6379> EXEC - - Or alternatively simply: - - redis 127.0.0.1:6379> DEL hash:NickAlias:2 hash:NickAlias:3 hash:NickCore:1 - - If I wanted to create a BotServ bot, I would execute the following: - - redis 127.0.0.1:6379> INCR id:BotInfo - - Which returns a new object ID for me, in this example it will be "8". - Now I can create the object: - - HMSET hash:BotInfo:8 nick redis user redis host services.anope.org realname "Services for IRC Networks" - - Note if you are using HSET instead of HMSET you will need to use a transaction, as shown in the above example. - If you are watching your services logs you will immediately see: - - USERS: redis!redis@services.anope.org (Services for IRC Networks) connected to the network (services.anope.org) - - And the bot redis will be in BotServ's bot list. - Notice how ids:BotInfo and the value keys are updated automatically. diff --git a/docs/TOOLS b/docs/TOOLS index c8e92fc70..b1132c505 100644 --- a/docs/TOOLS +++ b/docs/TOOLS @@ -1,26 +1,4 @@ Anope Bundled Tools ------------------- -1) Anope SMTP Client - - Provided with Anope is a simple SMTP client which can be used instead of - programs like SendMail in some cases. - - The SMTP client can be used instead of sendmail for use with Anope's mail - options. To use the SMTP client instead of sendmail, find the line in your - services configuration file (services.conf) that defines sendmailpath. On - that line, change the path to your services installation directory, then - followed by "bin/anopesmtp" and the IP address of a valid SMTP server. It - should look like this: - - sendmailpath = "/home/anope/services/bin/anopesmtp 127.0.0.1" - - If the SMTP client doesn't send mail, or if there's an other problem with - it, you can enable debug mode by passing the --debug flag after the server - address. This should generate a log file of what happened when it tried - to connect to the SMTP server. - - Credits: - Originally written by Dominick Meglio <codemastr@unrealircd.com> - Ported to *nix by Trystan Scott Lee <trystan@nomadirc.net> - +XXX anoperc? diff --git a/docs/WIN32.txt b/docs/WIN32.txt index 071831995..9c3ce91f7 100644 --- a/docs/WIN32.txt +++ b/docs/WIN32.txt @@ -103,7 +103,7 @@ Anope for Windows INSTALL within the Solution Explorer. Right-click on INSTALL and choose Build.
When you have done this, all the files will be installed to where they belong.
- The only thing you need to do is rename "data/example.conf" to be "data/services.conf",
+ The only thing you need to do is rename "data/anope.example.conf" to be "data/anope.conf",
and then follow the steps to set up Anope.
You have now completed the building phase of Anope for Windows. You can
@@ -120,7 +120,7 @@ Anope for Windows Notepad will cause strange characters to appear, and you may not be able to
edit the file correctly.
- Open services.conf, and read through it carefully and adjust the settings
+ Open anope.conf, and read through it carefully and adjust the settings
you think you need to adjust.
If you are unsure of the settings, you can go to the dos command prompt
diff --git a/docs/XMLRPC/xmlrpc.php b/docs/XMLRPC/xmlrpc.php index e57a2f145..ba1290b03 100644 --- a/docs/XMLRPC/xmlrpc.php +++ b/docs/XMLRPC/xmlrpc.php @@ -3,7 +3,7 @@ /** * XMLRPC Functions * - * (C) 2003-2016 Anope Team + * (C) 2003-2015 Anope Team * Contact us at team@anope.org */ class AnopeXMLRPC |