From 76ce8ece1a4803c98bfe9460f40bf8e0fbc409e6 Mon Sep 17 00:00:00 2001 From: Robby Date: Tue, 17 Jan 2017 05:03:25 +0100 Subject: Cleanup some excess whitespaces and tabs, and fix a few typos along the way. --- CMakeLists.txt | 6 +-- docs/Changes | 20 ++++---- docs/Changes.conf | 4 +- docs/DEFCON | 37 ++++++++------- docs/EVENTS | 1 - docs/FAQ | 4 +- docs/INSTALL | 6 +-- docs/INSTALL.fr | 12 ++--- docs/MODULES | 2 +- docs/NEWS | 1 - docs/README | 6 +-- docs/REDIS | 2 +- docs/TOOLS | 7 ++- docs/WIN32.txt | 1 - docs/XMLRPC/xmlrpc.php | 2 +- include/account.h | 6 +-- include/anope.h | 4 +- include/language.h | 2 +- include/messages.h | 68 ++++++++++++++-------------- include/modes.h | 2 +- include/modules.h | 4 +- include/modules/dns.h | 8 ++-- include/modules/os_ignore.h | 2 +- include/modules/os_news.h | 6 +-- include/modules/os_session.h | 2 +- include/modules/redis.h | 2 +- include/modules/ssl.h | 2 +- include/modules/xmlrpc.h | 2 +- include/opertype.h | 2 +- include/protocol.h | 2 +- include/pstdint.h | 24 +++++----- include/regchannel.h | 2 +- include/version.cpp | 2 +- modules/CMakeLists.txt | 1 - modules/commands/bs_assign.cpp | 4 +- modules/commands/bs_badwords.cpp | 6 +-- modules/commands/bs_kick.cpp | 16 +++---- modules/commands/cs_access.cpp | 2 +- modules/commands/cs_akick.cpp | 8 ++-- modules/commands/cs_enforce.cpp | 6 +-- modules/commands/cs_entrymsg.cpp | 2 +- modules/commands/cs_flags.cpp | 2 +- modules/commands/cs_list.cpp | 2 +- modules/commands/cs_log.cpp | 2 +- modules/commands/cs_mode.cpp | 14 +++--- modules/commands/cs_seen.cpp | 2 +- modules/commands/cs_set.cpp | 2 +- modules/commands/cs_suspend.cpp | 2 +- modules/commands/cs_topic.cpp | 2 +- modules/commands/cs_updown.cpp | 2 +- modules/commands/cs_xop.cpp | 4 +- modules/commands/greet.cpp | 4 +- modules/commands/help.cpp | 6 +-- modules/commands/hs_group.cpp | 2 +- modules/commands/hs_request.cpp | 4 +- modules/commands/hs_set.cpp | 2 +- modules/commands/ms_rsend.cpp | 2 +- modules/commands/ns_ajoin.cpp | 6 +-- modules/commands/ns_alist.cpp | 2 +- modules/commands/ns_drop.cpp | 2 +- modules/commands/ns_group.cpp | 4 +- modules/commands/ns_list.cpp | 2 +- modules/commands/ns_recover.cpp | 2 +- modules/commands/ns_set.cpp | 4 +- modules/commands/ns_set_misc.cpp | 2 +- modules/commands/os_akill.cpp | 2 +- modules/commands/os_config.cpp | 2 +- modules/commands/os_defcon.cpp | 10 ++-- modules/commands/os_dns.cpp | 14 +++--- modules/commands/os_ignore.cpp | 6 +-- modules/commands/os_info.cpp | 4 +- modules/commands/os_logsearch.cpp | 2 +- modules/commands/os_module.cpp | 2 +- modules/commands/os_news.cpp | 6 +-- modules/commands/os_oper.cpp | 2 +- modules/commands/os_session.cpp | 6 +-- modules/commands/os_set.cpp | 2 +- modules/database/db_flatfile.cpp | 6 +-- modules/database/db_old.cpp | 7 ++- modules/database/db_redis.cpp | 10 ++-- modules/database/db_sql.cpp | 1 - modules/database/db_sql_live.cpp | 3 +- modules/encryption/enc_md5.cpp | 2 +- modules/extra/m_ldap.cpp | 5 +- modules/extra/m_ldap_authentication.cpp | 2 +- modules/extra/m_mysql.cpp | 5 +- modules/extra/m_regex_pcre.cpp | 2 +- modules/extra/m_sqlite.cpp | 3 +- modules/extra/m_ssl_openssl.cpp | 8 ++-- modules/extra/stats/cs_fantasy_stats.cpp | 1 - modules/extra/stats/cs_fantasy_top.cpp | 3 +- modules/extra/stats/irc2sql/CMakeLists.txt | 1 - modules/extra/stats/irc2sql/irc2sql.h | 2 - modules/extra/stats/irc2sql/utils.cpp | 1 - modules/extra/stats/m_chanstats.cpp | 3 +- modules/fantasy.cpp | 9 ++-- modules/m_dns.cpp | 43 +++++++++--------- modules/m_dnsbl.cpp | 1 - modules/m_httpd.cpp | 2 +- modules/m_proxyscan.cpp | 3 +- modules/m_rewrite.cpp | 4 +- modules/m_xmlrpc.cpp | 1 - modules/m_xmlrpc_main.cpp | 3 +- modules/protocol/bahamut.cpp | 4 +- modules/protocol/charybdis.cpp | 8 ++-- modules/protocol/hybrid.cpp | 2 +- modules/protocol/inspircd12.cpp | 4 +- modules/protocol/ngircd.cpp | 10 ++-- modules/protocol/plexus.cpp | 2 +- modules/protocol/ratbox.cpp | 14 +++--- modules/protocol/unreal.cpp | 12 ++--- modules/protocol/unreal4.cpp | 12 ++--- modules/pseudoclients/botserv.cpp | 3 +- modules/pseudoclients/chanserv.cpp | 3 +- modules/pseudoclients/global.cpp | 3 +- modules/pseudoclients/hostserv.cpp | 1 - modules/pseudoclients/memoserv.cpp | 1 - modules/pseudoclients/nickserv.cpp | 3 +- modules/pseudoclients/operserv.cpp | 3 +- modules/webcpanel/CMakeLists.txt | 1 - modules/webcpanel/pages/chanserv/access.cpp | 1 - modules/webcpanel/pages/chanserv/access.h | 1 - modules/webcpanel/pages/chanserv/akick.cpp | 1 - modules/webcpanel/pages/chanserv/akick.h | 1 - modules/webcpanel/pages/chanserv/info.cpp | 1 - modules/webcpanel/pages/chanserv/info.h | 1 - modules/webcpanel/pages/chanserv/modes.cpp | 1 - modules/webcpanel/pages/chanserv/modes.h | 1 - modules/webcpanel/pages/chanserv/set.cpp | 1 - modules/webcpanel/pages/chanserv/set.h | 1 - modules/webcpanel/pages/chanserv/utils.cpp | 1 - modules/webcpanel/pages/chanserv/utils.h | 1 - modules/webcpanel/pages/confirm.cpp | 1 - modules/webcpanel/pages/confirm.h | 1 - modules/webcpanel/pages/hostserv/request.cpp | 4 +- modules/webcpanel/pages/index.cpp | 3 +- modules/webcpanel/pages/index.h | 1 - modules/webcpanel/pages/logout.cpp | 1 - modules/webcpanel/pages/logout.h | 1 - modules/webcpanel/pages/memoserv/memos.cpp | 1 - modules/webcpanel/pages/memoserv/memos.h | 1 - modules/webcpanel/pages/nickserv/access.cpp | 1 - modules/webcpanel/pages/nickserv/access.h | 1 - modules/webcpanel/pages/nickserv/alist.cpp | 3 +- modules/webcpanel/pages/nickserv/alist.h | 1 - modules/webcpanel/pages/nickserv/cert.cpp | 1 - modules/webcpanel/pages/nickserv/cert.h | 1 - modules/webcpanel/pages/nickserv/info.cpp | 3 +- modules/webcpanel/pages/nickserv/info.h | 1 - modules/webcpanel/pages/operserv/akill.cpp | 1 - modules/webcpanel/pages/operserv/akill.h | 1 - modules/webcpanel/pages/register.cpp | 1 - modules/webcpanel/pages/register.h | 1 - modules/webcpanel/static_fileserver.cpp | 3 +- modules/webcpanel/static_fileserver.h | 1 - modules/webcpanel/template_fileserver.cpp | 9 ++-- modules/webcpanel/template_fileserver.h | 1 - modules/webcpanel/webcpanel.cpp | 2 +- src/access.cpp | 11 ++--- src/base.cpp | 1 - src/base64.cpp | 1 - src/bots.cpp | 5 +- src/channels.cpp | 23 +++++----- src/command.cpp | 3 +- src/config.cpp | 15 +++--- src/extensible.cpp | 3 +- src/hashcomp.cpp | 3 +- src/init.cpp | 3 +- src/language.cpp | 1 - src/logger.cpp | 7 ++- src/mail.cpp | 2 +- src/memos.cpp | 3 +- src/messages.cpp | 11 ++--- src/misc.cpp | 3 +- src/modes.cpp | 31 ++++++------- src/module.cpp | 3 +- src/modulemanager.cpp | 25 +++++----- src/nickalias.cpp | 1 - src/nickcore.cpp | 3 +- src/opertype.cpp | 1 - src/pipeengine.cpp | 1 - src/process.cpp | 5 +- src/protocol.cpp | 7 ++- src/regchannel.cpp | 8 ++-- src/serialize.cpp | 1 - src/servers.cpp | 11 ++--- src/socket_clients.cpp | 1 - src/socket_transport.cpp | 5 +- src/socketengines/socketengine_epoll.cpp | 7 ++- src/socketengines/socketengine_kqueue.cpp | 5 +- src/socketengines/socketengine_poll.cpp | 3 +- src/socketengines/socketengine_select.cpp | 3 +- src/sockets.cpp | 3 +- src/timers.cpp | 1 - src/tools/anopesmtp.cpp | 16 +++---- src/users.cpp | 9 ++-- src/version.sh | 1 - src/win32/dir/dir.cpp | 2 +- src/win32/dir/dir.h | 2 +- src/win32/pipe/pipe.cpp | 2 +- src/win32/resource.h | 18 ++++---- src/win32/socket.cpp | 2 +- src/win32/windows.cpp | 10 ++-- src/xline.cpp | 1 - 204 files changed, 442 insertions(+), 550 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a53e3ef5c..dc3bbde9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,20 +45,20 @@ if(MINOR_VERSION GREATER 5) set(CMAKE242_OR_BETTER TRUE) else(MINOR_VERSION GREATER 5) set(CMAKE26_OR_BETTER FALSE) - # Also detect if we are using CMake 2.4.8 or better, the FIND sub-command of list() is non-existent in earlier versions + # Also detect if we are using CMake 2.4.8 or better, the FIND sub-command of list() is nonexistent in earlier versions if(PATCH_VERSION GREATER 7) set(CMAKE248_OR_BETTER TRUE) set(CMAKE244_OR_BETTER TRUE) set(CMAKE242_OR_BETTER TRUE) else(PATCH_VERSION GREATER 7) set(CMAKE248_OR_BETTER FALSE) - # Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module and SORT sub-command of list() are non-existent in earlier versions + # Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module and SORT sub-command of list() are nonexistent in earlier versions if(PATCH_VERSION GREATER 3) set(CMAKE244_OR_BETTER TRUE) set(CMAKE242_OR_BETTER TRUE) else(PATCH_VERSION GREATER 3) set(CMAKE244_OR_BETTER FALSE) - # ALSO detect if we are using CMake 2.4.2 or better, the APPEND sub-command of list() is non-existent in earlier versions + # ALSO detect if we are using CMake 2.4.2 or better, the APPEND sub-command of list() is nonexistent in earlier versions if(PATCH_VERSION GREATER 1) set(CMAKE242_OR_BETTER TRUE) else(PATCH_VERSION GREATER 1) diff --git a/docs/Changes b/docs/Changes index 22e80d4ed..2e42a7b5a 100644 --- a/docs/Changes +++ b/docs/Changes @@ -106,7 +106,7 @@ Anope Version 2.0.0 Added irc2sql stats module Anope Version 1.9.9 --------------------- +------------------- A Added a better webpanel template, removed the old one A Added SQL logging support A Added Redis database support @@ -118,7 +118,7 @@ F Fixed setting BotServ's default settings in the config F Fixed some names of config items, including NickServ's kill protect Anope Version 1.9.8 --------------------- +------------------- A Ability to configure fantasy commands in the config A Add SVSJOIN and SVSPART commands F Fix "leave" channel log level from not logging @@ -130,7 +130,7 @@ F Fix crash in os_forbid with expiring entries F Fix several issues with db_sql_live Anope Version 1.9.7 --------------------- +------------------- A Added ability for using regex as patterns for various commands A Extended ability of operserv/akill to also match against nick and realname A Added chanserv:require configuration option @@ -140,7 +140,7 @@ A Added a web panel A db_sql_live now allows all tables to be "live", not just a select few Anope Version 1.9.6 --------------------- +------------------- A Added ability to configure emails sent by services A Added chanserv/up and chanserv/down A Added m_proxyscan @@ -159,7 +159,7 @@ F Fixed crash in /os oper info F Fixed eventfd Config check to work properly on OpenVZ Anope Version 1.9.5 --------------------- +------------------- A Extended LDAP support A Added os_oper, os_kill, os_forbid, m_statusupdate, cs_sync, and bs_autoassign A Added a new configuration file format @@ -177,7 +177,7 @@ F Fixed setting -P on channels with only a botserv bot in it F Fixed modemanager complaining about prefixless modes on InspIRCd Anope Version 1.9.4 --------------------- +------------------- A Automatically set channel founder to the user with the highest access if there is no successor A /chanserv clone command to copy settings from one channel to another. A /chanserv mode command @@ -198,7 +198,7 @@ F Some failed logic in /operserv exception that prevents proper exceptions from F Fixed the anope_os_sxlines MySQL table and code to work after restarting Anope Version 1.9.3 --------------------- +------------------- A Added italics BotServ kicks support A Tell users when their nicks expire in /ns glist and /ns info A Added SSL support @@ -225,7 +225,7 @@ F Anoperc start/stop to send the globaloncycle global, and fixed anoperc rehash F Fixed a potential crash if HostServ or BotServ was disbled Anope Version 1.9.2 --------------------- +------------------- A K alias to chanserv kick command A KB alias to chanserv ban command A The ability to register empty nonregistered channels @@ -256,7 +256,7 @@ F ms_rsend to really work F SQUITing juped servers on InspIRCd1.2+ Anope Version 1.9.1 --------------------- +------------------- F Don't enforce akick/forbidden/etc.-restrictions on clients on ulined servers. F Remove modules_unload_all fini + hack that goes with it. F Signal handling cleanup. @@ -297,7 +297,7 @@ Provided by Liber - 2009 F Support operoverride and such things (stop reversing changes from nonopped people where unnecessary) Anope Version 1.9.0 --------------------- +------------------- F Modified compile to use g++ F Improve protocol modules support (classes, virtual methods, etc) F Move core services to use BotInfo diff --git a/docs/Changes.conf b/docs/Changes.conf index caf2244d2..6f8c10f2a 100644 --- a/docs/Changes.conf +++ b/docs/Changes.conf @@ -100,7 +100,7 @@ opertype:commands removed operserv/umode operserv:modules removed os_umode Anope Version 1.9.3 ------------------- +------------------- ** ADDED CONFIGURATION DIRECTIVES ** nickserv/auspex privilege added SSL module added for SSL support @@ -134,7 +134,7 @@ networkinfo:logchannel, logbot, logusers, logmaxusers, logchannel, and options:k dumpcore because it really didn't do anything Anope Version 1.9.2 --------------------- +------------------- ** ADDED CONFIGURATION DIRECTIVES ** options:enablelogchannel added to auto turn on the logchannel on startup options:mlock added to configure the default mlock modes on new channels diff --git a/docs/DEFCON b/docs/DEFCON index 85e333491..dbc981df9 100644 --- a/docs/DEFCON +++ b/docs/DEFCON @@ -1,4 +1,4 @@ -Anope DefCon +Anope DefCon ------------ 1) Introduction @@ -11,7 +11,7 @@ Anope DefCon 1) Introduction Anope 1.6 onwards supports a unique protection mechanism based on the - military "Defense Readiness Condition" (DefCon) system. It is based on + military "Defense Readiness Condition" (DefCon) system. It is based on 5 levels of defense readiness defined as: DEFCON5 Normal peacetime readiness @@ -23,9 +23,9 @@ Anope DefCon These are configurable levels that mandates what actions Anope should take in case of emergency and change in readiness status. - It is used to prevent abuse to both Services, and the ircd on which they + It is used to prevent abuse to both Services, and the ircd on which they are running. Also to protect the users, primarily in the event of Clones - and/or FloodBOT attacks. + and/or FloodBOT attacks. 2) Installation @@ -44,26 +44,26 @@ Anope DefCon Pre-defined DefCon actions: - No new channel registrations - No New Nick Registrations + No new channel registrations + No New Nick Registrations No Mode Lock changes - Force Chan Mode - Use Reduced Session Limit - KILL any new clients trying to connect - Services will ignore everyone but opers - Services will silently ignore everyone but opers - AKILL all new clients trying to connect + Force Chan Mode + Use Reduced Session Limit + KILL any new clients trying to connect + Services will ignore everyone but opers + Services will silently ignore everyone but opers + AKILL all new clients trying to connect No new memos sent to block MemoServ attacks - + Information regarding how to enable this for specific defcon levels can be found in operserv.conf 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 + Anope starts up in DEFCON5 (normal readiness). To change the Defcon level + in action use: + + /msg OperServ DEFCON 1|2|3|4|5 5) Usage Example @@ -89,6 +89,5 @@ Anope DefCon 6) Support - You might get DefCon support by posting on our online forum, or maybe on + 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 ba34f0571..54e9c87a5 100644 --- a/docs/EVENTS +++ b/docs/EVENTS @@ -32,4 +32,3 @@ Anope Internal Events The "anope_override" identifier is for compatibility with C++11. Its usage is highly recommended. - diff --git a/docs/FAQ b/docs/FAQ index f0142a2af..64604e073 100644 --- a/docs/FAQ +++ b/docs/FAQ @@ -1,10 +1,10 @@ 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..41196f422 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -60,7 +60,7 @@ Note: You should also read the README and FAQ files! most likely not work! If you need help, you should visit http://forum.anope.org/ or #anope on - irc.anope.org. Provide *complete* error output, along with other relevant + irc.anope.org. Provide *complete* error output, along with other relevant information eg. OS, compiler and C++ library versions. See the README file for more information. @@ -116,8 +116,8 @@ 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 - modify the CONFIGURATION part of the file. Then ensure that the file is + this is ~/services/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 ;)) diff --git a/docs/INSTALL.fr b/docs/INSTALL.fr index f7af3aac8..14f437500 100644 --- a/docs/INSTALL.fr +++ b/docs/INSTALL.fr @@ -12,7 +12,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! 1) Installation d'Anope NOTE IMPORTANTE : il est déconseillé d'utiliser (et même d'installer) - Anope en tant que root. Utilisez un utilisateur non + Anope en tant que root. Utilisez un utilisateur non privilégié. Celui que vous utilisez pour l'IRCd ou un utilisateur dédié suffira. @@ -27,10 +27,10 @@ Note : Vous devrez également lire les fichiers README et FAQ ! cmake --version Si CMake est installé, vous aurez une ligne qui dit quelque chose comme - "cmake version 2.8.12.2". Si la version est inférieure à 2.4 ou si vous + "cmake version 2.8.12.2". Si la version est inférieure à 2.4 ou si vous obtenez une erreur disant que la commande n'a pas été trouvée, vous ne pourrez pas utiliser CMake à moins de l'installer vous-même dans votre - répertoire home. CMake peut être téléchargé ici : + répertoire home. CMake peut être téléchargé ici : http://www.cmake.org/cmake/resources/software.html @@ -50,7 +50,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! Ceci va installer tous les fichiers nécessaires dans les dossiers que vous avez indiqués avec le script Config et régler les permissions des fichiers. Vous devez vous assurer que le répertoire data n'est pas - accessible par les autres utilisateurs, car des utilisateurs + accessible par les autres utilisateurs, car des utilisateurs malveillants pourraient causer des problèmes sur votre réseau, si les mots de passe ne sont pas chiffrés, ou lire les mémos de tous les utilisateurs. @@ -82,7 +82,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! 3) Configuration de l'IRCd - Les Services agissent comme un serveur IRC avec des pseudo-clients. + Les Services agissent comme un serveur IRC avec des pseudo-clients. Pour les relier à votre réseau, vous aurez besoin de configurer votre IRCd pour permettre aux services de se connecter. @@ -106,7 +106,7 @@ Note : Vous devrez également lire les fichiers README et FAQ ! Allez dans le répertoire où les fichiers binaires ont été installés (par défaut, ~/services/bin). Tapez ./services pour lancer Anope. - S'il y a des erreurs de syntaxe dans le fichier de configuration, elles + 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 plus. Un démarrage réussi ne générera pas de message. diff --git a/docs/MODULES b/docs/MODULES index 1699d2c52..34b3e8414 100644 --- a/docs/MODULES +++ b/docs/MODULES @@ -117,7 +117,7 @@ Anope Modules There are a number of useful documents on the Anope Wiki. The Anope Wiki can be reached at: - + * http://wiki.anope.org/ 8) Modules Repository diff --git a/docs/NEWS b/docs/NEWS index 1010816cf..07911e66c 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -4,4 +4,3 @@ 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 248684648..2fdefbe25 100644 --- a/docs/README +++ b/docs/README @@ -111,7 +111,7 @@ Table of Contents * Kein (ru_RU) * Maik Funke (de_DE) * Isaac Fontal (es_ES) - * Janos Kapitany (hu_HU) + * Janos Kapitany (hu_HU) * Szymon S'wierkosz (pl_PL) * Christopher N. (fr_FR) * Yusuf Kurekci (tr_TR) @@ -247,9 +247,9 @@ Table of Contents If you read the documentation carefully, and didn't find the answer to your question, feel free to post on the website forums or join our irc - channel (irc.anope.org #anope). Once you join our Support channel be as + channel (irc.anope.org #anope). Once you join our Support channel be as precise as possible when asking a question, because we have no extraordinary - powers and can't guess things if they aren't provided. + powers and can't guess things if they aren't provided. The more precise you are the sooner you'll be likely to get an answer. diff --git a/docs/REDIS b/docs/REDIS index 54358d16f..5e74dad42 100644 --- a/docs/REDIS +++ b/docs/REDIS @@ -14,7 +14,7 @@ Table of Contents 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: diff --git a/docs/TOOLS b/docs/TOOLS index c8e92fc70..5e8f139cb 100644 --- a/docs/TOOLS +++ b/docs/TOOLS @@ -20,7 +20,6 @@ Anope Bundled Tools 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 - Ported to *nix by Trystan Scott Lee - + Credits: + Originally written by Dominick Meglio + Ported to *nix by Trystan Scott Lee diff --git a/docs/WIN32.txt b/docs/WIN32.txt index 071831995..1abb1b061 100644 --- a/docs/WIN32.txt +++ b/docs/WIN32.txt @@ -159,4 +159,3 @@ Anope for Windows Anope's Windows Installer was made using: * NSIS 2.20 - diff --git a/docs/XMLRPC/xmlrpc.php b/docs/XMLRPC/xmlrpc.php index 51a3ebe9a..6ddb621f8 100644 --- a/docs/XMLRPC/xmlrpc.php +++ b/docs/XMLRPC/xmlrpc.php @@ -114,7 +114,7 @@ class AnopeXMLRPC { return $this->run("channel", [$channel]); } - + /** * Sent a notice to a user. * Returns an array containing channel information, or an array of size one diff --git a/include/account.h b/include/account.h index e4af5fb73..7a0f8a61d 100644 --- a/include/account.h +++ b/include/account.h @@ -25,7 +25,7 @@ extern CoreExport Serialize::Checker NickAliasList; extern CoreExport Serialize::Checker NickCoreList; /* A registered nickname. - * It matters that Base is here before Extensible (it is inherited by Serializable) + * It matters that Base is here before Extensible (it is inherited by Serializable) */ class CoreExport NickAlias : public Serializable, public Extensible { @@ -214,7 +214,7 @@ class CoreExport NickCore : public Serializable, public Extensible * @return The account, if it exists */ static NickCore* Find(const Anope::string &nick); - + void AddChannelReference(ChannelInfo *ci); void RemoveChannelReference(ChannelInfo *ci); void GetChannelReferences(std::deque &queue); @@ -234,7 +234,7 @@ class CoreExport IdentifyRequest std::set holds; bool dispatched; bool success; - + static std::set Requests; protected: diff --git a/include/anope.h b/include/anope.h index 18367a623..cb26f0ce6 100644 --- a/include/anope.h +++ b/include/anope.h @@ -443,13 +443,13 @@ namespace Anope */ extern CoreExport void Unhex(const string &src, string &dest); extern CoreExport void Unhex(const string &src, char *dest, size_t sz); - + /** Base 64 encode a string * @param src The string to encode * @param target Where the encoded string is placed */ extern CoreExport void B64Encode(const string &src, string &target); - + /** Base 64 decode a string * @param src The base64 encoded string * @param target The plain text result diff --git a/include/language.h b/include/language.h index 935f77ee7..a30165d81 100644 --- a/include/language.h +++ b/include/language.h @@ -23,7 +23,7 @@ namespace Language * and we detect a language file exists for at least one of the supported * languages for the module, then we add the module's domain (its name) * here. - * + * * When strings are translated they are checked against all domains. */ extern std::vector Domains; diff --git a/include/messages.h b/include/messages.h index 40a2b363f..3ea70546c 100644 --- a/include/messages.h +++ b/include/messages.h @@ -22,21 +22,21 @@ namespace Message struct CoreExport Away : IRCDMessage { Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Capab : IRCDMessage { Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Error : IRCDMessage { Error(Module *creator, const Anope::string &mname = "ERROR") : IRCDMessage(creator, mname, 1) { } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; @@ -46,15 +46,15 @@ namespace Message void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Join : IRCDMessage { Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; - + typedef std::pair SJoinUser; - + /** Handle a SJOIN. * @param source The source of the SJOIN * @param chan The channel the users are joining to @@ -64,18 +64,18 @@ namespace Message */ static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::list &users); }; - + struct CoreExport Kick : IRCDMessage { Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Kill : IRCDMessage { Kill(Module *creator, const Anope::string &mname = "KILL") : IRCDMessage(creator, mname, 2) { } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; @@ -85,14 +85,14 @@ namespace Message void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport MOTD : IRCDMessage { MOTD(Module *creator, const Anope::string &mname = "MOTD") : IRCDMessage(creator, mname, 1) { } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Notice : IRCDMessage { Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } @@ -103,70 +103,70 @@ namespace Message struct CoreExport Part : IRCDMessage { Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Ping : IRCDMessage { Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Privmsg : IRCDMessage { Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Quit : IRCDMessage { Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport SQuit : IRCDMessage { SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Stats : IRCDMessage { Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Time : IRCDMessage { Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Topic : IRCDMessage { Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Version : IRCDMessage { Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; - + struct CoreExport Whois : IRCDMessage { Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); } - + void Run(MessageSource &source, const std::vector ¶ms) anope_override; }; diff --git a/include/modes.h b/include/modes.h index 9f7ce38b2..0886cb0fd 100644 --- a/include/modes.h +++ b/include/modes.h @@ -197,7 +197,7 @@ class CoreExport ChannelModeStatus : public ChannelMode /** constructor * @param name The mode name * @param mc The mode char - * @param msymbol The symbol for the mode, eg @ % + * @param msymbol The symbol for the mode, eg @ % * @param mlevel A level for the mode, which is usually determined by the PREFIX capab */ ChannelModeStatus(const Anope::string &name, char mc, char msymbol, short mlevel); diff --git a/include/modules.h b/include/modules.h index 068b3ae36..95b02f29a 100644 --- a/include/modules.h +++ b/include/modules.h @@ -72,7 +72,7 @@ /** * This #define allows us to call a method in all * loaded modules in a readable simple way, e.g.: - * + * * FOREACH_MOD(OnUserConnect, (user, exempt)); */ #define FOREACH_MOD(ename, args) \ @@ -104,7 +104,7 @@ else \ * This define is similar to the one above but returns a result. * The first module to return a result other than EVENT_CONTINUE is the value to be accepted, * and any modules after are ignored. This is used like: - * + * * EventReturn MOD_RESULT; * FOREACH_RESULT(OnUserConnect, MOD_RESULT, (user, exempt)); */ diff --git a/include/modules/dns.h b/include/modules/dns.h index 69e92e68b..7e8de8d8a 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -78,11 +78,11 @@ namespace DNS Question() : type(QUERY_NONE), qclass(0) { } Question(const Anope::string &n, QueryType t, unsigned short c = 1) : name(n), type(t), qclass(c) { } - inline bool operator==(const Question & other) const { return name == other.name && type == other.type && qclass == other.qclass; } + inline bool operator==(const Question & other) const { return name == other.name && type == other.type && qclass == other.qclass; } struct hash { - size_t operator()(const Question &q) const + size_t operator()(const Question &q) const { return Anope::hash_ci()(q.name); } @@ -94,7 +94,7 @@ namespace DNS unsigned int ttl; Anope::string rdata; time_t created; - + ResourceRecord(const Anope::string &n, QueryType t, unsigned short c = 1) : Question(n, t, c), ttl(0), created(Anope::CurTime) { } ResourceRecord(const Question &q) : Question(q), ttl(0), created(Anope::CurTime) { } }; @@ -104,7 +104,7 @@ namespace DNS std::vector questions; std::vector answers, authorities, additional; Error error; - + Query() : error(ERROR_NONE) { } Query(const Question &q) : error(ERROR_NONE) { questions.push_back(q); } }; diff --git a/include/modules/os_ignore.h b/include/modules/os_ignore.h index 6d3680abb..3fc83fd41 100644 --- a/include/modules/os_ignore.h +++ b/include/modules/os_ignore.h @@ -25,7 +25,7 @@ class IgnoreService : public Service { protected: IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { } - + public: virtual void AddIgnore(IgnoreData *) = 0; diff --git a/include/modules/os_news.h b/include/modules/os_news.h index c431071eb..3b473bf70 100644 --- a/include/modules/os_news.h +++ b/include/modules/os_news.h @@ -39,11 +39,11 @@ class NewsService : public Service NewsService(Module *m) : Service(m, "NewsService", "news") { } virtual NewsItem *CreateNewsItem() = 0; - + virtual void AddNewsItem(NewsItem *n) = 0; - + virtual void DelNewsItem(NewsItem *n) = 0; - + virtual std::vector &GetNewsList(NewsType t) = 0; }; diff --git a/include/modules/os_session.h b/include/modules/os_session.h index cdb089800..67ad84692 100644 --- a/include/modules/os_session.h +++ b/include/modules/os_session.h @@ -48,7 +48,7 @@ class SessionService : public Service virtual Exception *FindException(User *u) = 0; - virtual Exception *FindException(const Anope::string &host) = 0; + virtual Exception *FindException(const Anope::string &host) = 0; virtual ExceptionVector &GetExceptions() = 0; diff --git a/include/modules/redis.h b/include/modules/redis.h index 4bb62c7c6..fbcecebf7 100644 --- a/include/modules/redis.h +++ b/include/modules/redis.h @@ -23,7 +23,7 @@ namespace Redis Reply() { Clear(); } ~Reply() { Clear(); } - + void Clear() { type = NOT_PARSED; diff --git a/include/modules/ssl.h b/include/modules/ssl.h index 5d3ae2b97..bcda29537 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -10,6 +10,6 @@ class SSLService : public Service { public: SSLService(Module *o, const Anope::string &n) : Service(o, "SSLService", n) { } - + virtual void Init(Socket *s) = 0; }; diff --git a/include/modules/xmlrpc.h b/include/modules/xmlrpc.h index dc1e9d259..0447f9012 100644 --- a/include/modules/xmlrpc.h +++ b/include/modules/xmlrpc.h @@ -17,7 +17,7 @@ class XMLRPCRequest Anope::string id; std::deque data; HTTPReply& r; - + XMLRPCRequest(HTTPReply &_r) : r(_r) { } inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.insert(std::make_pair(dname, ddata)); } inline const std::map &get_replies() { return this->replies; } diff --git a/include/opertype.h b/include/opertype.h index 2490ce727..69ef6885d 100644 --- a/include/opertype.h +++ b/include/opertype.h @@ -33,7 +33,7 @@ struct CoreExport Oper virtual ~Oper(); static std::vector opers; - + /** Find an oper block by name * @param name The name * @return the oper block diff --git a/include/protocol.h b/include/protocol.h index 08d4c304d..635399653 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -195,7 +195,7 @@ class CoreExport IRCDProto : public Service * initial handshake requirements. */ virtual void SendConnect() = 0; - + /** Called right before we begin our burst, after we have handshaked successfully with the uplink. * At this point none of our servers, users, or channels exist on the uplink */ diff --git a/include/pstdint.h b/include/pstdint.h index a8de63fd7..b034ae086 100644 --- a/include/pstdint.h +++ b/include/pstdint.h @@ -5,11 +5,11 @@ * * Copyright (c) 2005-2011 Paul Hsieh * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright @@ -17,7 +17,7 @@ * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. @@ -730,15 +730,15 @@ typedef uint_least32_t uint_fast32_t; #if defined (__TEST_PSTDINT_FOR_CORRECTNESS) -/* +/* * Please compile with the maximum warning settings to make sure macros are not * defined more than once. */ - + #include #include #include - + #define glue3_aux(x,y,z) x ## y ## z #define glue3(x,y,z) glue3_aux(x,y,z) @@ -748,7 +748,7 @@ typedef uint_least32_t uint_fast32_t; #define DECL(us,bits) glue3(DECL,us,) (bits) #define TESTUMAX(bits) glue3(u,bits,=) glue3(~,u,bits); if (glue3(UINT,bits,_MAX) glue3(!=,u,bits)) printf ("Something wrong with UINT%d_MAX\n", bits) - + int main () { DECL(I,8) DECL(U,8) @@ -765,7 +765,7 @@ int main () { char str0[256], str1[256]; sprintf (str0, "%d %x\n", 0, ~0); - + sprintf (str1, "%d %x\n", i8, ~0); if (0 != strcmp (str0, str1)) printf ("Something wrong with i8 : %s\n", str1); sprintf (str1, "%u %x\n", u8, ~0); @@ -773,20 +773,20 @@ int main () { sprintf (str1, "%d %x\n", i16, ~0); if (0 != strcmp (str0, str1)) printf ("Something wrong with i16 : %s\n", str1); sprintf (str1, "%u %x\n", u16, ~0); - if (0 != strcmp (str0, str1)) printf ("Something wrong with u16 : %s\n", str1); + if (0 != strcmp (str0, str1)) printf ("Something wrong with u16 : %s\n", str1); sprintf (str1, "%" PRINTF_INT32_MODIFIER "d %x\n", i32, ~0); if (0 != strcmp (str0, str1)) printf ("Something wrong with i32 : %s\n", str1); sprintf (str1, "%" PRINTF_INT32_MODIFIER "u %x\n", u32, ~0); if (0 != strcmp (str0, str1)) printf ("Something wrong with u32 : %s\n", str1); -#ifdef INT64_MAX +#ifdef INT64_MAX sprintf (str1, "%" PRINTF_INT64_MODIFIER "d %x\n", i64, ~0); if (0 != strcmp (str0, str1)) printf ("Something wrong with i64 : %s\n", str1); #endif sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "d %x\n", imax, ~0); if (0 != strcmp (str0, str1)) printf ("Something wrong with imax : %s\n", str1); sprintf (str1, "%" PRINTF_INTMAX_MODIFIER "u %x\n", umax, ~0); - if (0 != strcmp (str0, str1)) printf ("Something wrong with umax : %s\n", str1); - + if (0 != strcmp (str0, str1)) printf ("Something wrong with umax : %s\n", str1); + TESTUMAX(8); TESTUMAX(16); TESTUMAX(32); diff --git a/include/regchannel.h b/include/regchannel.h index 65186add6..ef6d84fa8 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -231,7 +231,7 @@ class CoreExport ChannelInfo : public Serializable, public Extensible */ Anope::string GetIdealBan(User *u) const; - /** Finds a ChannelInfo + /** Finds a ChannelInfo * @param name channel name to lookup * @return the ChannelInfo associated with the channel */ diff --git a/include/version.cpp b/include/version.cpp index 7b7ff321e..2e712c46f 100644 --- a/include/version.cpp +++ b/include/version.cpp @@ -28,7 +28,7 @@ static std::string get_git_hash(const std::string &git_dir) fd.close(); return ""; } - + fd.close(); filebuf = filebuf.substr(5); diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 02139a0e5..7894b8c11 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -167,4 +167,3 @@ endmacro(build_subdir) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) build_modules(${CMAKE_CURRENT_SOURCE_DIR}) - diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index 1d91d4be6..132b609db 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -173,7 +173,7 @@ class CommandBSSetNoBot : public Command if (value.equals_ci("ON")) { - Log(LOG_ADMIN, source, this, ci) << "to enable nobot"; + Log(LOG_ADMIN, source, this, ci) << "to enable nobot"; ci->Extend("BS_NOBOT"); if (ci->bi) @@ -182,7 +182,7 @@ class CommandBSSetNoBot : public Command } else if (value.equals_ci("OFF")) { - Log(LOG_ADMIN, source, this, ci) << "to disable nobot"; + Log(LOG_ADMIN, source, this, ci) << "to disable nobot"; ci->Shrink("BS_NOBOT"); source.Reply(_("No-bot mode is now \002off\002 on channel %s."), ci->name.c_str()); diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index 31f295832..785c31cdd 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -70,7 +70,7 @@ struct BadWordsImpl : BadWords { if (this->badwords->empty() || index >= this->badwords->size()) return; - + FOREACH_MOD(OnBadWordDel, (ci, (*this->badwords)[index])); delete this->badwords->at(index); @@ -127,7 +127,7 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) unsigned int n; data["type"] >> n; - + BadWordImpl *bw; if (obj) bw = anope_dynamic_static_cast(obj); @@ -140,7 +140,7 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) BadWordsImpl *bws = ci->Require("badwords"); if (!obj) bws->badwords->push_back(bw); - + return bw; } diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index 3a52878c1..9e29762db 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -25,7 +25,7 @@ struct KickerDataImpl : KickerData capsmin = capspercent = 0; floodlines = floodsecs = 0; repeattimes = 0; - + dontkickops = dontkickvoices = false; } @@ -33,7 +33,7 @@ struct KickerDataImpl : KickerData { if (amsgs || badwords || bolds || caps || colors || flood || italics || repeat || reverses || underlines) return; - + ci->Shrink("kickerdata"); } @@ -297,7 +297,7 @@ class CommandBSKickBadwords : public CommandBSKickBase Process(source, ci, params[1], params.size() > 2 ? params[2] : "", TTB_BADWORDS, "badwords", kd, kd->badwords); kd->Check(ci); } - + } bool OnHelp(CommandSource &source, const Anope::string &subcommand) anope_override @@ -818,7 +818,7 @@ class CommandBSSetDontKickOps : public Command if (params[1].equals_ci("ON")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickops"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickops"; kd->dontkickops = true; source.Reply(_("Bot \002won't kick ops\002 on channel %s."), ci->name.c_str()); @@ -826,7 +826,7 @@ class CommandBSSetDontKickOps : public Command else if (params[1].equals_ci("OFF")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickops"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickops"; kd->dontkickops = false; source.Reply(_("Bot \002will kick ops\002 on channel %s."), ci->name.c_str()); @@ -883,7 +883,7 @@ class CommandBSSetDontKickVoices : public Command if (params[1].equals_ci("ON")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickvoices"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable dontkickvoices"; kd->dontkickvoices = true; source.Reply(_("Bot \002won't kick voices\002 on channel %s."), ci->name.c_str()); @@ -891,7 +891,7 @@ class CommandBSSetDontKickVoices : public Command else if (params[1].equals_ci("OFF")) { bool override = !access.HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickvoices"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable dontkickvoices"; kd->dontkickvoices = false; source.Reply(_("Bot \002will kick voices\002 on channel %s."), ci->name.c_str()); @@ -1364,7 +1364,7 @@ class BSKick : public Module else { Anope::string wordbuf = " " + bw->word + " "; - + if ((casesensitive && nbuf.find(wordbuf) != Anope::string::npos) || (!casesensitive && nbuf.find_ci(wordbuf) != Anope::string::npos)) mustkick = true; } diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 9e50428bc..8bc6b9a31 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -437,7 +437,7 @@ class CommandCSAccess : public Command list.Process(replies); source.Reply(_("Access list for %s:"), ci->name.c_str()); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index af2b28449..922ea0b4b 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -58,7 +58,7 @@ class CommandCSAKick : public Command } Entry e("", mask); - + mask = (e.nick.empty() ? "*" : e.nick) + "!" + (e.user.empty() ? "*" : e.user) + "@" + (e.host.empty() ? "*" : e.host); @@ -272,7 +272,7 @@ class CommandCSAKick : public Command { if (!number || number > ci->GetAkickCount()) return; - + const AutoKick *akick = ci->GetAkick(number - 1); Anope::string timebuf, lastused; @@ -347,7 +347,7 @@ class CommandCSAKick : public Command list.Process(replies); source.Reply(_("Autokick list for %s:"), ci->name.c_str()); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); @@ -442,7 +442,7 @@ class CommandCSAKick : public Command } bool is_list = cmd.equals_ci("LIST") || cmd.equals_ci("VIEW"); - + bool has_access = false; if (source.AccessFor(ci).HasPriv("AKICK") || source.HasPriv("chanserv/access/modify")) has_access = true; diff --git a/modules/commands/cs_enforce.cpp b/modules/commands/cs_enforce.cpp index edc709a68..6ebd79990 100644 --- a/modules/commands/cs_enforce.cpp +++ b/modules/commands/cs_enforce.cpp @@ -61,7 +61,7 @@ class CommandCSEnforce : public Command } for (unsigned i = 0; i < users.size(); ++i) - { + { User *user = users[i]; Anope::string mask = ci->GetIdealBan(user); @@ -158,7 +158,7 @@ class CommandCSEnforce : public Command for (unsigned i = 0; i < users.size(); ++i) { User *user = users[i]; - + Anope::string reason = Language::Translate(user, _("BANS enforced by ")) + source.GetNick(); ci->c->Kick(NULL, user, "%s", reason.c_str()); } @@ -213,7 +213,7 @@ class CommandCSEnforce : public Command for (unsigned i = 0; i < users.size(); ++i) { User *user = users[i]; - + Anope::string reason = Language::Translate(user, _("LIMIT enforced by ")) + source.GetNick(); ci->c->Kick(NULL, user, "%s", reason.c_str()); } diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index aed56b38a..05afc8a7a 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -133,7 +133,7 @@ class CommandEntryMessage : public Command source.Reply(_("End of entry message list.")); } - + void DoAdd(CommandSource &source, ChannelInfo *ci, const Anope::string &message) { EntryMessageList *messages = ci->Require("entrymsg"); diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index f253c4d1a..14a7df744 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -45,7 +45,7 @@ class FlagsChanAccess : public ChanAccess { if (access->provider->name == "access/flags") return access->AccessSerialize(); - + std::set buffer; for (std::map::iterator it = defaultFlags.begin(), it_end = defaultFlags.end(); it != it_end; ++it) diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp index f1216de0c..db47d6e9e 100644 --- a/modules/commands/cs_list.cpp +++ b/modules/commands/cs_list.cpp @@ -230,7 +230,7 @@ class CommandCSSetPrivate : public Command this->SendSyntax(source); source.Reply(" "); source.Reply(_("Enables or disables the \002private\002 option for a channel.")); - + BotInfo *bi; Anope::string cmd; if (Command::FindCommandFromService("chanserv/list", bi, cmd)) diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index 91da629d5..9a0548d1b 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -53,7 +53,7 @@ struct LogSettingImpl : LogSetting, Serializable ChannelInfo *ci = ChannelInfo::Find(sci); if (ci == NULL) return NULL; - + LogSettingImpl *ls; if (obj) ls = anope_dynamic_static_cast(obj); diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index 4f177a771..e2aac8d61 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -222,13 +222,13 @@ void ModeLockImpl::Serialize(Serialize::Data &data) const Serializable* ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string sci; - + data["ci"] >> sci; ChannelInfo *ci = ChannelInfo::Find(sci); if (!ci) return NULL; - + ModeLockImpl *ml; if (obj) ml = anope_dynamic_static_cast(obj); @@ -475,7 +475,7 @@ class CommandCSMode : public Command else this->OnSyntaxError(source, subcommand); } - + void DoSet(CommandSource &source, ChannelInfo *ci, const std::vector ¶ms) { User *u = source.GetUser(); @@ -832,7 +832,7 @@ class CommandCSModes : public Command source.Reply(ACCESS_DENIED); return; } - + if (u == targ ? !u_access.HasPriv(m.second + "ME") : !u_access.HasPriv(m.second)) { if (!can_override) @@ -929,7 +929,7 @@ class CSMode : public Module for (int i = 0; i < conf->CountBlock("command"); ++i) { Configuration::Block *block = conf->GetBlock("command", i); - + const Anope::string &cname = block->Get("name"), &cmd = block->Get("command"); @@ -938,7 +938,7 @@ class CSMode : public Module const Anope::string &set = block->Get("set"), &unset = block->Get("unset"); - + if (set.empty() && unset.empty()) continue; @@ -983,7 +983,7 @@ class CSMode : public Module if (c->HasMode(cm->name)) c->RemoveMode(NULL, cm, "", false); } - + } else if (cm->type == MODE_LIST || cm->type == MODE_STATUS) { diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 1eedabce9..54c0676c8 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -57,7 +57,7 @@ struct SeenInfo : Serializable static Serializable* Unserialize(Serializable *obj, Serialize::Data &data) { Anope::string snick; - + data["nick"] >> snick; SeenInfo *s; diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index 266fa361f..c8b7941a6 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -1312,7 +1312,7 @@ class CSSet : public Module { if (chan->ci) { - if (noautoop.HasExt(chan->ci)) + if (noautoop.HasExt(chan->ci)) give_modes = false; if (secureops.HasExt(chan->ci) && !user->HasPriv("chanserv/administration")) // This overrides what chanserv does because it is loaded after chanserv diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index 87df57610..538f9aba3 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -54,7 +54,7 @@ class CommandCSSuspend : public Command { public: CommandCSSuspend(Module *creator) : Command(creator, "chanserv/suspend", 2, 3) - { + { this->SetDesc(_("Prevent a channel from being used preserving channel data and settings")); this->SetSyntax(_("\037channel\037 [+\037expiry\037] [\037reason\037]")); } diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp index b0568c017..3bb82c9c8 100644 --- a/modules/commands/cs_topic.cpp +++ b/modules/commands/cs_topic.cpp @@ -121,7 +121,7 @@ class CommandCSTopic : public Command ci->c->ChangeTopic(source.GetNick(), topic, Anope::CurTime); if (has_topiclock) topiclock->Set(ci); - + bool override = !source.AccessFor(ci).HasPriv("TOPIC"); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << (!topic.empty() ? "to change the topic to: " : "to unset the topic") << (!topic.empty() ? topic : ""); } diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp index 41892059d..61bbacd7d 100644 --- a/modules/commands/cs_updown.cpp +++ b/modules/commands/cs_updown.cpp @@ -166,7 +166,7 @@ class CommandCSDown : public Command const Anope::string &nick = params.size() > 1 ? params[1] : source.GetNick(); Channel *c = Channel::Find(channel); - + if (c == NULL) { source.Reply(CHAN_X_NOT_IN_USE, channel.c_str()); diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 3df3fa527..e71a3bbf3 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -349,7 +349,7 @@ class CommandCSXOP : public Command return; } } - + source.Reply(_("\002%s\002 not found on %s %s list."), mask.c_str(), ci->name.c_str(), source.command.c_str()); } } @@ -466,7 +466,7 @@ class CommandCSXOP : public Command if (access->provider->name != "access/xop" || source.command.upper() != access->AccessSerialize()) continue; - + delete ci->EraseAccess(i - 1); } diff --git a/modules/commands/greet.cpp b/modules/commands/greet.cpp index c6270119f..4d454d08b 100644 --- a/modules/commands/greet.cpp +++ b/modules/commands/greet.cpp @@ -46,7 +46,7 @@ class CommandBSSetGreet : public Command if (value.equals_ci("ON")) { bool override = !source.AccessFor(ci).HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable greets"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable greets"; ci->Extend("BS_GREET"); source.Reply(_("Greet mode is now \002on\002 on channel %s."), ci->name.c_str()); @@ -54,7 +54,7 @@ class CommandBSSetGreet : public Command else if (value.equals_ci("OFF")) { bool override = !source.AccessFor(ci).HasPriv("SET"); - Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable greets"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable greets"; ci->Shrink("BS_GREET"); source.Reply(_("Greet mode is now \002off\002 on channel %s."), ci->name.c_str()); diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp index 9f28c54da..bd8647e2e 100644 --- a/modules/commands/help.cpp +++ b/modules/commands/help.cpp @@ -40,7 +40,7 @@ class CommandHelp : public Command FOREACH_RESULT(OnPreHelp, MOD_RESULT, (source, params)); if (MOD_RESULT == EVENT_STOP) return; - + Anope::string source_command = source.command; const BotInfo *bi = source.service; const CommandInfo::map &map = source.c ? Config->Fantasy : bi->commands; @@ -149,7 +149,7 @@ class CommandHelp : public Command if (hide_privileged_commands && !info.permission.empty() && !source.HasCommand(info.permission)) continue; - + // Allow unregistered users to see help for commands that they explicitly request help for const Anope::string &subcommand = params.size() > max ? params[max] : ""; @@ -183,7 +183,7 @@ class CommandHelp : public Command if (helped == false) source.Reply(_("No help available for \002%s\002."), params[0].c_str()); } - + FOREACH_MOD(OnPostHelp, (source, params)); return; diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp index 0c9cbfdd4..46ebd39c6 100644 --- a/modules/commands/hs_group.cpp +++ b/modules/commands/hs_group.cpp @@ -24,7 +24,7 @@ class CommandHSGroup : public Command if (!na || !na->HasVhost()) return; - setting = true; + setting = true; for (unsigned i = 0; i < na->nc->aliases->size(); ++i) { NickAlias *nick = na->nc->aliases->at(i); diff --git a/modules/commands/hs_request.cpp b/modules/commands/hs_request.cpp index c44b8daf2..a03a7f655 100644 --- a/modules/commands/hs_request.cpp +++ b/modules/commands/hs_request.cpp @@ -102,7 +102,7 @@ class CommandHSRequest : public Command } Anope::string rawhostmask = params[0]; - + Anope::string user, host; size_t a = rawhostmask.find('@'); @@ -380,7 +380,7 @@ static void req_send_memos(Module *me, CommandSource &source, const Anope::strin for (unsigned i = 0; i < Oper::opers.size(); ++i) { Oper *o = Oper::opers[i]; - + const NickAlias *na = NickAlias::Find(o->name); if (!na) continue; diff --git a/modules/commands/hs_set.cpp b/modules/commands/hs_set.cpp index e9349287d..0b6afda4b 100644 --- a/modules/commands/hs_set.cpp +++ b/modules/commands/hs_set.cpp @@ -110,7 +110,7 @@ class CommandHSSetAll : public Command { if (!na || !na->HasVhost()) return; - + for (unsigned i = 0; i < na->nc->aliases->size(); ++i) { NickAlias *nick = na->nc->aliases->at(i); diff --git a/modules/commands/ms_rsend.cpp b/modules/commands/ms_rsend.cpp index 61e1d5695..9b16eae0d 100644 --- a/modules/commands/ms_rsend.cpp +++ b/modules/commands/ms_rsend.cpp @@ -58,7 +58,7 @@ class CommandMSRSend : public Command source.Reply(_("Please wait %d seconds before using the %s command again."), Config->GetModule("memoserv")->Get("senddelay"), source.command.c_str()); else if (result == MemoServService::MEMO_TARGET_FULL) source.Reply(_("Sorry, %s currently has too many memos and cannot receive more."), nick.c_str()); - else + else { source.Reply(_("Memo sent to \002%s\002."), nick.c_str()); diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index baa77a46e..08687f325 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -197,7 +197,7 @@ class CommandNSAJoin : public Command for (; i < (*channels)->size();