diff options
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 <Liber@jasonirc.net> - 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. - @@ -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 @@ -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 <kein-of@yandex.ru> (ru_RU) * Maik Funke <Han@mefalcon.org> (de_DE) * Isaac Fontal <i_fontal@hotmail.com> (es_ES) - * Janos Kapitany <sarkanyka@cjbchat.hu> (hu_HU) + * Janos Kapitany <sarkanyka@cjbchat.hu> (hu_HU) * Szymon S'wierkosz <szymek@adres.pl> (pl_PL) * Christopher N. <saka@epiknet.org> (fr_FR) * Yusuf Kurekci <ysfm.20@gmail.com> (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 <codemastr@unrealircd.com> - Ported to *nix by Trystan Scott Lee <trystan@nomadirc.net> - + Credits: + Originally written by Dominick Meglio <codemastr@unrealircd.com> + Ported to *nix by Trystan Scott Lee <trystan@nomadirc.net> 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 <http://nsis.sourceforge.net>
-
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<nickalias_map> NickAliasList; extern CoreExport Serialize::Checker<nickcore_map> 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<ChannelInfo *> &queue); @@ -234,7 +234,7 @@ class CoreExport IdentifyRequest std::set<Module *> holds; bool dispatched; bool success; - + static std::set<IdentifyRequest *> 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<Anope::string> 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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶ms) anope_override; }; @@ -46,15 +46,15 @@ namespace Message void Run(MessageSource &source, const std::vector<Anope::string> ¶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<Anope::string> ¶ms) anope_override; - + typedef std::pair<ChannelStatus, User *> 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<SJoinUser> &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<Anope::string> ¶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<Anope::string> ¶ms) anope_override; }; @@ -85,14 +85,14 @@ namespace Message void Run(MessageSource &source, const std::vector<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Anope::string> ¶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<Question> questions; std::vector<ResourceRecord> 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<NewsItem *> &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<Anope::string> 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<Anope::string, Anope::string> &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<Oper *> 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 <stdlib.h>
#include <stdio.h>
#include <string.h>
-
+
#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<bool>("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<bool>("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<BadWordImpl *>(obj); @@ -140,7 +140,7 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) BadWordsImpl *bws = ci->Require<BadWordsImpl>("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>("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<EntryMessageList>("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<char> buffer; for (std::map<Anope::string, char>::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<LogSettingImpl *>(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<ModeLockImpl *>(obj); @@ -475,7 +475,7 @@ class CommandCSMode : public Command else this->OnSyntaxError(source, subcommand); } - + void DoSet(CommandSource &source, ChannelInfo *ci, const std::vector<Anope::string> ¶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<const Anope::string>("name"), &cmd = block->Get<const Anope::string>("command"); @@ -938,7 +938,7 @@ class CSMode : public Module const Anope::string &set = block->Get<const Anope::string>("set"), &unset = block->Get<const Anope::string>("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<bool>("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<bool>("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<time_t>("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(); ++i) if ((*channels)->at(i)->channel.equals_ci(chan)) break; - + if (i == (*channels)->size()) notfoundchans += chan + ", "; else @@ -341,7 +341,7 @@ class NSAJoin : public Module bool need_invite = false; Anope::string key = entry->key; AccessGroup u_access; - + if (ci != NULL) { if (ci->HasExt("CS_SUSPENDED")) @@ -362,7 +362,7 @@ class NSAJoin : public Module need_invite = true; else if (c->HasMode("INVITE") && c->MatchesList(u, "INVITEOVERRIDE") == false) need_invite = true; - + if (c->HasMode("KEY")) { Anope::string k; diff --git a/modules/commands/ns_alist.cpp b/modules/commands/ns_alist.cpp index 95dadcb96..cfbff2026 100644 --- a/modules/commands/ns_alist.cpp +++ b/modules/commands/ns_alist.cpp @@ -81,7 +81,7 @@ class CommandNSAList : public Command AccessGroup access = ci->AccessFor(nc, false); if (access.empty()) continue; - + ++chan_count; entry["Number"] = stringify(chan_count); diff --git a/modules/commands/ns_drop.cpp b/modules/commands/ns_drop.cpp index 71ebc0e2e..8f0f506a8 100644 --- a/modules/commands/ns_drop.cpp +++ b/modules/commands/ns_drop.cpp @@ -65,7 +65,7 @@ class CommandNSDrop : public Command if (!source.HasPriv("nickserv/drop")) source.Reply(_("You may drop any nick within your group.")); else - source.Reply(_("As a Services Operator, you may drop any nick.")); + source.Reply(_("As a Services Operator, you may drop any nick.")); return true; } diff --git a/modules/commands/ns_group.cpp b/modules/commands/ns_group.cpp index 57a239daa..acd85996c 100644 --- a/modules/commands/ns_group.cpp +++ b/modules/commands/ns_group.cpp @@ -18,7 +18,7 @@ class NSGroupRequest : public IdentifyRequest Command *cmd; Anope::string nick; Reference<NickAlias> target; - + public: NSGroupRequest(Module *o, CommandSource &src, Command *c, const Anope::string &n, NickAlias *targ, const Anope::string &pass) : IdentifyRequest(o, targ->nc->display, pass), source(src), cmd(c), nick(n), target(targ) { } @@ -335,7 +335,7 @@ class CommandNSGList : public Command source.Reply(!nick.empty() ? _("List of nicknames in the group of \002%s\002:") : _("List of nicknames in your group:"), nc->display.c_str()); std::vector<Anope::string> replies; list.Process(replies); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); diff --git a/modules/commands/ns_list.cpp b/modules/commands/ns_list.cpp index b6babb87f..158da68e8 100644 --- a/modules/commands/ns_list.cpp +++ b/modules/commands/ns_list.cpp @@ -119,7 +119,7 @@ class CommandNSList : public Command ++count; } } - + source.Reply(_("List of entries matching \002%s\002:"), pattern.c_str()); std::vector<Anope::string> replies; diff --git a/modules/commands/ns_recover.cpp b/modules/commands/ns_recover.cpp index 9da3be43f..a78c8dccd 100644 --- a/modules/commands/ns_recover.cpp +++ b/modules/commands/ns_recover.cpp @@ -28,7 +28,7 @@ class NSRecoverRequest : public IdentifyRequest CommandSource source; Command *cmd; Anope::string user; - + public: NSRecoverRequest(Module *o, CommandSource &src, Command *c, const Anope::string &nick, const Anope::string &pass) : IdentifyRequest(o, nick, pass), source(src), cmd(c), user(nick) { } diff --git a/modules/commands/ns_set.cpp b/modules/commands/ns_set.cpp index 28b5e99cc..dc007289e 100644 --- a/modules/commands/ns_set.cpp +++ b/modules/commands/ns_set.cpp @@ -416,7 +416,7 @@ class CommandNSSetEmail : public Command static bool SendConfirmMail(User *u, NickCore *nc, BotInfo *bi, const Anope::string &new_email) { Anope::string code = Anope::Random(9); - + std::pair<Anope::string, Anope::string> *n = nc->Extend<std::pair<Anope::string, Anope::string> >("ns_set_email"); n->first = new_email; n->second = code; @@ -1176,7 +1176,7 @@ class NSSet : public Module SerializableExtensibleItem<bool> autoop, killprotect, kill_quick, kill_immed, message, secure, noexpire; - + struct KeepModes : SerializableExtensibleItem<bool> { KeepModes(Module *m, const Anope::string &n) : SerializableExtensibleItem<bool>(m, n) { } diff --git a/modules/commands/ns_set_misc.cpp b/modules/commands/ns_set_misc.cpp index 8325e6c57..7ee7cf0f5 100644 --- a/modules/commands/ns_set_misc.cpp +++ b/modules/commands/ns_set_misc.cpp @@ -201,7 +201,7 @@ class NSSetMisc : public Module for (int i = 0; i < conf->CountBlock("command"); ++i) { Configuration::Block *block = conf->GetBlock("command", i); - + const Anope::string &cmd = block->Get<const Anope::string>("command"); if (cmd != "nickserv/set/misc" && cmd != "nickserv/saset/misc") diff --git a/modules/commands/os_akill.cpp b/modules/commands/os_akill.cpp index b959fd9a0..0b3e34a90 100644 --- a/modules/commands/os_akill.cpp +++ b/modules/commands/os_akill.cpp @@ -321,7 +321,7 @@ class CommandOSAKill : public Command else { source.Reply(_("Current AKILL list:")); - + std::vector<Anope::string> replies; list.Process(replies); diff --git a/modules/commands/os_config.cpp b/modules/commands/os_config.cpp index 3402a2f99..2fb6be63a 100644 --- a/modules/commands/os_config.cpp +++ b/modules/commands/os_config.cpp @@ -53,7 +53,7 @@ class CommandOSConfig : public Command const Anope::string show_blocks[] = { "serverinfo", "networkinfo", "options", "" }; Log(LOG_ADMIN, source, this) << "VIEW"; - + for (unsigned i = 0; !show_blocks[i].empty(); ++i) { Configuration::Block *block = Config->GetBlock(show_blocks[i]); diff --git a/modules/commands/os_defcon.cpp b/modules/commands/os_defcon.cpp index 5ad413784..f1dd94e9f 100644 --- a/modules/commands/os_defcon.cpp +++ b/modules/commands/os_defcon.cpp @@ -79,19 +79,19 @@ struct DefconConfig { DefConModesOnParams.erase(name); } - + bool GetDefConParam(const Anope::string &name, Anope::string &buf) { std::map<Anope::string, Anope::string>::iterator it = DefConModesOnParams.find(name); - + buf.clear(); - + if (it != DefConModesOnParams.end()) { buf = it->second; return true; } - + return false; } }; @@ -324,7 +324,7 @@ class OSDefcon : public Module if ((cm = ModeManager::FindChannelModeByName("REDIRECT")) && DConfig.DefConModesOn.count(cm->name) && !DConfig.DefConModesOn.count("LIMIT")) { DConfig.DefConModesOn.erase("REDIRECT"); - + Log(this) << "DefConChanModes must lock mode +l as well to lock mode +L"; } } diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp index 829e79f40..7dad85d56 100644 --- a/modules/commands/os_dns.cpp +++ b/modules/commands/os_dns.cpp @@ -424,7 +424,7 @@ class CommandOSDNS : public Command { DNSServer *s = DNSServer::Find(params[1]); const Anope::string &zone = params.size() > 2 ? params[2] : ""; - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -487,7 +487,7 @@ class CommandOSDNS : public Command void AddIP(CommandSource &source, const std::vector<Anope::string> ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -522,11 +522,11 @@ class CommandOSDNS : public Command dnsmanager->Notify(*it); } } - + void DelIP(CommandSource &source, const std::vector<Anope::string> ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -565,7 +565,7 @@ class CommandOSDNS : public Command void OnSet(CommandSource &source, const std::vector<Anope::string> ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -598,7 +598,7 @@ class CommandOSDNS : public Command void OnPool(CommandSource &source, const std::vector<Anope::string> ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); @@ -633,7 +633,7 @@ class CommandOSDNS : public Command void OnDepool(CommandSource &source, const std::vector<Anope::string> ¶ms) { DNSServer *s = DNSServer::Find(params[1]); - + if (!s) { source.Reply(_("Server %s does not exist."), params[1].c_str()); diff --git a/modules/commands/os_ignore.cpp b/modules/commands/os_ignore.cpp index 667ced438..18d496f90 100644 --- a/modules/commands/os_ignore.cpp +++ b/modules/commands/os_ignore.cpp @@ -38,7 +38,7 @@ Serializable* IgnoreDataImpl::Unserialize(Serializable *obj, Serialize::Data &da { if (!ignore_service) return NULL; - + IgnoreDataImpl *ign; if (obj) ign = anope_dynamic_static_cast<IgnoreDataImpl *>(obj); @@ -94,7 +94,7 @@ class OSIgnoreService : public IgnoreService { User *u = User::Find(mask, true); std::vector<IgnoreData *>::iterator ign = this->ignores->begin(), ign_end = this->ignores->end(); - + if (u) { for (; ign != ign_end; ++ign) @@ -163,7 +163,7 @@ class CommandOSIgnore : public Command User *u = User::Find(mask, true); if (u) return "*!*@" + u->host; - + size_t host = mask.find('@'); /* Determine whether we get a nick or a mask. */ if (host != Anope::string::npos) diff --git a/modules/commands/os_info.cpp b/modules/commands/os_info.cpp index 3897c34d9..674160f31 100644 --- a/modules/commands/os_info.cpp +++ b/modules/commands/os_info.cpp @@ -18,7 +18,7 @@ struct OperInfo : Serializable OperInfo() : Serializable("OperInfo"), created(0) { } OperInfo(const Anope::string &t, const Anope::string &i, const Anope::string &a, time_t c) : Serializable("OperInfo"), target(t), info(i), adder(a), created(c) { } - + ~OperInfo(); void Serialize(Serialize::Data &data) const anope_override @@ -74,7 +74,7 @@ Serializable *OperInfo::Unserialize(Serializable *obj, Serialize::Data &data) Extensible *e = OperInfos::Find(starget); if (!e) return NULL; - + OperInfos *oi = e->Require<OperInfos>("operinfo"); OperInfo *o; if (obj) diff --git a/modules/commands/os_logsearch.cpp b/modules/commands/os_logsearch.cpp index d009036b0..59959b482 100644 --- a/modules/commands/os_logsearch.cpp +++ b/modules/commands/os_logsearch.cpp @@ -20,7 +20,7 @@ class CommandOSLogSearch : public Command char timestamp[32]; tm *tm = localtime(&t); - + strftime(timestamp, sizeof(timestamp), "%Y%m%d", tm); return Anope::LogDir + "/" + file + "." + timestamp; diff --git a/modules/commands/os_module.cpp b/modules/commands/os_module.cpp index 4036c7edc..52401b545 100644 --- a/modules/commands/os_module.cpp +++ b/modules/commands/os_module.cpp @@ -139,7 +139,7 @@ class CommandOSModUnLoad : public Command source.Reply(_("Module \002%s\002 isn't loaded."), mname.c_str()); return; } - + if (!m->handle || m->GetPermanent() || m->type == PROTOCOL) { source.Reply(_("Unable to remove module \002%s\002."), m->name.c_str()); diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp index 22f31c8cc..5a47fe5ee 100644 --- a/modules/commands/os_news.cpp +++ b/modules/commands/os_news.cpp @@ -115,7 +115,7 @@ class MyNewsService : public NewsService { this->newsItems[n->type].push_back(n); } - + void DelNewsItem(NewsItem *n) { std::vector<NewsItem *> &list = this->GetNewsList(n->type); @@ -259,7 +259,7 @@ class NewsBase : public Command const char **msgs = findmsgs(ntype); if (!msgs) - throw CoreException("news: Invalid type to do_news()"); + throw CoreException("news: Invalid type to DoNews()"); if (cmd.equals_ci("LIST")) return this->DoList(source, ntype, msgs); @@ -404,7 +404,7 @@ class OSNews : public Module msg = _("[\002Random News\002 - %s] %s"); int start = 0; - + if (Type != NEWS_RANDOM) { start = newsList.size() - news_count; diff --git a/modules/commands/os_oper.cpp b/modules/commands/os_oper.cpp index e2871cab9..589441454 100644 --- a/modules/commands/os_oper.cpp +++ b/modules/commands/os_oper.cpp @@ -186,7 +186,7 @@ class CommandOSOper : public Command if (params.size() > 2) fulltype += " " + params[2]; OperType *ot = OperType::Find(fulltype); - if (ot == NULL) + if (ot == NULL) source.Reply(_("Oper type \002%s\002 has not been configured."), fulltype.c_str()); else { diff --git a/modules/commands/os_session.cpp b/modules/commands/os_session.cpp index 6bb717133..037310b4a 100644 --- a/modules/commands/os_session.cpp +++ b/modules/commands/os_session.cpp @@ -66,7 +66,7 @@ class MySessionService : public SessionService Exception *e = *it; if (Anope::Match(u->host, e->mask) || Anope::Match(u->ip.addr(), e->mask)) return e; - + if (cidr(e->mask).match(u->ip)) return e; } @@ -209,7 +209,7 @@ class CommandOSSession : public Command std::vector<Anope::string> replies; list.Process(replies); - + for (unsigned i = 0; i < replies.size(); ++i) source.Reply(replies[i]); } @@ -491,7 +491,7 @@ class CommandOSException : public Command else { source.Reply(_("Current Session Limit Exception list:")); - + std::vector<Anope::string> replies; list.Process(replies); diff --git a/modules/commands/os_set.cpp b/modules/commands/os_set.cpp index 846e24dc5..9ce9dafe4 100644 --- a/modules/commands/os_set.cpp +++ b/modules/commands/os_set.cpp @@ -129,7 +129,7 @@ class CommandOSSet : public Command return; } catch (const ConvertException &) { } - + source.Reply(_("Setting for DEBUG must be \002ON\002, \002OFF\002, or a positive number.")); } diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 3b9b8c3c4..fff1e7b59 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -94,7 +94,7 @@ class LoadData : public Serialize::Data hash ^= Anope::hash_cs()(it->second); return hash; } - + void Reset() { id = 0; @@ -247,7 +247,7 @@ class DBFlatFile : public Module, public Pipe Serialize::Type *stype = Serialize::Type::Find(type_order[i]); if (!stype || stype->GetOwner()) continue; - + std::vector<std::streampos> &pos = positions[stype->GetName()]; for (unsigned j = 0; j < pos.size(); ++j) @@ -411,5 +411,3 @@ class DBFlatFile : public Module, public Pipe }; MODULE_INIT(DBFlatFile) - - diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp index dc1060abc..55b6bedc7 100644 --- a/modules/database/db_old.cpp +++ b/modules/database/db_old.cpp @@ -689,7 +689,7 @@ static void LoadVHosts() NickAlias *na = NickAlias::Find(nick); if (na == NULL) { - Log() << "Removing vhost for non-existent nick " << nick; + Log() << "Removing vhost for nonexistent nick " << nick; continue; } @@ -858,7 +858,7 @@ static void LoadChannels() if (in_use) { ChanAccess *access = NULL; - + if (xop) { if (provider_xop) @@ -1214,7 +1214,7 @@ static void LoadExceptions() dbFILE *f = open_db_read("OperServ", "exception.db", 9); if (f == NULL) return; - + int16_t num; READ(read_int16(&num, f)); for (int i = 0; i < num; ++i) @@ -1358,4 +1358,3 @@ class DBOld : public Module }; MODULE_INIT(DBOld) - diff --git a/modules/database/db_redis.cpp b/modules/database/db_redis.cpp index b51fa5d0e..5dfb6accf 100644 --- a/modules/database/db_redis.cpp +++ b/modules/database/db_redis.cpp @@ -201,7 +201,7 @@ class DatabaseRedis : public Module, public Pipe std::vector<Anope::string> args; args.push_back("SMEMBERS"); args.push_back("ids:" + sb->GetName()); - + redis->SendCommand(new TypeLoader(this, sb->GetName()), args); } @@ -456,14 +456,14 @@ void SubscriptionListener::OnResult(const Reply &r) */ if (r.multi_bulk.size() != 4) return; - + size_t sz = r.multi_bulk[2]->bulk.find(':'); if (sz == Anope::string::npos) return; - + const Anope::string &key = r.multi_bulk[2]->bulk.substr(sz + 1), &op = r.multi_bulk[3]->bulk; - + sz = key.rfind(':'); if (sz == Anope::string::npos) return; @@ -479,7 +479,7 @@ void SubscriptionListener::OnResult(const Reply &r) if (s_type == NULL) return; - + uint64_t obj_id; try { diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index 32c261b23..377c4cd30 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -266,4 +266,3 @@ class DBSQL : public Module, public Pipe }; MODULE_INIT(DBSQL) - diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index f82db6d52..538ff0a64 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -157,7 +157,7 @@ class DBMySQL : public Module, public Pipe void OnSerializableDestruct(Serializable *obj) anope_override { - if (!this->CheckInit()) + if (!this->CheckInit()) return; Serialize::Type *s_type = obj->GetSerializableType(); if (s_type) @@ -262,4 +262,3 @@ class DBMySQL : public Module, public Pipe }; MODULE_INIT(DBMySQL) - diff --git a/modules/encryption/enc_md5.cpp b/modules/encryption/enc_md5.cpp index 88252dbee..b9667d597 100644 --- a/modules/encryption/enc_md5.cpp +++ b/modules/encryption/enc_md5.cpp @@ -284,7 +284,7 @@ class MD5Context : public Encryption::Context /* MD5 finalization. Ends an MD5 message-digest opera * the message digest and zeroizing the context. - */ + */ void Finalize() anope_override { unsigned char bits[8]; diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index a98b786fc..a8a4ba38c 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -269,7 +269,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition ldap_unbind_ext(this->con, NULL, NULL); } - + void BindAsAdmin(LDAPInterface *i) anope_override { this->Bind(i, this->admin_binddn, this->admin_pass); @@ -575,7 +575,7 @@ class ModuleLDAP : public Module, public Pipe delete req; } - } + } } }; @@ -619,4 +619,3 @@ int LDAPModify::run() } MODULE_INIT(ModuleLDAP) - diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index 30f36501e..4aaafb4a2 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -29,7 +29,7 @@ struct IdentifyInfo { req->Hold(me); } - + ~IdentifyInfo() { req->Release(me); diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 11b6f4c60..72cf889c4 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -456,7 +456,7 @@ Query MySQLService::BuildInsert(const Anope::string &table, unsigned int id, Dat query.SetValue(it->first, buf, escape); } - + return query; } @@ -476,7 +476,7 @@ void MySQLService::Connect() if (!connect) throw SQL::Exception("Unable to connect to MySQL service " + this->name + ": " + mysql_error(this->sql)); - + Log(LOG_DEBUG) << "Successfully connected to MySQL service " << this->name << " at " << this->server << ":" << this->port; } @@ -553,4 +553,3 @@ void DispatcherThread::Run() } MODULE_INIT(ModuleSQL) - diff --git a/modules/extra/m_regex_pcre.cpp b/modules/extra/m_regex_pcre.cpp index c2e9a1f10..bbb90a8b8 100644 --- a/modules/extra/m_regex_pcre.cpp +++ b/modules/extra/m_regex_pcre.cpp @@ -23,7 +23,7 @@ class PCRERegex : public Regex int erroffset; this->regex = pcre_compile(expr.c_str(), PCRE_CASELESS, &error, &erroffset, NULL); if (!this->regex) - throw RegexException("Error in regex " + expr + " at offset " + stringify(erroffset) + ": " + error); + throw RegexException("Error in regex " + expr + " at offset " + stringify(erroffset) + ": " + error); } ~PCRERegex() diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index 35e25aac9..b444c1a6c 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -299,7 +299,7 @@ Query SQLiteService::BuildInsert(const Anope::string &table, unsigned int id, Da *it->second >> buf; query.SetValue(it->first, buf); } - + return query; } @@ -332,4 +332,3 @@ Anope::string SQLiteService::FromUnixtime(time_t t) } MODULE_INIT(ModuleSQLite) - diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 65b06604e..391ab2f9f 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -205,7 +205,7 @@ void MySSLService::Init(Socket *s) { if (s->io != &NormalSocketIO) throw CoreException("Socket initializing SSL twice"); - + s->io = new SSLSocketIO(); } @@ -283,7 +283,7 @@ ClientSocket *SSLSocketIO::Accept(ListenSocket *s) newsocket->flags[SF_ACCEPTING] = true; this->FinishAccept(newsocket); - + return newsocket; } @@ -297,7 +297,7 @@ SocketFlag SSLSocketIO::FinishAccept(ClientSocket *cs) throw SocketException("SSLSocketIO::FinishAccept called for a socket not accepted nor accepting?"); SSLSocketIO *io = anope_dynamic_static_cast<SSLSocketIO *>(cs->io); - + int ret = SSL_accept(io->sslsock); if (ret <= 0) { @@ -378,7 +378,7 @@ SocketFlag SSLSocketIO::FinishConnect(ConnectionSocket *s) if (!SSL_set_fd(io->sslsock, s->GetFD())) throw SocketException("Unable to set SSL fd"); } - + int ret = SSL_connect(io->sslsock); if (ret <= 0) { diff --git a/modules/extra/stats/cs_fantasy_stats.cpp b/modules/extra/stats/cs_fantasy_stats.cpp index 628d40747..d571c0c2b 100644 --- a/modules/extra/stats/cs_fantasy_stats.cpp +++ b/modules/extra/stats/cs_fantasy_stats.cpp @@ -174,4 +174,3 @@ void CommandCSGStats::Execute(CommandSource &source, const std::vector<Anope::st } MODULE_INIT(CSStats) - diff --git a/modules/extra/stats/cs_fantasy_top.cpp b/modules/extra/stats/cs_fantasy_top.cpp index 7d7882f9c..b3dbe6f82 100644 --- a/modules/extra/stats/cs_fantasy_top.cpp +++ b/modules/extra/stats/cs_fantasy_top.cpp @@ -151,7 +151,7 @@ class CSTop : public Module { source.Reply(_("%2lu \002%-16s\002 letters: %s, words: %s, lines: %s, smileys: %s, actions: %s"), i+1, res.Get(i, "nick").c_str(), res.Get(i, "letters").c_str(), - res.Get(i, "words").c_str(), res.Get(i, "line").c_str(), + res.Get(i, "words").c_str(), res.Get(i, "line").c_str(), res.Get(i, "smileys").c_str(), res.Get(i, "actions").c_str()); } } @@ -185,5 +185,4 @@ void CommandCSGTop10::Execute(CommandSource &source, const std::vector<Anope::st me->DoTop(source, params, true, 10); } - MODULE_INIT(CSTop) diff --git a/modules/extra/stats/irc2sql/CMakeLists.txt b/modules/extra/stats/irc2sql/CMakeLists.txt index 9d36c6e8d..781f0ef1f 100644 --- a/modules/extra/stats/irc2sql/CMakeLists.txt +++ b/modules/extra/stats/irc2sql/CMakeLists.txt @@ -1,2 +1 @@ build_subdir(${CMAKE_CURRENT_SOURCE_DIR}) - diff --git a/modules/extra/stats/irc2sql/irc2sql.h b/modules/extra/stats/irc2sql/irc2sql.h index d18e89762..19b230200 100644 --- a/modules/extra/stats/irc2sql/irc2sql.h +++ b/modules/extra/stats/irc2sql/irc2sql.h @@ -82,5 +82,3 @@ class IRC2SQL : public Module void OnBotNotice(User *u, BotInfo *bi, Anope::string &message) anope_override; }; - - diff --git a/modules/extra/stats/irc2sql/utils.cpp b/modules/extra/stats/irc2sql/utils.cpp index 0b0fe787f..3a349ccfb 100644 --- a/modules/extra/stats/irc2sql/utils.cpp +++ b/modules/extra/stats/irc2sql/utils.cpp @@ -66,4 +66,3 @@ bool IRC2SQL::HasEvent(const Anope::string &table) return true; return false; } - diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 08d654da4..40c8db5d1 100644 --- a/modules/extra/stats/m_chanstats.cpp +++ b/modules/extra/stats/m_chanstats.cpp @@ -111,7 +111,7 @@ class CommandNSSetChanstats : public Command { this->Run(source, source.nc->display, params[0]); } - + bool OnHelp(CommandSource &source, const Anope::string &) anope_override { this->SendSyntax(source); @@ -653,4 +653,3 @@ class MChanstats : public Module }; MODULE_INIT(MChanstats) - diff --git a/modules/fantasy.cpp b/modules/fantasy.cpp index 7f17247fc..9da340b50 100644 --- a/modules/fantasy.cpp +++ b/modules/fantasy.cpp @@ -46,7 +46,7 @@ class CommandBSSetFantasy : 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 fantasy"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to enable fantasy"; ci->Extend<bool>("BS_FANTASY"); source.Reply(_("Fantasy mode is now \002on\002 on channel %s."), ci->name.c_str()); @@ -54,7 +54,7 @@ class CommandBSSetFantasy : 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 fantasy"; + Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to disable fantasy"; ci->Shrink<bool>("BS_FANTASY"); source.Reply(_("Fantasy mode is now \002off\002 on channel %s."), ci->name.c_str()); @@ -125,7 +125,7 @@ class Fantasy : public Module { return; } - + if (params.empty()) return; @@ -149,7 +149,7 @@ class Fantasy : public Module ServiceReference<Command> cmd("Command", info.name); if (!cmd) { - Log(LOG_DEBUG) << "Fantasy command " << it->first << " exists for non-existent service " << info.name << "!"; + Log(LOG_DEBUG) << "Fantasy command " << it->first << " exists for nonexistent service " << info.name << "!"; return; } @@ -216,4 +216,3 @@ class Fantasy : public Module }; MODULE_INIT(Fantasy) - diff --git a/modules/m_dns.cpp b/modules/m_dns.cpp index 945421a06..34b7d5d2f 100644 --- a/modules/m_dns.cpp +++ b/modules/m_dns.cpp @@ -109,7 +109,7 @@ class Packet : public Query return name; } - + Question UnpackQuestion(const unsigned char *input, unsigned short input_size, unsigned short &pos) { Question question; @@ -212,7 +212,7 @@ class Packet : public Query unsigned short id; /* Flags on the packet */ unsigned short flags; - + Packet(Manager *m, sockaddrs *a) : manager(m), id(0), flags(0) { if (a) @@ -248,7 +248,7 @@ class Packet : public Query for (unsigned i = 0; i < qdcount; ++i) this->questions.push_back(this->UnpackQuestion(input, len, packet_pos)); - + for (unsigned i = 0; i < ancount; ++i) this->answers.push_back(this->UnpackResourceRecord(input, len, packet_pos)); @@ -270,7 +270,7 @@ class Packet : public Query { if (output_size < HEADER_LENGTH) throw SocketException("Unable to pack packet"); - + unsigned short pos = 0; output[pos++] = this->id >> 8; @@ -433,7 +433,7 @@ class Packet : public Query l = htonl(manager->GetSerial()); memcpy(&output[pos], &l, 4); pos += 4; - + l = htonl(refresh); // Refresh memcpy(&output[pos], &l, 4); pos += 4; @@ -459,7 +459,7 @@ class Packet : public Query break; } } - + return pos; } }; @@ -478,7 +478,7 @@ namespace DNS class TCPSocket : public ListenSocket { Manager *manager; - + public: /* A TCP client */ class Client : public ClientSocket, public Timer, public ReplySocket @@ -487,7 +487,7 @@ class TCPSocket : public ListenSocket Packet *packet; unsigned char packet_buffer[524]; int length; - + public: Client(Manager *m, TCPSocket *l, int fd, const sockaddrs &addr) : Socket(fd, l->IsIPv6()), ClientSocket(l, addr), Timer(5), manager(m), packet(NULL), length(0) @@ -500,7 +500,7 @@ class TCPSocket : public ListenSocket Log(LOG_DEBUG_2) << "Resolver: Exiting client from " << clientaddr.addr(); delete packet; } - + /* Times out after a few seconds */ void Tick(time_t) anope_override { } @@ -560,13 +560,13 @@ class TCPSocket : public ListenSocket }; TCPSocket(Manager *m, const Anope::string &ip, int port) : Socket(-1, ip.find(':') != Anope::string::npos), ListenSocket(ip, port, ip.find(':') != Anope::string::npos), manager(m) { } - + ClientSocket *OnAccept(int fd, const sockaddrs &addr) anope_override { return new Client(this->manager, this, fd, addr); } }; - + /* Listens for UDP requests */ class UDPSocket : public ReplySocket { @@ -581,15 +581,15 @@ class UDPSocket : public ReplySocket for (unsigned i = 0; i < packets.size(); ++i) delete packets[i]; } - + void Reply(Packet *p) anope_override { packets.push_back(p); SocketEngine::Change(this, true, SF_WRITABLE); } - + std::deque<Packet *>& GetPackets() { return packets; } - + bool ProcessRead() anope_override { Log(LOG_DEBUG_2) << "Resolver: Reading from DNS UDP socket"; @@ -600,7 +600,7 @@ class UDPSocket : public ReplySocket int length = recvfrom(this->GetFD(), reinterpret_cast<char *>(&packet_buffer), sizeof(packet_buffer), 0, &from_server.sa, &x); return this->manager->HandlePacket(this, packet_buffer, length, &from_server); } - + bool ProcessWrite() anope_override { Log(LOG_DEBUG_2) << "Resolver: Writing to DNS UDP socket"; @@ -623,7 +623,7 @@ class UDPSocket : public ReplySocket if (packets.empty()) SocketEngine::Change(this, false, SF_WRITABLE); - + return true; } }; @@ -689,7 +689,7 @@ class MyManager : public Manager, public Timer delete tcpsock; for (std::map<unsigned short, Request *>::iterator it = this->requests.begin(), it_end = this->requests.end(); it != it_end;) - { + { Request *request = it->second; ++it; @@ -767,7 +767,7 @@ class MyManager : public Manager, public Timer this->requests[req->id] = req; req->SetSecs(timeout); - + Packet *p = new Packet(this, &this->addrs); p->flags = QUERYFLAGS_RD; p->id = req->id; @@ -931,7 +931,7 @@ class MyManager : public Manager, public Timer request->OnLookupComplete(&recv_packet); this->AddCache(recv_packet); } - + delete request; return true; } @@ -992,7 +992,7 @@ class MyManager : public Manager, public Timer this->cache.erase(it); } } - + private: /** Add a record to the dns cache * @param r The record @@ -1020,7 +1020,7 @@ class MyManager : public Manager, public Timer return false; } - + }; class ModuleDNS : public Module @@ -1139,4 +1139,3 @@ class ModuleDNS : public Module }; MODULE_INIT(ModuleDNS) - diff --git a/modules/m_dnsbl.cpp b/modules/m_dnsbl.cpp index 4b885fa71..6f315430d 100644 --- a/modules/m_dnsbl.cpp +++ b/modules/m_dnsbl.cpp @@ -192,4 +192,3 @@ class ModuleDNSBL : public Module }; MODULE_INIT(ModuleDNSBL) - diff --git a/modules/m_httpd.cpp b/modules/m_httpd.cpp index 7d8055a36..193da975a 100644 --- a/modules/m_httpd.cpp +++ b/modules/m_httpd.cpp @@ -149,7 +149,7 @@ class MyHTTPClient : public HTTPClient this->Serve(); } - + return true; } diff --git a/modules/m_proxyscan.cpp b/modules/m_proxyscan.cpp index 57d06142c..5e9611b1e 100644 --- a/modules/m_proxyscan.cpp +++ b/modules/m_proxyscan.cpp @@ -117,7 +117,7 @@ class HTTPProxyConnect : public ProxyConnect, public BufferedSocket void OnConnect() anope_override { this->Write("CONNECT %s:%d HTTP/1.0", target_ip.c_str(), target_port); - this->Write("Content-length: 0"); + this->Write("Content-Length: 0"); this->Write("Connection: close"); this->Write(""); } @@ -376,4 +376,3 @@ class ModuleProxyScan : public Module }; MODULE_INIT(ModuleProxyScan) - diff --git a/modules/m_rewrite.cpp b/modules/m_rewrite.cpp index b90f20342..a9788c7e1 100644 --- a/modules/m_rewrite.cpp +++ b/modules/m_rewrite.cpp @@ -20,7 +20,7 @@ struct Rewrite for (unsigned i = 0; i < sm.size(); ++i) if (i >= message.size() || (sm[i] != "$" && !sm[i].equals_ci(message[i]))) return false; - + return true; } @@ -71,7 +71,7 @@ struct Rewrite } static std::vector<Rewrite> rewrites; - + static Rewrite *Find(const Anope::string &client, const Anope::string &cmd) { for (unsigned i = 0; i < rewrites.size(); ++i) diff --git a/modules/m_xmlrpc.cpp b/modules/m_xmlrpc.cpp index 13b8a0fa5..66b280a38 100644 --- a/modules/m_xmlrpc.cpp +++ b/modules/m_xmlrpc.cpp @@ -225,4 +225,3 @@ class ModuleXMLRPC : public Module }; MODULE_INIT(ModuleXMLRPC) - diff --git a/modules/m_xmlrpc_main.cpp b/modules/m_xmlrpc_main.cpp index 337801407..3969cab59 100644 --- a/modules/m_xmlrpc_main.cpp +++ b/modules/m_xmlrpc_main.cpp @@ -131,7 +131,7 @@ class MyXMLRPCEvent : public XMLRPCEvent req->Dispatch(); return false; } - + return true; } @@ -303,4 +303,3 @@ class ModuleXMLRPCMain : public Module }; MODULE_INIT(ModuleXMLRPCMain) - diff --git a/modules/protocol/bahamut.cpp b/modules/protocol/bahamut.cpp index 9cd13182f..88f07aab1 100644 --- a/modules/protocol/bahamut.cpp +++ b/modules/protocol/bahamut.cpp @@ -373,7 +373,7 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[6]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[6] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistent server " << params[6] << "?"; return; } @@ -449,7 +449,7 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for nonexistent user " << buf << " on " << params[1]; continue; } diff --git a/modules/protocol/charybdis.cpp b/modules/protocol/charybdis.cpp index 3c1db98ba..6890d8948 100644 --- a/modules/protocol/charybdis.cpp +++ b/modules/protocol/charybdis.cpp @@ -32,7 +32,7 @@ class ChannelModeLargeBan : public ChannelMode class CharybdisProto : public IRCDProto { public: - + CharybdisProto(Module *creator) : IRCDProto(creator, "Charybdis 3.4+") { DefaultPseudoclientModes = "+oiS"; @@ -69,12 +69,12 @@ class CharybdisProto : public IRCDProto void SendSASLMechanisms(std::vector<Anope::string> &mechanisms) anope_override { Anope::string mechlist; - + for (unsigned i = 0; i < mechanisms.size(); ++i) { mechlist += "," + mechanisms[i]; } - + UplinkSocket::Message(Me) << "ENCAP * MECHLIST :" << (mechanisms.empty() ? "" : mechlist.substr(1)); } @@ -321,7 +321,7 @@ class ProtoCharybdis : public Module ModeManager::AddUserMode(new UserMode("NOFORWARD", 'Q')); ModeManager::AddUserMode(new UserMode("REGPRIV", 'R')); ModeManager::AddUserMode(new UserModeOperOnly("OPERWALLS", 'z')); - ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z')); + ModeManager::AddUserMode(new UserModeNoone("SSL", 'Z')); /* b/e/I */ ModeManager::AddChannelMode(new ChannelModeList("QUIET", 'q')); diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp index db988bce1..b97c38973 100644 --- a/modules/protocol/hybrid.cpp +++ b/modules/protocol/hybrid.cpp @@ -460,7 +460,7 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for nonexistent user " << buf << " on " << params[1]; continue; } diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index bd4975741..348969285 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -950,7 +950,7 @@ struct IRCDMessageFJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "FJOIN for non-existent user " << buf << " on " << params[0]; + Log(LOG_DEBUG) << "FJOIN for nonexistent user " << buf << " on " << params[0]; continue; } @@ -1226,7 +1226,7 @@ struct IRCDMessageServer : IRCDMessage struct IRCDMessageSQuit : Message::SQuit { IRCDMessageSQuit(Module *creator) : Message::SQuit(creator) { } - + void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override { if (params[0] == rsquit_id || params[0] == rsquit_server) diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index 869a82bd6..d72f24641 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -317,7 +317,7 @@ struct IRCDMessageMetadata : IRCDMessage User *u = User::Find(params[0]); if (!u) { - Log(LOG_DEBUG) << "received METADATA for non-existent user " << params[0]; + Log(LOG_DEBUG) << "received METADATA for nonexistent user " << params[0]; return; } if (params[1].equals_cs("accountname")) @@ -426,7 +426,7 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[4]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[4] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistent server " << params[4] << "?"; return; } User::OnIntroduce(params[0], params[2], params[3], "", "", s, params[6], Anope::CurTime, params[5], "", NULL); @@ -475,11 +475,11 @@ struct IRCDMessageNJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "NJOIN for non-existent user " << buf << " on " << params[0]; + Log(LOG_DEBUG) << "NJOIN for nonexistent user " << buf << " on " << params[0]; continue; } users.push_back(sju); - } + } Message::Join::SJoin(source, params[0], 0, "", users); } @@ -562,7 +562,7 @@ struct IRCDMessageTopic : IRCDMessage Channel *c = Channel::Find(params[0]); if (!c) { - Log(LOG_DEBUG) << "TOPIC for non-existent channel " << params[0]; + Log(LOG_DEBUG) << "TOPIC for nonexistent channel " << params[0]; return; } c->ChangeTopicInternal(source.GetUser(), source.GetName(), params[1], Anope::CurTime); diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index ffbb2c755..525ef4320 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -343,7 +343,7 @@ class ProtoPlexus : public Module Message::Topic message_topic; Message::Version message_version; Message::Whois message_whois; - + /* Hybrid message handlers */ ServiceAlias message_bmask, message_eob, message_join, message_nick, message_sid, message_sjoin, message_tburst, message_tmode; diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index 5f4934702..70a704486 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -20,14 +20,14 @@ class RatboxProto : public IRCDProto BotInfo *FindIntroduced() { BotInfo *bi = Config->GetClient("OperServ"); - + if (bi && bi->introduced) return bi; - + for (botinfo_map::iterator it = BotListByNick->begin(), it_end = BotListByNick->end(); it != it_end; ++it) if (it->second->introduced) return it->second; - + return NULL; } @@ -65,18 +65,18 @@ class RatboxProto : public IRCDProto { /* Calculate the time left before this would expire, capping it at 2 days */ time_t timeleft = x->expires - Anope::CurTime; - + if (timeleft > 172800 || !x->expires) timeleft = 172800; - + UplinkSocket::Message(FindIntroduced()) << "ENCAP * RESV " << timeleft << " " << x->mask << " 0 :" << x->GetReason(); } - + void SendSQLineDel(const XLine *x) anope_override { UplinkSocket::Message(Config->GetClient("OperServ")) << "ENCAP * UNRESV " << x->mask; } - + void SendConnect() anope_override { UplinkSocket::Message() << "PASS " << Config->Uplinks[Anope::CurrentUplink].password << " TS 6 :" << Me->GetSID(); diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp index d43f04fc4..4ff350e21 100644 --- a/modules/protocol/unreal.cpp +++ b/modules/protocol/unreal.cpp @@ -559,7 +559,7 @@ class ChannelModeFlood : public ChannelModeParam return true; } catch (const ConvertException &) { } - + /* '['<number><1 letter>[optional: '#'+1 letter],[next..]']'':'<number> */ size_t end_bracket = value.find(']', 1); if (end_bracket == Anope::string::npos) @@ -908,10 +908,10 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[5]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[5] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistent server " << params[5] << "?"; return; } - + NickAlias *na = NULL; if (params[6] == "0") @@ -964,7 +964,7 @@ struct IRCDMessageSASL : IRCDMessage void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override { size_t p = params[1].find('!'); - if (!SASL::sasl || p == Anope::string::npos) + if (!SASL::sasl || p == Anope::string::npos) return; SASL::Message m; @@ -1100,14 +1100,14 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for nonexistent user " << buf << " on " << params[1]; continue; } users.push_back(sju); } } - + time_t ts = Anope::string(params[0]).is_pos_number_only() ? convertTo<time_t>(params[0]) : Anope::CurTime; Message::Join::SJoin(source, params[1], ts, modes, users); diff --git a/modules/protocol/unreal4.cpp b/modules/protocol/unreal4.cpp index 1b35eed50..1fe7a1d28 100644 --- a/modules/protocol/unreal4.cpp +++ b/modules/protocol/unreal4.cpp @@ -567,7 +567,7 @@ class ChannelModeFlood : public ChannelModeParam return true; } catch (const ConvertException &) { } - + /* '['<number><1 letter>[optional: '#'+1 letter],[next..]']'':'<number> */ size_t end_bracket = value.find(']', 1); if (end_bracket == Anope::string::npos) @@ -950,10 +950,10 @@ struct IRCDMessageNick : IRCDMessage Server *s = Server::Find(params[5]); if (s == NULL) { - Log(LOG_DEBUG) << "User " << params[0] << " introduced from non-existent server " << params[5] << "?"; + Log(LOG_DEBUG) << "User " << params[0] << " introduced from nonexistent server " << params[5] << "?"; return; } - + NickAlias *na = NULL; if (params[6] == "0") @@ -1006,7 +1006,7 @@ struct IRCDMessageSASL : IRCDMessage void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override { size_t p = params[1].find('!'); - if (!SASL::sasl || p == Anope::string::npos) + if (!SASL::sasl || p == Anope::string::npos) return; SASL::Message m; @@ -1156,14 +1156,14 @@ struct IRCDMessageSJoin : IRCDMessage sju.second = User::Find(buf); if (!sju.second) { - Log(LOG_DEBUG) << "SJOIN for non-existent user " << buf << " on " << params[1]; + Log(LOG_DEBUG) << "SJOIN for nonexistent user " << buf << " on " << params[1]; continue; } users.push_back(sju); } } - + time_t ts = Anope::string(params[0]).is_pos_number_only() ? convertTo<time_t>(params[0]) : Anope::CurTime; Message::Join::SJoin(source, params[1], ts, modes, users); diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index dada953ee..b491ef855 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -108,7 +108,7 @@ class BotServCore : public Module /* Channel is persistent, it shouldn't be deleted and the service bot should stay */ if (c->ci && persist && persist->HasExt(c->ci)) return; - + /* Channel is syncing from a netburst, don't destroy it as more users are probably wanting to join immediately * We also don't part the bot here either, if necessary we will part it after the sync */ @@ -212,4 +212,3 @@ class BotServCore : public Module }; MODULE_INIT(BotServCore) - diff --git a/modules/pseudoclients/chanserv.cpp b/modules/pseudoclients/chanserv.cpp index 73ccd76f1..b66ae1a63 100644 --- a/modules/pseudoclients/chanserv.cpp +++ b/modules/pseudoclients/chanserv.cpp @@ -410,7 +410,7 @@ class ChanServCore : public Module, public ChanServService } } - + void OnChanRegistered(ChannelInfo *ci) anope_override { if (!persist || !ci->c) @@ -476,4 +476,3 @@ class ChanServCore : public Module, public ChanServService }; MODULE_INIT(ChanServCore) - diff --git a/modules/pseudoclients/global.cpp b/modules/pseudoclients/global.cpp index d2d0d7630..4c2b8f907 100644 --- a/modules/pseudoclients/global.cpp +++ b/modules/pseudoclients/global.cpp @@ -68,7 +68,7 @@ class GlobalCore : public Module, public GlobalService if (!gl.empty()) this->SendGlobal(Global, "", gl); } - + void OnShutdown() anope_override { const Anope::string &gl = Config->GetModule(this)->Get<const Anope::string>("globaloncycledown"); @@ -93,4 +93,3 @@ class GlobalCore : public Module, public GlobalService }; MODULE_INIT(GlobalCore) - diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index 2f7a700fd..745036662 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -119,4 +119,3 @@ class HostServCore : public Module }; MODULE_INIT(HostServCore) - diff --git a/modules/pseudoclients/memoserv.cpp b/modules/pseudoclients/memoserv.cpp index c3a515e50..5d504ed6f 100644 --- a/modules/pseudoclients/memoserv.cpp +++ b/modules/pseudoclients/memoserv.cpp @@ -231,4 +231,3 @@ class MemoServCore : public Module, public MemoServService }; MODULE_INIT(MemoServCore) - diff --git a/modules/pseudoclients/nickserv.cpp b/modules/pseudoclients/nickserv.cpp index 10acc4e3d..5880fc8f3 100644 --- a/modules/pseudoclients/nickserv.cpp +++ b/modules/pseudoclients/nickserv.cpp @@ -545,7 +545,7 @@ class NickServCore : public Module, public NickServService expire = true; FOREACH_MOD(OnPreNickExpire, (na, expire)); - + if (expire) { Log(LOG_NORMAL, "nickserv/expire", NickServ) << "Expiring nickname " << na->nick << " (group: " << na->nc->display << ") (e-mail: " << (na->nc->email.empty() ? "none" : na->nc->email) << ")"; @@ -572,4 +572,3 @@ class NickServCore : public Module, public NickServService }; MODULE_INIT(NickServCore) - diff --git a/modules/pseudoclients/operserv.cpp b/modules/pseudoclients/operserv.cpp index e6ebc5c60..e48e15ef4 100644 --- a/modules/pseudoclients/operserv.cpp +++ b/modules/pseudoclients/operserv.cpp @@ -25,7 +25,7 @@ class SGLineManager : public XLineManager { Log(Config->GetClient("OperServ"), "expire/akill") << "AKILL on \002" << x->mask << "\002 has expired"; } - + void Send(User *u, XLine *x) anope_override { IRCD->SendAkill(u, x); @@ -296,4 +296,3 @@ class OperServCore : public Module }; MODULE_INIT(OperServCore) - diff --git a/modules/webcpanel/CMakeLists.txt b/modules/webcpanel/CMakeLists.txt index 247973f61..ea5a03b35 100644 --- a/modules/webcpanel/CMakeLists.txt +++ b/modules/webcpanel/CMakeLists.txt @@ -3,4 +3,3 @@ build_subdir(${CMAKE_CURRENT_SOURCE_DIR}) install(DIRECTORY templates DESTINATION "${DB_DIR}/modules/webcpanel" ) - diff --git a/modules/webcpanel/pages/chanserv/access.cpp b/modules/webcpanel/pages/chanserv/access.cpp index 68235035b..38d1c4bd5 100644 --- a/modules/webcpanel/pages/chanserv/access.cpp +++ b/modules/webcpanel/pages/chanserv/access.cpp @@ -125,4 +125,3 @@ std::set<Anope::string> WebCPanel::ChanServ::Access::GetData() v.insert("channel"); return v; } - diff --git a/modules/webcpanel/pages/chanserv/access.h b/modules/webcpanel/pages/chanserv/access.h index 76efc3609..61fe3904f 100644 --- a/modules/webcpanel/pages/chanserv/access.h +++ b/modules/webcpanel/pages/chanserv/access.h @@ -24,4 +24,3 @@ class Access : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/chanserv/akick.cpp b/modules/webcpanel/pages/chanserv/akick.cpp index a402fb014..4c9614fe7 100644 --- a/modules/webcpanel/pages/chanserv/akick.cpp +++ b/modules/webcpanel/pages/chanserv/akick.cpp @@ -91,4 +91,3 @@ std::set<Anope::string> WebCPanel::ChanServ::Akick::GetData() v.insert("channel"); return v; } - diff --git a/modules/webcpanel/pages/chanserv/akick.h b/modules/webcpanel/pages/chanserv/akick.h index 1b3d0bc72..81391fc3e 100644 --- a/modules/webcpanel/pages/chanserv/akick.h +++ b/modules/webcpanel/pages/chanserv/akick.h @@ -24,4 +24,3 @@ class Akick : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/chanserv/info.cpp b/modules/webcpanel/pages/chanserv/info.cpp index 917836107..6143f8421 100644 --- a/modules/webcpanel/pages/chanserv/info.cpp +++ b/modules/webcpanel/pages/chanserv/info.cpp @@ -25,4 +25,3 @@ bool WebCPanel::ChanServ::Info::OnRequest(HTTPProvider *server, const Anope::str page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/chanserv/info.h b/modules/webcpanel/pages/chanserv/info.h index 0e4888586..70523848d 100644 --- a/modules/webcpanel/pages/chanserv/info.h +++ b/modules/webcpanel/pages/chanserv/info.h @@ -22,4 +22,3 @@ class Info : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/chanserv/modes.cpp b/modules/webcpanel/pages/chanserv/modes.cpp index a3b8791e4..1d37d2135 100644 --- a/modules/webcpanel/pages/chanserv/modes.cpp +++ b/modules/webcpanel/pages/chanserv/modes.cpp @@ -109,4 +109,3 @@ std::set<Anope::string> WebCPanel::ChanServ::Modes::GetData() v.insert("channel"); return v; } - diff --git a/modules/webcpanel/pages/chanserv/modes.h b/modules/webcpanel/pages/chanserv/modes.h index 66588632c..2f076ed3d 100644 --- a/modules/webcpanel/pages/chanserv/modes.h +++ b/modules/webcpanel/pages/chanserv/modes.h @@ -24,4 +24,3 @@ class Modes : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/chanserv/set.cpp b/modules/webcpanel/pages/chanserv/set.cpp index 7834c23c2..c0d4121fa 100644 --- a/modules/webcpanel/pages/chanserv/set.cpp +++ b/modules/webcpanel/pages/chanserv/set.cpp @@ -152,4 +152,3 @@ std::set<Anope::string> WebCPanel::ChanServ::Set::GetData() v.insert("channel"); return v; } - diff --git a/modules/webcpanel/pages/chanserv/set.h b/modules/webcpanel/pages/chanserv/set.h index 60b84b94e..6c59ccbf9 100644 --- a/modules/webcpanel/pages/chanserv/set.h +++ b/modules/webcpanel/pages/chanserv/set.h @@ -24,4 +24,3 @@ class Set : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/chanserv/utils.cpp b/modules/webcpanel/pages/chanserv/utils.cpp index c5ad6daf4..dbb384a04 100644 --- a/modules/webcpanel/pages/chanserv/utils.cpp +++ b/modules/webcpanel/pages/chanserv/utils.cpp @@ -42,4 +42,3 @@ void BuildChanList(NickAlias *na, TemplateFileServer::Replacements &replacements } } - diff --git a/modules/webcpanel/pages/chanserv/utils.h b/modules/webcpanel/pages/chanserv/utils.h index 928cb2709..e39b12ec9 100644 --- a/modules/webcpanel/pages/chanserv/utils.h +++ b/modules/webcpanel/pages/chanserv/utils.h @@ -16,4 +16,3 @@ extern void BuildChanList(NickAlias *, TemplateFileServer::Replacements &); } } - diff --git a/modules/webcpanel/pages/confirm.cpp b/modules/webcpanel/pages/confirm.cpp index ccf0fc6d3..c976adfa0 100644 --- a/modules/webcpanel/pages/confirm.cpp +++ b/modules/webcpanel/pages/confirm.cpp @@ -29,4 +29,3 @@ bool WebCPanel::Confirm::OnRequest(HTTPProvider *server, const Anope::string &pa page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/confirm.h b/modules/webcpanel/pages/confirm.h index 6994d1a67..ef1ce6998 100644 --- a/modules/webcpanel/pages/confirm.h +++ b/modules/webcpanel/pages/confirm.h @@ -19,4 +19,3 @@ class Confirm : public WebPanelPage }; } - diff --git a/modules/webcpanel/pages/hostserv/request.cpp b/modules/webcpanel/pages/hostserv/request.cpp index d66af9339..d26bb4323 100644 --- a/modules/webcpanel/pages/hostserv/request.cpp +++ b/modules/webcpanel/pages/hostserv/request.cpp @@ -7,11 +7,11 @@ #include "../../webcpanel.h" -WebCPanel::HostServ::Request::Request(const Anope::string &cat, const Anope::string &u) : WebPanelProtectedPage (cat, u) +WebCPanel::HostServ::Request::Request(const Anope::string &cat, const Anope::string &u) : WebPanelProtectedPage (cat, u) { } -bool WebCPanel::HostServ::Request::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, NickAlias *na, TemplateFileServer::Replacements &replacements) +bool WebCPanel::HostServ::Request::OnRequest(HTTPProvider *server, const Anope::string &page_name, HTTPClient *client, HTTPMessage &message, HTTPReply &reply, NickAlias *na, TemplateFileServer::Replacements &replacements) { if (message.post_data.count("req") > 0) { diff --git a/modules/webcpanel/pages/index.cpp b/modules/webcpanel/pages/index.cpp index 1ef1e8942..8fdd11352 100644 --- a/modules/webcpanel/pages/index.cpp +++ b/modules/webcpanel/pages/index.cpp @@ -56,7 +56,7 @@ class WebpanelRequest : public IdentifyRequest reply.cookies.push_back(c); } - { + { HTTPReply::cookie c; c.push_back(std::make_pair("id", id)); c.push_back(std::make_pair("Path", "/")); @@ -102,4 +102,3 @@ bool WebCPanel::Index::OnRequest(HTTPProvider *server, const Anope::string &page page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/index.h b/modules/webcpanel/pages/index.h index 153a41256..76e3d12a1 100644 --- a/modules/webcpanel/pages/index.h +++ b/modules/webcpanel/pages/index.h @@ -19,4 +19,3 @@ class Index : public WebPanelPage }; } - diff --git a/modules/webcpanel/pages/logout.cpp b/modules/webcpanel/pages/logout.cpp index 3c73bf2c8..1039252cc 100644 --- a/modules/webcpanel/pages/logout.cpp +++ b/modules/webcpanel/pages/logout.cpp @@ -20,4 +20,3 @@ bool WebCPanel::Logout::OnRequest(HTTPProvider *server, const Anope::string &pag reply.headers["Location"] = Anope::string("http") + (server->IsSSL() ? "s" : "") + "://" + message.headers["Host"] + "/"; return true; } - diff --git a/modules/webcpanel/pages/logout.h b/modules/webcpanel/pages/logout.h index 42764cc00..96395302f 100644 --- a/modules/webcpanel/pages/logout.h +++ b/modules/webcpanel/pages/logout.h @@ -17,4 +17,3 @@ class Logout : public WebPanelProtectedPage }; } - diff --git a/modules/webcpanel/pages/memoserv/memos.cpp b/modules/webcpanel/pages/memoserv/memos.cpp index 648bdee6d..b833fc0a1 100644 --- a/modules/webcpanel/pages/memoserv/memos.cpp +++ b/modules/webcpanel/pages/memoserv/memos.cpp @@ -112,4 +112,3 @@ bool WebCPanel::MemoServ::Memos::OnRequest(HTTPProvider *server, const Anope::st page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/memoserv/memos.h b/modules/webcpanel/pages/memoserv/memos.h index c0f7bb800..bf3700c4e 100644 --- a/modules/webcpanel/pages/memoserv/memos.h +++ b/modules/webcpanel/pages/memoserv/memos.h @@ -22,4 +22,3 @@ class Memos : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/nickserv/access.cpp b/modules/webcpanel/pages/nickserv/access.cpp index 791798eb3..cb272d3bd 100644 --- a/modules/webcpanel/pages/nickserv/access.cpp +++ b/modules/webcpanel/pages/nickserv/access.cpp @@ -37,4 +37,3 @@ bool WebCPanel::NickServ::Access::OnRequest(HTTPProvider *server, const Anope::s page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/nickserv/access.h b/modules/webcpanel/pages/nickserv/access.h index 2aa4e6d8f..fb3968ea6 100644 --- a/modules/webcpanel/pages/nickserv/access.h +++ b/modules/webcpanel/pages/nickserv/access.h @@ -22,4 +22,3 @@ class Access : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/nickserv/alist.cpp b/modules/webcpanel/pages/nickserv/alist.cpp index 237cc4a86..7722ce1ae 100644 --- a/modules/webcpanel/pages/nickserv/alist.cpp +++ b/modules/webcpanel/pages/nickserv/alist.cpp @@ -41,7 +41,7 @@ bool WebCPanel::NickServ::Alist::OnRequest(HTTPProvider *server, const Anope::st AccessGroup access = ci->AccessFor(na->nc); if (access.empty()) continue; - + ++chan_count; replacements["NUMBERS"] = stringify(chan_count); @@ -55,4 +55,3 @@ bool WebCPanel::NickServ::Alist::OnRequest(HTTPProvider *server, const Anope::st page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/nickserv/alist.h b/modules/webcpanel/pages/nickserv/alist.h index 33adec160..18f11272e 100644 --- a/modules/webcpanel/pages/nickserv/alist.h +++ b/modules/webcpanel/pages/nickserv/alist.h @@ -22,4 +22,3 @@ class Alist : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/nickserv/cert.cpp b/modules/webcpanel/pages/nickserv/cert.cpp index 856c1f5bb..f8195e0e1 100644 --- a/modules/webcpanel/pages/nickserv/cert.cpp +++ b/modules/webcpanel/pages/nickserv/cert.cpp @@ -40,4 +40,3 @@ bool WebCPanel::NickServ::Cert::OnRequest(HTTPProvider *server, const Anope::str page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/nickserv/cert.h b/modules/webcpanel/pages/nickserv/cert.h index 49d1477c5..0979b5faf 100644 --- a/modules/webcpanel/pages/nickserv/cert.h +++ b/modules/webcpanel/pages/nickserv/cert.h @@ -22,4 +22,3 @@ class Cert : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/nickserv/info.cpp b/modules/webcpanel/pages/nickserv/info.cpp index 9fae771d9..441bfca66 100644 --- a/modules/webcpanel/pages/nickserv/info.cpp +++ b/modules/webcpanel/pages/nickserv/info.cpp @@ -110,9 +110,8 @@ bool WebCPanel::NickServ::Info::OnRequest(HTTPProvider *server, const Anope::str replacements["KILL_QUICK"]; if (!na->nc->HasExt("KILLPROTECT") && !na->nc->HasExt("KILL_QUICK")) replacements["KILL_OFF"]; - + TemplateFileServer page("nickserv/info.html"); page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/nickserv/info.h b/modules/webcpanel/pages/nickserv/info.h index 117f2bd8e..b18555826 100644 --- a/modules/webcpanel/pages/nickserv/info.h +++ b/modules/webcpanel/pages/nickserv/info.h @@ -22,4 +22,3 @@ class Info : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/operserv/akill.cpp b/modules/webcpanel/pages/operserv/akill.cpp index 1a45a6d82..c71dc1f49 100644 --- a/modules/webcpanel/pages/operserv/akill.cpp +++ b/modules/webcpanel/pages/operserv/akill.cpp @@ -61,4 +61,3 @@ bool WebCPanel::OperServ::Akill::OnRequest(HTTPProvider *server, const Anope::st page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/operserv/akill.h b/modules/webcpanel/pages/operserv/akill.h index 518f5e13d..543c06396 100644 --- a/modules/webcpanel/pages/operserv/akill.h +++ b/modules/webcpanel/pages/operserv/akill.h @@ -22,4 +22,3 @@ class Akill : public WebPanelProtectedPage } } - diff --git a/modules/webcpanel/pages/register.cpp b/modules/webcpanel/pages/register.cpp index e91405128..4d945aa15 100644 --- a/modules/webcpanel/pages/register.cpp +++ b/modules/webcpanel/pages/register.cpp @@ -21,4 +21,3 @@ bool WebCPanel::Register::OnRequest(HTTPProvider *server, const Anope::string &p page.Serve(server, page_name, client, message, reply, replacements); return true; } - diff --git a/modules/webcpanel/pages/register.h b/modules/webcpanel/pages/register.h index 4280a34c2..1d573bb30 100644 --- a/modules/webcpanel/pages/register.h +++ b/modules/webcpanel/pages/register.h @@ -19,4 +19,3 @@ class Register : public WebPanelPage }; } - diff --git a/modules/webcpanel/static_fileserver.cpp b/modules/webcpanel/static_fileserver.cpp index 2e91f77e4..396ffc8fc 100644 --- a/modules/webcpanel/static_fileserver.cpp +++ b/modules/webcpanel/static_fileserver.cpp @@ -35,8 +35,7 @@ bool StaticFileServer::OnRequest(HTTPProvider *server, const Anope::string &page char buffer[BUFSIZE]; while ((i = read(fd, buffer, sizeof(buffer))) > 0) reply.Write(buffer, i); - + close(fd); return true; } - diff --git a/modules/webcpanel/static_fileserver.h b/modules/webcpanel/static_fileserver.h index a5874c166..7ce9609aa 100644 --- a/modules/webcpanel/static_fileserver.h +++ b/modules/webcpanel/static_fileserver.h @@ -16,4 +16,3 @@ class StaticFileServer : public HTTPPage bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) anope_override; }; - diff --git a/modules/webcpanel/template_fileserver.cpp b/modules/webcpanel/template_fileserver.cpp index 3a8f96725..341058659 100644 --- a/modules/webcpanel/template_fileserver.cpp +++ b/modules/webcpanel/template_fileserver.cpp @@ -79,7 +79,7 @@ static Anope::string FindReplacement(const TemplateFileServer::Replacements &r, } } } - + TemplateFileServer::Replacements::const_iterator it = r.find(key); if (it != r.end()) return it->second; @@ -110,7 +110,7 @@ void TemplateFileServer::Serve(HTTPProvider *server, const Anope::string &page_n buffer[i] = 0; buf += buffer; } - + close(fd); Anope::string finished; @@ -235,7 +235,7 @@ void TemplateFileServer::Serve(HTTPProvider *server, const Anope::string &page_n // If the if stack is empty or we are in a true statement bool ifok = IfStack.empty() || IfStack.top(); bool forok = ForLoop::Stack.empty() || !ForLoop::Stack.back().finished(r); - + if (ifok && forok) { const Anope::string &replacement = FindReplacement(r, content.substr(0, f - 1)); @@ -252,7 +252,7 @@ void TemplateFileServer::Serve(HTTPProvider *server, const Anope::string &page_n // If the if stack is empty or we are in a true statement bool ifok = IfStack.empty() || IfStack.top(); bool forok = ForLoop::Stack.empty() || !ForLoop::Stack.back().finished(r); - + if (ifok && forok) finished += buf[j]; } @@ -261,4 +261,3 @@ void TemplateFileServer::Serve(HTTPProvider *server, const Anope::string &page_n if (!finished.empty()) reply.Write(finished); } - diff --git a/modules/webcpanel/template_fileserver.h b/modules/webcpanel/template_fileserver.h index 8b78a7ebb..b5c29cfd2 100644 --- a/modules/webcpanel/template_fileserver.h +++ b/modules/webcpanel/template_fileserver.h @@ -24,4 +24,3 @@ class TemplateFileServer void Serve(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &, Replacements &); }; - diff --git a/modules/webcpanel/webcpanel.cpp b/modules/webcpanel/webcpanel.cpp index 73558dd73..947248cb8 100644 --- a/modules/webcpanel/webcpanel.cpp +++ b/modules/webcpanel/webcpanel.cpp @@ -221,7 +221,7 @@ class ModuleWebCPanel : public Module provider->UnregisterPage(&this->chanserv_drop); provider->UnregisterPage(&this->memoserv_memos); - + provider->UnregisterPage(&this->hostserv_request); provider->UnregisterPage(&this->operserv_akill); diff --git a/src/access.cpp b/src/access.cpp index 1c1a6f8e4..5b994e916 100644 --- a/src/access.cpp +++ b/src/access.cpp @@ -84,7 +84,7 @@ void PrivilegeManager::AddPrivilege(Privilege p) if (priv.rank > p.rank) break; } - + Privileges.insert(Privileges.begin() + i, p); } @@ -265,7 +265,7 @@ bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo* &next) else if (Anope::Match(u->GetDisplayedMask(), this->mask)) return true; } - + if (acc) { for (unsigned i = 0; i < acc->aliases->size(); ++i) @@ -275,12 +275,12 @@ bool ChanAccess::Matches(const User *u, const NickCore *acc, ChannelInfo* &next) return true; } } - + if (IRCD->IsChannelValid(this->mask)) { next = ChannelInfo::Find(this->mask); } - + return false; } @@ -313,7 +313,7 @@ bool ChanAccess::operator<(const ChanAccess &other) const continue; return !this_p && other_p; - } + } return false; } @@ -473,4 +473,3 @@ bool AccessGroup::operator<=(const AccessGroup &other) const { return !(*this > other); } - diff --git a/src/base.cpp b/src/base.cpp index 27fecf69c..6dfd7ff22 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -46,4 +46,3 @@ void Base::DelReference(ReferenceBase *r) } } } - diff --git a/src/base64.cpp b/src/base64.cpp index 0f17fdada..2ca476494 100644 --- a/src/base64.cpp +++ b/src/base64.cpp @@ -161,4 +161,3 @@ void Anope::B64Decode(const Anope::string &src, Anope::string &target) if (!target.empty() && !target[target.length() - 1]) target.erase(target.length() - 1); } - diff --git a/src/bots.cpp b/src/bots.cpp index a9933e336..512de4c46 100644 --- a/src/bots.cpp +++ b/src/bots.cpp @@ -29,7 +29,7 @@ BotInfo::BotInfo(const Anope::string &nnick, const Anope::string &nuser, const A (*BotListByNick)[this->nick] = this; if (!this->uid.empty()) (*BotListByUID)[this->uid] = this; - + FOREACH_MOD(OnCreateBot, (this)); // If we're synchronised with the uplink already, send the bot. @@ -160,7 +160,7 @@ void BotInfo::Assign(User *u, ChannelInfo *ci) if (ci->bi) ci->bi->UnAssign(u, ci); - + ci->bi = this; this->channels->insert(ci); @@ -275,4 +275,3 @@ BotInfo* BotInfo::Find(const Anope::string &nick, bool nick_only) return NULL; } - diff --git a/src/channels.cpp b/src/channels.cpp index 1cf2e528c..3ea8da375 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -90,7 +90,7 @@ void Channel::Reset() for (ChanUserList::const_iterator it = this->users.begin(), it_end = this->users.end(); it != it_end; ++it) this->SetCorrectModes(it->second->user, true); - + // If the channel is syncing now, do not force a sync due to Reset(), as we are probably iterating over users in Message::SJoin // A sync will come soon if (!syncing) @@ -128,7 +128,7 @@ bool Channel::CheckDelete() */ if (this->syncing) return false; - + /* Permanent channels never get deleted */ if (this->HasMode("PERM")) return false; @@ -162,10 +162,10 @@ void Channel::DeleteUser(User *user) ChanUserContainer *cu = user->FindChannel(this); if (!this->users.erase(user)) - Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete non-existent user " << user->nick << " from channel " << this->name; + Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete nonexistent user " << user->nick << " from channel " << this->name; if (!user->chans.erase(this)) - Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete non-existent channel " << this->name << " from " << user->nick << "'s channel list"; + Log(LOG_DEBUG) << "Channel::DeleteUser() tried to delete nonexistent channel " << this->name << " from " << user->nick << "'s channel list"; delete cu; QueueForDeletion(); @@ -280,7 +280,7 @@ void Channel::SetModeInternal(MessageSource &setter, ChannelMode *ocm, const Ano if (!u) { - Log(LOG_DEBUG) << "MODE " << this->name << " +" << cm->mchar << " for non-existent user " << param; + Log(LOG_DEBUG) << "MODE " << this->name << " +" << cm->mchar << " for nonexistent user " << param; return; } @@ -351,7 +351,7 @@ void Channel::RemoveModeInternal(MessageSource &setter, ChannelMode *ocm, const if (!u) { - Log(LOG_DEBUG) << "Channel::RemoveModeInternal() MODE " << this->name << "-" << cm->mchar << " for non-existent user " << param; + Log(LOG_DEBUG) << "Channel::RemoveModeInternal() MODE " << this->name << "-" << cm->mchar << " for nonexistent user " << param; return; } @@ -381,7 +381,7 @@ void Channel::RemoveModeInternal(MessageSource &setter, ChannelMode *ocm, const } else this->modes.erase(cm->name); - + if (cm->type == MODE_LIST) { ChannelModeList *cml = anope_dynamic_static_cast<ChannelModeList *>(cm); @@ -713,7 +713,7 @@ void Channel::SetModesInternal(MessageSource &source, const Anope::string &mode, Log(setter, this, "mode") << modestring << paramstring; else Log(LOG_DEBUG) << source.GetName() << " is setting " << this->name << " to " << modestring << paramstring; - + if (enforce_mlock) this->CheckModes(); } @@ -776,7 +776,7 @@ bool Channel::Kick(BotInfo *bi, User *u, const char *reason, ...) /* Do not kick protected clients or Ulines */ if (u->IsProtected()) return false; - + if (bi == NULL) bi = this->ci->WhoSends(); @@ -819,7 +819,7 @@ void Channel::SetCorrectModes(User *user, bool give_modes) { if (user == NULL) return; - + if (!this->ci) return; @@ -905,7 +905,7 @@ bool Channel::CheckKick(User *user) FOREACH_RESULT(OnCheckKick, MOD_RESULT, (user, this, mask, reason)); if (MOD_RESULT != EVENT_STOP) return false; - + if (mask.empty()) mask = this->ci->GetIdealBan(user); if (reason.empty()) @@ -954,4 +954,3 @@ void Channel::DeleteChannels() } deleting.clear(); } - diff --git a/src/command.cpp b/src/command.cpp index f314eaf93..5cfdf2833 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -309,7 +309,6 @@ bool Command::FindCommandFromService(const Anope::string &command_service, BotIn return true; } } - + return false; } - diff --git a/src/config.cpp b/src/config.cpp index bf9938507..5d20caf82 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -35,7 +35,7 @@ int Block::CountBlock(const Anope::string &bname) { if (!this) return 0; - + return blocks.count(bname); } @@ -43,7 +43,7 @@ Block* Block::GetBlock(const Anope::string &bname, int num) { if (!this) return NULL; - + std::pair<block_map::iterator, block_map::iterator> it = blocks.equal_range(bname); for (int i = 0; it.first != it.second; ++it.first, ++i) @@ -278,7 +278,7 @@ Conf::Conf() : Block("") ValidateNotEmpty("oper", "name", nname); ValidateNotEmpty("oper", "type", type); - + OperType *ot = NULL; for (unsigned j = 0; j < this->MyOperTypes.size(); ++j) if (this->MyOperTypes[j]->GetName() == type) @@ -588,7 +588,7 @@ Block *Conf::GetModule(Module *m) { if (!m) return NULL; - + return GetModule(m->name); } @@ -599,7 +599,7 @@ Block *Conf::GetModule(const Anope::string &mname) return it->second; Block* &block = modules[mname]; - + /* Search for the block */ for (std::pair<block_map::iterator, block_map::iterator> iters = blocks.equal_range("module"); iters.first != iters.second; ++iters.first) { @@ -723,10 +723,10 @@ void Conf::LoadConf(File &file) Log(LOG_DEBUG) << "Start to read conf " << file.GetName(); // Start reading characters... while (!file.End()) - { + { Anope::string line = file.Read(); ++linenumber; - + /* If this line is completely empty and we are in a quote, just append a newline */ if (line.empty() && in_quote) wordbuffer += "\n"; @@ -925,4 +925,3 @@ void Conf::LoadConf(File &file) if (!block_stack.empty()) throw ConfigException("Unterminated block at end of file: " + file.GetName() + ". Block was opened on line " + stringify(block_stack.top()->linenum)); } - diff --git a/src/extensible.cpp b/src/extensible.cpp index 485ac7fb7..332df6673 100644 --- a/src/extensible.cpp +++ b/src/extensible.cpp @@ -66,7 +66,6 @@ bool* Extensible::Extend(const Anope::string &name, const bool &what) if (ref) return ref->Set(this); - Log(LOG_DEBUG) << "Extend for non-existent type " << name << " on " << static_cast<void *>(this); + Log(LOG_DEBUG) << "Extend for nonexistent type " << name << " on " << static_cast<void *>(this); return NULL; } - diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 507bb2929..4fb1cfa98 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -43,7 +43,7 @@ unsigned char Anope::toupper(unsigned char c) * which is a case-insensitive equivalent to std::string. * */ - + bool ci::ci_char_traits::eq(char c1st, char c2nd) { return case_map_upper[static_cast<unsigned char>(c1st)] == case_map_upper[static_cast<unsigned char>(c2nd)]; @@ -161,4 +161,3 @@ bool sepstream::StreamEnd() { return this->pos > this->tokens.length(); } - diff --git a/src/init.cpp b/src/init.cpp index 18c54d050..515f610f2 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -105,7 +105,7 @@ void Anope::Fork() { #ifndef _WIN32 kill(getppid(), SIGUSR2); - + freopen("/dev/null", "r", stdin); freopen("/dev/null", "w", stdout); freopen("/dev/null", "w", stderr); @@ -558,4 +558,3 @@ void Anope::Init(int ac, char **av) Serialize::CheckTypes(); } - diff --git a/src/language.cpp b/src/language.cpp index 7fd63c756..8b7b0ee37 100644 --- a/src/language.cpp +++ b/src/language.cpp @@ -125,4 +125,3 @@ const char *Language::Translate(const char *lang, const char *string) return string != NULL ? string : ""; } #endif - diff --git a/src/logger.cpp b/src/logger.cpp index b296d1081..935b0cfae 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -82,7 +82,7 @@ Log::Log(LogType t, CommandSource &src, Command *_c, ChannelInfo *_ci) : u(src.G { if (!c) throw CoreException("Invalid pointers passed to Log::Log"); - + if (type != LOG_COMMAND && type != LOG_OVERRIDE && type != LOG_ADMIN) throw CoreException("This constructor does not support this log type"); @@ -129,7 +129,7 @@ Log::~Log() std::cout << this->BuildPrefix() << this->buf.str() << std::endl; FOREACH_MOD(OnLog, (this)); - + if (Config) for (unsigned i = 0; i < Config->LogInfos.size(); ++i) if (Config->LogInfos[i].HasType(this->type, this->category)) @@ -377,7 +377,7 @@ void LogInfo::ProcessMessage(const Log *l) } } } - + tm *tm = localtime(&Anope::CurTime); if (tm->tm_mday != this->last_day) { @@ -407,4 +407,3 @@ void LogInfo::ProcessMessage(const Log *l) lf->stream << GetTimeStamp() << " " << buffer << std::endl; } } - diff --git a/src/mail.cpp b/src/mail.cpp index 0094f9b30..80a80d6d7 100644 --- a/src/mail.cpp +++ b/src/mail.cpp @@ -56,7 +56,7 @@ bool Mail::Send(User *u, NickCore *nc, BotInfo *service, const Anope::string &su return false; Configuration::Block *b = Config->GetBlock("mail"); - + if (!u) { if (!b->Get<bool>("usemail") || b->Get<const Anope::string>("sendfrom").empty()) diff --git a/src/memos.cpp b/src/memos.cpp index 4c4dfc63d..b04a385ca 100644 --- a/src/memos.cpp +++ b/src/memos.cpp @@ -49,7 +49,7 @@ Serializable* Memo::Unserialize(Serializable *obj, Serialize::Data &data) Anope::string owner; data["owner"] >> owner; - + bool ischan; MemoInfo *mi = MemoInfo::GetMemoInfo(owner, ischan); if (!mi) @@ -138,4 +138,3 @@ MemoInfo *MemoInfo::GetMemoInfo(const Anope::string &target, bool &ischan) return NULL; } - diff --git a/src/messages.cpp b/src/messages.cpp index 056d5853b..93c45ea87 100644 --- a/src/messages.cpp +++ b/src/messages.cpp @@ -61,7 +61,7 @@ void Invite::Run(MessageSource &source, const std::vector<Anope::string> ¶ms if (!targ || targ->server != Me || !c || c->FindUser(targ)) return; - + FOREACH_MOD(OnInvite, (source.GetUser(), c, targ)); } @@ -119,14 +119,14 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co /* Their TS is newer, don't accept any modes from them */ else if (ts > c->creation_time) keep_their_modes = false; - + /* Update the modes for the channel */ if (keep_their_modes && !modes.empty()) /* If we are syncing, mlock is checked later in Channel::Sync. It is important to not check it here * so that Channel::SetCorrectModes can correctly detect the presence of channel mode +r. */ c->SetModesInternal(source, modes, ts, !c->syncing); - + for (std::list<SJoinUser>::const_iterator it = users.begin(), it_end = users.end(); it != it_end; ++it) { const ChannelStatus &status = it->first; @@ -147,7 +147,7 @@ void Join::SJoin(MessageSource &source, const Anope::string &chan, time_t ts, co * they aren't allowed to have (secureops etc). */ c->SetCorrectModes(u, true); - + FOREACH_MOD(OnJoinChannel, (u, c)); } @@ -365,7 +365,7 @@ void Privmsg::Run(MessageSource &source, const std::vector<Anope::string> ¶m FOREACH_RESULT(OnBotPrivmsg, MOD_RESULT, (u, bi, message)); if (MOD_RESULT == EVENT_STOP) return; - + bi->OnMessage(u, message); } } @@ -499,4 +499,3 @@ void Whois::Run(MessageSource &source, const std::vector<Anope::string> ¶ms) else IRCD->SendNumeric(401, source.GetSource(), "%s :No such user.", params[0].c_str()); } - diff --git a/src/misc.cpp b/src/misc.cpp index 956514ceb..2c879365d 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -651,7 +651,7 @@ Anope::string Anope::VersionBuildString() if (!flags.empty()) s += ", flags " + flags; - + return s; } @@ -763,4 +763,3 @@ Anope::string Anope::Random(size_t len) buf.append(chars[rand() % sizeof(chars)]); return buf; } - diff --git a/src/modes.cpp b/src/modes.cpp index b559e7026..18d892e2f 100644 --- a/src/modes.cpp +++ b/src/modes.cpp @@ -397,7 +397,7 @@ bool ModeManager::AddUserMode(UserMode *um) return false; if (ModeManager::FindUserModeByName(um->name) != NULL) return false; - + if (um->name.empty()) { um->name = stringify(++GenericUserModes); @@ -470,10 +470,10 @@ void ModeManager::RemoveUserMode(UserMode *um) unsigned want = um->mchar; if (want >= UserModesIdx.size()) return; - + if (UserModesIdx[want] != um) return; - + UserModesIdx[want] = NULL; UserModesByName.erase(um->name); @@ -495,10 +495,10 @@ void ModeManager::RemoveChannelMode(ChannelMode *cm) unsigned want = cm->mchar; if (want >= ChannelModesIdx.size()) return; - + if (ChannelModesIdx[want] != cm) return; - + ChannelModesIdx[want] = NULL; } @@ -532,7 +532,7 @@ ChannelMode *ModeManager::FindChannelModeByChar(char mode) unsigned want = mode; if (want >= ChannelModesIdx.size()) return NULL; - + return ChannelModesIdx[want]; } @@ -541,7 +541,7 @@ UserMode *ModeManager::FindUserModeByChar(char mode) unsigned want = mode; if (want >= UserModesIdx.size()) return NULL; - + return UserModesIdx[want]; } @@ -566,11 +566,11 @@ char ModeManager::GetStatusChar(char value) unsigned want = value; if (want >= ChannelModesIdx.size()) return 0; - + ChannelMode *cm = ChannelModesIdx[want]; if (cm == NULL || cm->type != MODE_STATUS || cm->mchar == value) return 0; - + return cm->mchar; } @@ -769,21 +769,21 @@ Entry::Entry(const Anope::string &m, const Anope::string &fh) : name(m), mask(fh else this->nick = fh; } - + at = this->host.find('#'); if (at != Anope::string::npos) { this->real = this->host.substr(at + 1); this->host = this->host.substr(0, at); } - + /* If the mask is all *'s it will match anything, so just clear it */ if (this->nick.find_first_not_of("*") == Anope::string::npos) this->nick.clear(); - + if (this->user.find_first_not_of("*") == Anope::string::npos) this->user.clear(); - + if (this->host.find_first_not_of("*") == Anope::string::npos) this->host.clear(); else @@ -888,10 +888,9 @@ bool Entry::Matches(User *u, bool full) const else if (!this->host.empty() && !Anope::Match(u->GetDisplayedHost(), this->host) && !Anope::Match(u->GetCloakedHost(), this->host) && (!full || (!Anope::Match(u->host, this->host) && !Anope::Match(u->ip.addr(), this->host)))) ret = false; - + if (!this->real.empty() && !Anope::Match(u->realname, this->real)) ret = false; - + return ret; } - diff --git a/src/module.cpp b/src/module.cpp index 460f809a0..0fcf8687f 100644 --- a/src/module.cpp +++ b/src/module.cpp @@ -33,7 +33,7 @@ Module::Module(const Anope::string &modname, const Anope::string &, ModType modt if (ModuleManager::FindModule(this->name)) throw CoreException("Module already exists!"); - + if (Anope::NoThird && type & THIRD) throw ModuleException("Third party modules may not be loaded"); @@ -127,4 +127,3 @@ int ModuleVersion::GetPatch() const { return this->version_patch; } - diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 432d57bf5..ce17e61ae 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -28,7 +28,7 @@ void ModuleManager::CleanupRuntimeDirectory() { Anope::string dirbuf = Anope::DataDir + "/runtime"; - Log(LOG_DEBUG) << "Cleaning out Module run time directory (" << dirbuf << ") - this may take a moment please wait"; + Log(LOG_DEBUG) << "Cleaning out Module run time directory (" << dirbuf << ") - this may take a moment, please wait"; DIR *dirp = opendir(dirbuf.c_str()); if (!dirp) @@ -36,7 +36,7 @@ void ModuleManager::CleanupRuntimeDirectory() Log(LOG_DEBUG) << "Cannot open directory (" << dirbuf << ")"; return; } - + for (dirent *dp; (dp = readdir(dirp));) { if (!dp->d_ino) @@ -62,17 +62,17 @@ void ModuleManager::CleanupRuntimeDirectory() static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &output) { Anope::string input = Anope::ModuleDir + "/modules/" + name + ".so"; - + struct stat s; if (stat(input.c_str(), &s) == -1) return MOD_ERR_NOEXIST; else if (!S_ISREG(s.st_mode)) return MOD_ERR_NOEXIST; - + std::ifstream source(input.c_str(), std::ios_base::in | std::ios_base::binary); if (!source.is_open()) return MOD_ERR_NOEXIST; - + char *tmp_output = strdup(output.c_str()); int target_fd = mkstemp(tmp_output); if (target_fd == -1 || close(target_fd) == -1) @@ -85,7 +85,7 @@ static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &out free(tmp_output); Log(LOG_DEBUG_2) << "Runtime module location: " << output; - + std::ofstream target(output.c_str(), std::ios_base::in | std::ios_base::binary); if (!target.is_open()) { @@ -103,7 +103,7 @@ static ModuleReturn moduleCopyFile(const Anope::string &name, Anope::string &out target.write(buffer, read_len); want -= read_len; } - + source.close(); target.close(); @@ -216,7 +216,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u) dlclose(handle); return MOD_ERR_NOLOAD; } - + /* Create module. */ Anope::string nick; if (u) @@ -234,7 +234,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u) Log() << "Error while loading " << modname << ": " << ex.GetReason(); moderr = MOD_ERR_EXCEPTION; } - + if (moderr != MOD_ERR_OK) { if (dlclose(handle)) @@ -263,7 +263,7 @@ ModuleReturn ModuleManager::LoadModule(const Anope::string &modname, User *u) catch (const NotImplementedException &ex) { } - + if (moderr != MOD_ERR_OK) { DeleteModule(m); @@ -389,7 +389,7 @@ ModuleReturn ModuleManager::DeleteModule(Module *m) if (!filename.empty()) unlink(filename.c_str()); #endif - + return MOD_ERR_OK; } @@ -516,7 +516,7 @@ void ModuleManager::UnloadAll() if ((m->type & j) == m->type) modules.push_back(m->name); } - + for (unsigned i = 0; i < modules.size(); ++i) { Module *m = FindModule(modules[i]); @@ -524,4 +524,3 @@ void ModuleManager::UnloadAll() UnloadModule(m, NULL); } } - diff --git a/src/nickalias.cpp b/src/nickalias.cpp index fe32a2b69..653e9461b 100644 --- a/src/nickalias.cpp +++ b/src/nickalias.cpp @@ -214,4 +214,3 @@ Serializable* NickAlias::Unserialize(Serializable *obj, Serialize::Data &data) return na; } - diff --git a/src/nickcore.cpp b/src/nickcore.cpp index 59296ce94..cede8b6e4 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -31,7 +31,7 @@ NickCore::NickCore(const Anope::string &coredisplay) : Serializable("NickCore"), (*NickCoreList)[this->display] = this; if (old == NickCoreList->size()) Log(LOG_DEBUG) << "Duplicate account " << coredisplay << " in nickcore table?"; - + FOREACH_MOD(OnNickCoreCreate, (this)); } @@ -267,4 +267,3 @@ NickCore* NickCore::Find(const Anope::string &nick) return NULL; } - diff --git a/src/opertype.cpp b/src/opertype.cpp index 702ab758a..d7bce5df1 100644 --- a/src/opertype.cpp +++ b/src/opertype.cpp @@ -145,4 +145,3 @@ const std::list<Anope::string> OperType::GetPrivs() const } return priv_list; } - diff --git a/src/pipeengine.cpp b/src/pipeengine.cpp index 2ff429d75..51dfa2955 100644 --- a/src/pipeengine.cpp +++ b/src/pipeengine.cpp @@ -78,4 +78,3 @@ void Pipe::Notify() { this->Write("\0", 1); } - diff --git a/src/process.cpp b/src/process.cpp index b9798cded..6430fac46 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -50,7 +50,7 @@ void Anope::Process(const Anope::string &buffer) static const Anope::string proto_name = ModuleManager::FindFirstOf(PROTOCOL) ? ModuleManager::FindFirstOf(PROTOCOL)->name : ""; MessageSource src(source); - + EventReturn MOD_RESULT; FOREACH_RESULT(OnMessage, MOD_RESULT, (src, command, params)); if (MOD_RESULT == EVENT_STOP) @@ -84,7 +84,7 @@ void IRCDProto::Parse(const Anope::string &buffer, Anope::string &source, Anope: } sep.GetToken(command); - + for (Anope::string token; sep.GetToken(token);) { if (token[0] == ':') @@ -107,4 +107,3 @@ Anope::string IRCDProto::Format(const Anope::string &source, const Anope::string else return message; } - diff --git a/src/protocol.cpp b/src/protocol.cpp index 1195673e4..47a6dceee 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -360,16 +360,16 @@ bool IRCDProto::IsNickValid(const Anope::string &nick) if (nick.empty()) return false; - + Anope::string special = "[]\\`_^{|}"; - + for (unsigned i = 0; i < nick.length(); ++i) if (!(nick[i] >= 'A' && nick[i] <= 'Z') && !(nick[i] >= 'a' && nick[i] <= 'z') && special.find(nick[i]) == Anope::string::npos && (Config && Config->NickChars.find(nick[i]) == Anope::string::npos) && (!i || (!(nick[i] >= '0' && nick[i] <= '9') && nick[i] != '-'))) return false; - + return true; } @@ -502,4 +502,3 @@ unsigned IRCDMessage::GetParamCount() const { return this->param_count; } - diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 75edad507..8bbd5d1a6 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -62,7 +62,7 @@ Serializable* AutoKick::Unserialize(Serializable *obj, Serialize::Data &data) ChannelInfo *ci = ChannelInfo::Find(sci); if (!ci) return NULL; - + AutoKick *ak; NickCore *nc = NickCore::Find(snc); if (obj) @@ -87,7 +87,7 @@ Serializable* AutoKick::Unserialize(Serializable *obj, Serialize::Data &data) data["reason"] >> sreason; data["mask"] >> smask; - if (nc) + if (nc) ak = ci->AddAkick(screator, nc, sreason, addtime, lastused); else ak = ci->AddAkick(screator, smask, sreason, addtime, lastused); @@ -358,7 +358,7 @@ BotInfo *ChannelInfo::WhoSends() const { if (this && this->bi) return this->bi; - + BotInfo *ChanServ = Config->GetClient("ChanServ"); if (ChanServ) return ChanServ; @@ -578,7 +578,7 @@ void ChannelInfo::EraseAkick(unsigned index) { if (this->akick->empty() || index >= this->akick->size()) return; - + delete this->GetAkick(index); } diff --git a/src/serialize.cpp b/src/serialize.cpp index 765fab0a9..6a315641d 100644 --- a/src/serialize.cpp +++ b/src/serialize.cpp @@ -175,4 +175,3 @@ const std::map<Anope::string, Serialize::Type *>& Type::GetTypes() { return Types; } - diff --git a/src/servers.cpp b/src/servers.cpp index 59be5c1af..ffba8ecb1 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -80,7 +80,7 @@ Server::Server(Server *up, const Anope::string &sname, unsigned shops, const Ano } IRCD->SendBOB(); - + for (unsigned i = 0; i < Me->GetLinks().size(); ++i) { Server *s = Me->GetLinks()[i]; @@ -157,7 +157,7 @@ Server::~Server() for (unsigned i = this->links.size(); i > 0; --i) this->links[i - 1]->Delete(this->quit_reason); - + Servers::ByName.erase(this->name); if (!this->sid.empty()) Servers::ByID.erase(this->sid); @@ -336,18 +336,18 @@ void Server::Notice(BotInfo *source, const Anope::string &message) Server *Server::Find(const Anope::string &name, bool name_only) { Anope::map<Server *>::iterator it; - + if (!name_only) { it = Servers::ByID.find(name); if (it != Servers::ByID.end()) return it->second; } - + it = Servers::ByName.find(name); if (it != Servers::ByName.end()) return it->second; - + return NULL; } @@ -358,4 +358,3 @@ Server* Servers::GetUplink() return Me->GetLinks()[i]; return NULL; } - diff --git a/src/socket_clients.cpp b/src/socket_clients.cpp index 68fdaa4cf..e9c756d76 100644 --- a/src/socket_clients.cpp +++ b/src/socket_clients.cpp @@ -96,4 +96,3 @@ void ClientSocket::OnError(const Anope::string &error) { Log(LOG_DEBUG) << "Socket error: " << error; } - diff --git a/src/socket_transport.cpp b/src/socket_transport.cpp index c941d3112..60f7acbdb 100644 --- a/src/socket_transport.cpp +++ b/src/socket_transport.cpp @@ -32,7 +32,7 @@ bool BufferedSocket::ProcessRead() return false; if (len < 0) return SocketEngine::IgnoreErrno(); - + tbuffer[len] = 0; this->read_buffer.append(tbuffer); this->recv_len = len; @@ -130,7 +130,7 @@ bool BinarySocket::ProcessRead() int len = this->io->Recv(this, tbuffer, sizeof(tbuffer)); if (len <= 0) return false; - + return this->Read(tbuffer, len); } @@ -196,4 +196,3 @@ bool BinarySocket::Read(const char *buffer, size_t l) { return true; } - diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp index 5a2bdafe1..f20459988 100644 --- a/src/socketengines/socketengine_epoll.cpp +++ b/src/socketengines/socketengine_epoll.cpp @@ -28,7 +28,7 @@ void SocketEngine::Init() if (EngineHandle == -1) throw SocketException("Could not initialize epoll socket engine: " + Anope::LastError()); - + events.resize(DefaultSize); } @@ -46,7 +46,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag) bool before_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE]; s->flags[flag] = set; - + bool now_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE]; epoll_event ev; @@ -65,7 +65,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag) mod = EPOLL_CTL_MOD; else return; - + if (epoll_ctl(EngineHandle, mod, ev.data.fd, &ev) == -1) throw SocketException("Unable to epoll_ctl() fd " + stringify(ev.data.fd) + " to epoll: " + Anope::LastError()); } @@ -119,4 +119,3 @@ void SocketEngine::Process() delete s; } } - diff --git a/src/socketengines/socketengine_kqueue.cpp b/src/socketengines/socketengine_kqueue.cpp index f6b9abbfd..a6dd8b571 100644 --- a/src/socketengines/socketengine_kqueue.cpp +++ b/src/socketengines/socketengine_kqueue.cpp @@ -39,7 +39,7 @@ void SocketEngine::Init() if (kq_fd < 0) throw SocketException("Unable to create kqueue engine: " + Anope::LastError()); - + change_events.resize(DefaultSize); event_events.resize(DefaultSize); } @@ -56,7 +56,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag) return; s->flags[flag] = set; - + int mod; if (flag == SF_READABLE) mod = EVFILT_READ; @@ -121,4 +121,3 @@ void SocketEngine::Process() delete s; } } - diff --git a/src/socketengines/socketengine_poll.cpp b/src/socketengines/socketengine_poll.cpp index df65f12f9..1df4285e6 100644 --- a/src/socketengines/socketengine_poll.cpp +++ b/src/socketengines/socketengine_poll.cpp @@ -113,7 +113,7 @@ void SocketEngine::Process() for (unsigned i = 0, processed = 0; i < events.size() && processed != static_cast<unsigned>(total); ++i) { pollfd *ev = &events[i]; - + if (ev->revents != 0) ++processed; @@ -146,4 +146,3 @@ void SocketEngine::Process() delete s; } } - diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index b23f136a4..8853b546a 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -46,7 +46,7 @@ void SocketEngine::Change(Socket *s, bool set, SocketFlag flag) bool before_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE]; s->flags[flag] = set; - + bool now_registered = s->flags[SF_READABLE] || s->flags[SF_WRITABLE]; if (!before_registered && now_registered) @@ -146,4 +146,3 @@ void SocketEngine::Process() } } } - diff --git a/src/sockets.cpp b/src/sockets.cpp index 768104bca..7dffd743b 100644 --- a/src/sockets.cpp +++ b/src/sockets.cpp @@ -282,7 +282,7 @@ bool cidr::operator<(const cidr &other) const { if (this->addr.sa.sa_family != other.addr.sa.sa_family) return this->addr.sa.sa_family < other.addr.sa.sa_family; - + switch (this->addr.sa.sa_family) { case AF_INET: @@ -574,4 +574,3 @@ bool SocketEngine::IgnoreErrno() || GetLastError() == EINTR || GetLastError() == EINPROGRESS; } - diff --git a/src/timers.cpp b/src/timers.cpp index 576dcae6e..791666a6b 100644 --- a/src/timers.cpp +++ b/src/timers.cpp @@ -124,4 +124,3 @@ void TimerManager::DeleteTimersFor(Module *m) delete it->second; } } - diff --git a/src/tools/anopesmtp.cpp b/src/tools/anopesmtp.cpp index 7b974a398..dd7d1eef1 100644 --- a/src/tools/anopesmtp.cpp +++ b/src/tools/anopesmtp.cpp @@ -300,7 +300,7 @@ int smtp_send_email() if (!smtp_send("HELO anope\r\n")) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } @@ -323,7 +323,7 @@ int smtp_send_email() if (!smtp_send(buf)) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } @@ -343,7 +343,7 @@ int smtp_send_email() if (!smtp_send(buf)) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } @@ -362,7 +362,7 @@ int smtp_send_email() if (!smtp_send("DATA\r\n")) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } @@ -382,13 +382,13 @@ int smtp_send_email() for (std::vector<std::string>::const_iterator it = smail.smtp_headers.begin(), it_end = smail.smtp_headers.end(); it != it_end; ++it) if (!smtp_send(it->c_str())) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } if (!smtp_send("\r\n")) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } @@ -398,7 +398,7 @@ int smtp_send_email() { if (!smtp_send(it->c_str())) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } } @@ -407,7 +407,7 @@ int smtp_send_email() if (!smtp_send("\r\n.\r\n")) { - alog("SMTP: error writting to socket"); + alog("SMTP: error writing to socket"); return 0; } diff --git a/src/users.cpp b/src/users.cpp index 47d241b1f..9ccfb1743 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -141,7 +141,7 @@ void User::ChangeNick(const Anope::string &newnick, time_t ts) /* Sanity check to make sure we don't segfault */ if (newnick.empty()) throw CoreException("User::ChangeNick() got a bad argument"); - + this->super_admin = false; Log(this, "nick") << "(" << this->realname << ") changed nick to " << newnick; @@ -155,7 +155,7 @@ void User::ChangeNick(const Anope::string &newnick, time_t ts) NickAlias *old_na = NickAlias::Find(this->nick); if (old_na && (this->IsIdentified(true) || this->IsRecognized())) old_na->last_seen = Anope::CurTime; - + UserListByNick.erase(this->nick); this->nick = newnick; @@ -401,7 +401,7 @@ void User::Login(NickCore *core) if (this->server->IsSynced()) Log(this, "account") << "is now identified as " << this->nc->display; - + FOREACH_MOD(OnUserLogin, (this)); } @@ -409,7 +409,7 @@ void User::Logout() { if (!this->nc) return; - + Log(this, "account") << "is no longer identified as " << this->nc->display; std::list<User *>::iterator it = std::find(this->nc->users.begin(), this->nc->users.end(), this); @@ -839,4 +839,3 @@ void User::QuitUsers() delete *it; quitting_users.clear(); } - diff --git a/src/version.sh b/src/version.sh index cc83d73e7..128bbab8a 100644 --- a/src/version.sh +++ b/src/version.sh @@ -4,4 +4,3 @@ VERSION_MAJOR=2 VERSION_MINOR=0 VERSION_PATCH=5 VERSION_EXTRA="-git" - diff --git a/src/win32/dir/dir.cpp b/src/win32/dir/dir.cpp index eb162eeae..ff1a13934 100644 --- a/src/win32/dir/dir.cpp +++ b/src/win32/dir/dir.cpp @@ -8,7 +8,7 @@ #include "dir.h" #include <stdio.h> - + DIR *opendir(const char *path) { char real_path[MAX_PATH]; diff --git a/src/win32/dir/dir.h b/src/win32/dir/dir.h index 52956876c..9aa5e1b52 100644 --- a/src/win32/dir/dir.h +++ b/src/win32/dir/dir.h @@ -21,7 +21,7 @@ struct DIR WIN32_FIND_DATA data; bool read_first; }; - + DIR *opendir(const char *); dirent *readdir(DIR *); int closedir(DIR *); diff --git a/src/win32/pipe/pipe.cpp b/src/win32/pipe/pipe.cpp index 69a633f3a..8df71e546 100644 --- a/src/win32/pipe/pipe.cpp +++ b/src/win32/pipe/pipe.cpp @@ -56,6 +56,6 @@ int pipe(int fds[2]) fds[0] = cfd; fds[1] = afd; - + return 0; } diff --git a/src/win32/resource.h b/src/win32/resource.h index 9cd2c1e5d..ac74d9d81 100644 --- a/src/win32/resource.h +++ b/src/win32/resource.h @@ -10,19 +10,19 @@ // Microsoft Developer Studio generated include file. // Used by Win32GUI.rc // -#define VER_ANOPE 1 -#define MANIFEST_RESOURCE_ID 2 -#define ICON_APP 129 +#define VER_ANOPE 1 +#define MANIFEST_RESOURCE_ID 2 +#define ICON_APP 129 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NO_MFC 1 -#define _APS_NEXT_RESOURCE_VALUE 152 -#define _APS_NEXT_COMMAND_VALUE 40061 -#define _APS_NEXT_CONTROL_VALUE 1167 -#define _APS_NEXT_SYMED_VALUE 104 +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 152 +#define _APS_NEXT_COMMAND_VALUE 40061 +#define _APS_NEXT_CONTROL_VALUE 1167 +#define _APS_NEXT_SYMED_VALUE 104 #endif #endif diff --git a/src/win32/socket.cpp b/src/win32/socket.cpp index 8e7ee6f26..b4e7efe1a 100644 --- a/src/win32/socket.cpp +++ b/src/win32/socket.cpp @@ -86,7 +86,7 @@ int windows_inet_pton(int af, const char *src, void *dst) } return 1; } - + return 0; } diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp index 9aaa333ff..a4c6eff49 100644 --- a/src/win32/windows.cpp +++ b/src/win32/windows.cpp @@ -56,11 +56,11 @@ USHORT WindowsGetLanguage(const Anope::string &lang) for (int i = 0; i < sizeof(WindowsLanguages) / sizeof(WindowsLanguage); ++i) { WindowsLanguage &l = WindowsLanguages[i]; - + if (lang == l.languageName || !lang.find(l.languageName + ".")) return l.windowsLanguageName; } - + return LANG_NEUTRAL; } @@ -73,10 +73,10 @@ int gettimeofday(timeval *tv, void *) { SYSTEMTIME st; GetSystemTime(&st); - + tv->tv_sec = Anope::CurTime; tv->tv_usec = st.wMilliseconds; - + return 0; } @@ -248,7 +248,7 @@ int mkstemp(char *input) errno = EEXIST; return -1; } - + int fd = open(input, O_WRONLY | O_CREAT, S_IREAD | S_IWRITE); return fd; } diff --git a/src/xline.cpp b/src/xline.cpp index 0b3c650e9..e6c8d3eb4 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -467,4 +467,3 @@ XLine *XLineManager::CheckAllXLines(User *u) void XLineManager::OnExpire(const XLine *x) { } - |