]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Nuke trailing spaces
authorpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 14 Feb 2009 21:14:36 +0000 (21:14 +0000)
committerpeavey <peavey@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 14 Feb 2009 21:14:36 +0000 (21:14 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7

75 files changed:
include/base.h
include/command_parse.h
include/commands/cmd_whowas.h
include/configreader.h
include/ctables.h
include/dynamic.h
include/hash_map.h
include/hashcomp.h
include/inspircd.h
include/inspsocket.h
include/mode.h
include/modules.h
include/numerics.h
include/socketengines/socketengine_iocp.h
include/threadengines/threadengine_pthread.h
include/u_listmode.h
include/usermanager.h
include/users.h
include/xline.h
make/opensslcert.pm
src/channels.cpp
src/command_parse.cpp
src/commands.cpp
src/commands/cmd_die.cpp
src/commands/cmd_eline.cpp
src/commands/cmd_gline.cpp
src/commands/cmd_kline.cpp
src/commands/cmd_notice.cpp
src/commands/cmd_oper.cpp
src/commands/cmd_part.cpp
src/commands/cmd_privmsg.cpp
src/commands/cmd_reloadmodule.cpp
src/commands/cmd_stats.cpp
src/commands/cmd_userhost.cpp
src/commands/cmd_who.cpp
src/commands/cmd_whowas.cpp
src/commands/cmd_zline.cpp
src/dns.cpp
src/dynamic.cpp
src/hashcomp.cpp
src/helperfuncs.cpp
src/inspircd.cpp
src/inspstring.cpp
src/logger.cpp
src/modes/cmode_k.cpp
src/modules.cpp
src/modules/extra/m_sqloper.cpp
src/modules/extra/m_sqlutils.h
src/modules/extra/m_ssl_gnutls.cpp
src/modules/m_alias.cpp
src/modules/m_chanprotect.cpp
src/modules/m_dccallow.cpp
src/modules/m_filter.cpp
src/modules/m_operprefix.cpp
src/modules/m_override.cpp
src/modules/m_regex.h
src/modules/m_satopic.cpp
src/modules/m_services_account.cpp
src/modules/m_servprotect.cpp
src/modules/m_spanningtree/treeserver.cpp
src/modules/m_spanningtree/treeserver.h
src/modules/m_spanningtree/treesocket2.cpp
src/modules/rpc.h
src/modules/transport.h
src/server.cpp
src/snomasks.cpp
src/socket.cpp
src/socketengine.cpp
src/socketengines/socketengine_iocp.cpp
src/socketengines/socketengine_kqueue.cpp
src/timer.cpp
src/user_resolver.cpp
src/usermanager.cpp
src/users.cpp
src/xline.cpp

index 3a26b1be84ca1a7e40136e5901fd0a678512b4c8..4dbddf97f42b4de4fa0bbb5445dc7eb09298ad01 100644 (file)
@@ -11,8 +11,8 @@
  * ---------------------------------------------------
  */
 
-#ifndef __BASE_H__ 
-#define __BASE_H__ 
+#ifndef __BASE_H__
+#define __BASE_H__
 
 #include <map>
 #include <deque>
@@ -25,7 +25,7 @@ typedef std::map<std::string,char*> ExtensibleStore;
  * Wherever possible, all classes you create should inherit from this,
  * giving them the ability to be passed to various core functions
  * as 'anonymous' classes.
-*/ 
+*/
 class CoreExport classbase
 {
  public:
@@ -57,7 +57,7 @@ class CoreExport Extensible : public classbase
         * Holds all extensible metadata for the class.
         */
        ExtensibleStore Extension_Items;
-       
+
 public:
 
        /** Extend an Extensible class.
@@ -110,7 +110,7 @@ public:
         * @return Returns true on success.
         */
        bool Shrink(const std::string &key);
-       
+
        /** Get an extension item.
         *
         * @param key The key parameter is an arbitary string which identifies the extension data
@@ -131,12 +131,12 @@ public:
                        return false;
                }
        }
-       
+
        /** Get an extension item.
         *
         * @param key The key parameter is an arbitary string which identifies the extension data
         * @return Returns true if the item was found and false if it was not.
-        * 
+        *
         * This single-parameter version only checks if the key exists, it does nothing with
         * the 'data' field and is probably only useful in conjunction with the single-parameter
         * version of Extend().
@@ -205,7 +205,7 @@ class CoreExport BoolSet : public classbase
        /** OR two BoolSets together
         */
        BoolSet operator|(BoolSet other);
-       
+
        /** AND two BoolSets together
         */
        BoolSet operator&(BoolSet other);
index c2606a97d9e46d7081719be7b2688dc75cab8b4f..b3ae3236addb462a7f0a48bc3e4ff82949b3d33a 100644 (file)
@@ -118,7 +118,7 @@ class CoreExport CommandParser : public classbase
         * function will return true, otherwise it will return false.
         */
        bool IsValidCommand(const std::string &commandname, unsigned int pcnt, User * user);
-       
+
        /** LoopCall is used to call a command classes handler repeatedly based on the contents of a comma seperated list.
         * There are two overriden versions of this method, one of which takes two potential lists and the other takes one.
         * We need a version which takes two potential lists for JOIN, because a JOIN may contain two lists of items at once,
@@ -246,4 +246,3 @@ const int duration_multi[] =
 };
 
 #endif
-
index ba1a75ea90ef692cff6accf84c73ba0565658d84..bc20e893c62b646ad3e5891e84b8a4e0f2f80b70 100644 (file)
@@ -62,7 +62,7 @@ class CommandWhowas : public Command
        /** Whowas container, contains a map of vectors of users tracked by WHOWAS
         */
        whowas_users whowas;
-       
+
        /** Whowas container, contains a map of time_t to users tracked by WHOWAS
         */
        whowas_users_fifo whowas_fifo;
index 02defab6340bcad16e88f47fa4ccac9884c53a30..787bcb243f3b65a3433b6ac851ed3be70a209a51 100644 (file)
@@ -17,7 +17,7 @@
 /* handy defines */
 
 /** Determines if a channel op is exempt from given mode m,
- * in config of server instance s. 
+ * in config of server instance s.
  */
 #define CHANOPS_EXEMPT(s, m) (s->Config->ExemptChanOps[(unsigned char)m])
 
@@ -373,7 +373,7 @@ class CoreExport ServerConfig : public Extensible
        /** Not used any more as it is named, can probably be removed or renamed.
         */
        int DoDownloads();
-         
+
        /** This holds all the information in the config file,
         * it's indexed by tag name to a vector of key/values.
         */
@@ -419,7 +419,7 @@ class CoreExport ServerConfig : public Extensible
        /** Notice to give to users when they are Xlined
         */
        char MoronBanner[MAXBUF];
-       
+
        /* Holds the network name the local server
         * belongs to. This is an arbitary field defined
         * by the administrator.
@@ -546,7 +546,7 @@ class CoreExport ServerConfig : public Extensible
         * foreground.
         */
        bool nofork;
-       
+
        /** If this value if true then all log
         * messages will be output, regardless of
         * the level given in the config file.
@@ -554,7 +554,7 @@ class CoreExport ServerConfig : public Extensible
         * option.
         */
        bool forcedebug;
-       
+
        /** If this is true then log output will be
         * written to the logfile. This is the default.
         * If you put -nolog on the commandline then
@@ -694,7 +694,7 @@ class CoreExport ServerConfig : public Extensible
         * only to operators.
         */
        char UserStats[MAXBUF];
-       
+
        /** The path and filename of the ircd.log file
         */
        std::string logpath;
@@ -829,7 +829,7 @@ class CoreExport ServerConfig : public Extensible
         * tag/key/value at load-time rather than at read-value time.
         */
        bool LoadConf(ConfigDataHash &target, FILE* &conf, const std::string &filename, std::ostringstream &errorstream);
-       
+
        /** Writes 'length' chars into 'result' as a string
         */
        bool ConfValue(ConfigDataHash &target, const char* tag, const char* var, int index, char* result, int length, bool allow_linefeeds = false);
@@ -845,7 +845,7 @@ class CoreExport ServerConfig : public Extensible
        /** Writes 'length' chars into 'result' as a string
         */
        bool ConfValue(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index, std::string &result, bool allow_linefeeds = false);
-       
+
        /** Tries to convert the value to an integer and write it to 'result'
         */
        bool ConfValueInteger(ConfigDataHash &target, const char* tag, const char* var, int index, int &result);
@@ -861,7 +861,7 @@ class CoreExport ServerConfig : public Extensible
        /** Tries to convert the value to an integer and write it to 'result'
         */
        bool ConfValueInteger(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index, int &result);
-       
+
        /** Returns true if the value exists and has a true value, false otherwise
         */
        bool ConfValueBool(ConfigDataHash &target, const char* tag, const char* var, int index);
@@ -877,14 +877,14 @@ class CoreExport ServerConfig : public Extensible
        /** Returns true if the value exists and has a true value, false otherwise
         */
        bool ConfValueBool(ConfigDataHash &target, const std::string &tag, const std::string &var, const std::string &default_value, int index);
-       
+
        /** Returns the number of occurences of tag in the config file
         */
        int ConfValueEnum(ConfigDataHash &target, const char* tag);
        /** Returns the number of occurences of tag in the config file
         */
        int ConfValueEnum(ConfigDataHash &target, const std::string &tag);
-       
+
        /** Returns the numbers of vars inside the index'th 'tag in the config file
         */
        int ConfVarEnum(ConfigDataHash &target, const char* tag, int index);
@@ -945,7 +945,7 @@ bool InitTypes(ServerConfig* conf, const char* tag);
  */
 bool InitClasses(ServerConfig* conf, const char* tag);
 
-/** Initialize an oper type 
+/** Initialize an oper type
  */
 bool DoType(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
 
@@ -962,7 +962,7 @@ bool DoneClassesAndTypes(ServerConfig* conf, const char* tag);
 /** Initialize x line
  */
 bool InitXLine(ServerConfig* conf, const char* tag);
+
 /** Add a config-defined zline
  */
 bool DoZLine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
@@ -979,8 +979,4 @@ bool DoKLine(ServerConfig* conf, const char* tag, char** entries, ValueList &val
  */
 bool DoELine(ServerConfig* conf, const char* tag, char** entries, ValueList &values, int* types);
 
-
-
-
 #endif
-
index 7ff47abbfcad1ca814899783822b2c3dad830266..3e10e7c23bcf7d72db09579ad2c11d4a479c0e0e 100644 (file)
@@ -10,7 +10,7 @@
  *
  * ---------------------------------------------------
  */
+
 #ifndef __CTABLES_H__
 #define __CTABLES_H__
 
@@ -243,4 +243,3 @@ typedef nspace::hash_map<std::string,Command*> Commandtable;
        translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);translation.push_back(x8);
 
 #endif
-
index e910603f770b6e2986bf3c72ed743f33efbe07b5..b48eaeacdaf776d1cbe12b4d490226e74d9f96a3 100644 (file)
@@ -24,7 +24,7 @@ class CoreExport DLLManager
        /** The last error string, or NULL
         */
        const char *err;
+
  public:
        /** This constructor loads the module using dlopen()
         * @param ServerInstance The creator class of this object
@@ -65,7 +65,7 @@ class CoreExport LoadModuleException : public CoreException
        : CoreException(message, "the core")
        {
        }
-       
+
        /** This destructor solves world hunger, cancels the world debt, and causes the world to end.
         * Actually no, it does nothing. Never mind.
         * @throws Nothing!
@@ -82,7 +82,7 @@ class CoreExport FindSymbolException : public CoreException
        : CoreException(message, "the core")
        {
        }
-       
+
        /** This destructor solves world hunger, cancels the world debt, and causes the world to end.
         * Actually no, it does nothing. Never mind.
         * @throws Nothing!
@@ -102,8 +102,8 @@ template <typename ReturnType> class CoreExport DLLFactory : public DLLManager
         * The init_module function is the only exported extern "C" declaration
         * in any module file. In a cmd_*.cpp file the equivilant is init_command
         */
-       typedef ReturnType * (initfunctype) (InspIRCd*);         
+       typedef ReturnType * (initfunctype) (InspIRCd*);
+
        /** Pointer to the init function.
         */
        initfunctype* init_func;
@@ -111,7 +111,7 @@ template <typename ReturnType> class CoreExport DLLFactory : public DLLManager
        /** Instance pointer to be passed to init_*() when it is called.
         */
        InspIRCd* ServerInstance;
+
  public:
        /** Default constructor.
         * This constructor passes its paramerers down through DLLFactoryBase and then DLLManager
@@ -121,9 +121,9 @@ template <typename ReturnType> class CoreExport DLLFactory : public DLLManager
         */
        DLLFactory(InspIRCd* Instance, const char *fname, const char *func_name)
        : DLLManager(Instance, fname), init_func(NULL), ServerInstance(Instance)
-       {       
+       {
                const char* error = LastError();
-               
+
                if(!error)
                {
                        if(!GetSymbol((void **)&init_func, func_name))
@@ -136,7 +136,7 @@ template <typename ReturnType> class CoreExport DLLFactory : public DLLManager
                        throw LoadModuleException(error);
                }
        }
-       
+
        /** Calls the 'init_module' C exported function within a module, which
         * returns a pointer to a Module derived object.
         */
@@ -151,7 +151,7 @@ template <typename ReturnType> class CoreExport DLLFactory : public DLLManager
                        return NULL;
                }
        }
-       
+
        /** The destructor deletes the ModuleFactory pointer.
         */
        ~DLLFactory()
index 0da5c7433401280f01dcba1ff29b142765e14efd..f49b6a68ba5d3cf642d41806739c64e6dcf8b76b 100644 (file)
@@ -10,7 +10,7 @@
  *
  * ---------------------------------------------------
  */
+
 #ifndef INSPIRCD_HASHMAP_H
 #define INSPIRCD_HASHMAP_H
 
@@ -31,7 +31,7 @@
                #define hash_map unordered_map
                #define nspace std::tr1
                #define BEGIN_HASHMAP_NAMESPACE namespace std { namespace tr1 {
-               #define END_HASHMAP_NAMESPACE } } 
+               #define END_HASHMAP_NAMESPACE } }
        #endif
 #else
        #include <hash_map>
@@ -42,7 +42,4 @@
        #define END_HASHMAP_NAMESPACE }
 #endif
 
-
-
 #endif
-
index eaafef2c6c27b33bfeed1f8d02a7050c12a28c62..a1bc26602e8f0d9dab261afc01c2a44584c047b6 100644 (file)
@@ -288,15 +288,15 @@ namespace irc
                 * @param modeletter The mode letter to insert
                 */
                void Push(char modeletter);
-       
+
                /** Push a '+' symbol onto the stack.
                 */
                void PushPlus();
-       
+
                /** Push a '-' symbol onto the stack.
                 */
                void PushMinus();
-               
+
                /** Return zero or more elements which form the
                 * mode line. This will be clamped to a max of
                 * MAXMODES items (MAXMODES-1 mode parameters and
@@ -331,7 +331,7 @@ namespace irc
        class CoreExport tokenstream : public classbase
        {
         private:
-       
+
                /** Original string
                 */
                std::string tokens;
@@ -467,43 +467,43 @@ namespace irc
                /** Used to split on commas
                 */
                commasepstream* sep;
-       
+
                /** Current position in a range of ports
                 */
                long in_range;
-       
+
                /** Starting port in a range of ports
                 */
                long range_begin;
-       
+
                /** Ending port in a range of ports
                 */
                long range_end;
-       
+
                /** Allow overlapped port ranges
                 */
                bool overlapped;
-       
+
                /** Used to determine overlapping of ports
                 * without O(n) algorithm being used
                 */
                std::map<long, bool> overlap_set;
-       
+
                /** Returns true if val overlaps an existing range
                 */
                bool Overlaps(long val);
         public:
-       
+
                /** Create a portparser and fill it with the provided data
                 * @param source The source text to parse from
                 * @param allow_overlapped Allow overlapped ranges
                 */
                portparser(const std::string &source, bool allow_overlapped = true);
-       
+
                /** Frees the internal commasepstream object
                 */
                ~portparser();
-       
+
                /** Fetch the next token from the stream
                 * @return The next port number is returned, or 0 if none remain
                 */
@@ -703,4 +703,3 @@ BEGIN_HASHMAP_NAMESPACE
 END_HASHMAP_NAMESPACE
 
 #endif
-
index 40f9c23f4093c5c5ff8f58150159276ebb6cbaa1..fcd6849d5a5d3f184b3951b15bb2c3462591864c 100644 (file)
@@ -17,7 +17,7 @@
 #define _FILE_OFFSET_BITS 64
 #ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE
-#endif 
+#endif
 
 #ifndef WIN32
 #define DllExport
index 9d5375f8c315ce1eeb7a76f2c0fdf4876c564eb0..43903ae97a52084c4d2e4db20259b1cf446b5414 100644 (file)
@@ -236,7 +236,7 @@ class CoreExport BufferedSocket : public EventHandler
        virtual bool OnDataReady();
 
        /**
-        * When it is ok to write to the socket, and a 
+        * When it is ok to write to the socket, and a
         * write event was requested, this method is
         * triggered.
         *
@@ -345,4 +345,3 @@ class CoreExport BufferedSocket : public EventHandler
 };
 
 #endif
-
index 84085a913a8d7ce40a1ed49f9d325620575582d4..f78fcda9c3e63d8e1259d99d73967540603cca77 100644 (file)
@@ -460,17 +460,17 @@ class CoreExport ModeParser : public classbase
         * E.g.
         *
         * nick -> nick!*@*
-        * 
+        *
         * nick!ident -> nick!ident@*
-        * 
+        *
         * host.name -> *!*@host.name
-        * 
+        *
         * ident@host.name -> *!ident@host.name
         *
         * This method can be used on both IPV4 and IPV6 user masks.
         */
        static void CleanMask(std::string &mask);
-       /** Get the last string to be processed, as it was sent to the user or channel. 
+       /** Get the last string to be processed, as it was sent to the user or channel.
         * Use this to display a string you just sent to be parsed, as the actual output
         * may be different to what you sent after it has been 'cleaned up' by the parser.
         * @return Last parsed string, as seen by users.
@@ -574,4 +574,3 @@ class CoreExport ModeParser : public classbase
 };
 
 #endif
-
index 5d4b2463168cd74a41716ac33051a950f6f1c803..64eb3cfd13fcc692a0e8c504fc838065c2b2eb5f 100644 (file)
@@ -395,7 +395,7 @@ enum Implementation
        I_OnDecodeMetaData, I_ProtoSendMode, I_ProtoSendMetaData, I_OnWallops, I_OnChangeHost, I_OnChangeName, I_OnAddLine,
        I_OnDelLine, I_OnExpireLine, I_OnCleanup, I_OnUserPostNick, I_OnAccessCheck, I_On005Numeric, I_OnKill, I_OnRemoteKill, I_OnLoadModule, I_OnUnloadModule,
        I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite, I_OnRawMode,
-       I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckExtBan, I_OnCheckStringExtBan, I_OnStats, I_OnChangeLocalUserHost, I_OnChangeLocalUserGecos, 
+       I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckExtBan, I_OnCheckStringExtBan, I_OnStats, I_OnChangeLocalUserHost, I_OnChangeLocalUserGecos,
        I_OnLocalTopicChange, I_OnPostLocalTopicChange, I_OnEvent, I_OnRequest, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan, I_OnDelBan,
        I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
        I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnUserList,
@@ -548,7 +548,7 @@ class CoreExport Module : public Extensible
         * @return 1 To prevent the join, 0 to allow it.
         */
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven);
-       
+
        /** Called whenever a user is about to be kicked.
         * Returning a value of 1 from this function stops the process immediately, causing no
         * output to be sent to the user by the core. If you do this you must produce your own numerics,
@@ -590,7 +590,7 @@ class CoreExport Module : public Extensible
         * @param opertype The opers type name
         */
        virtual void OnPostOper(User* user, const std::string &opername, const std::string &opertype);
-       
+
        /** Called whenever a user types /INFO.
         * The User will contain the information of the user who typed the command. Modules may use this
         * method to output their own credits in /INFO (which is the ircd's version of an about box).
@@ -602,7 +602,7 @@ class CoreExport Module : public Extensible
         * @param user The user issuing /INFO
         */
        virtual void OnInfo(User* user);
-       
+
        /** Called whenever a /WHOIS is performed on a local user.
         * The source parameter contains the details of the user who issued the WHOIS command, and
         * the dest parameter contains the information of the user they are whoising.
@@ -610,7 +610,7 @@ class CoreExport Module : public Extensible
         * @param dest The user who is being WHOISed
         */
        virtual void OnWhois(User* source, User* dest);
-       
+
        /** Called whenever a user is about to invite another user into a channel, before any processing is done.
         * Returning 1 from this function stops the process immediately, causing no
         * output to be sent to the user by the core. If you do this you must produce your own numerics,
@@ -622,7 +622,7 @@ class CoreExport Module : public Extensible
         * @return 1 to deny the invite, 0 to check whether or not the user has permission to invite, -1 to explicitly allow the invite
         */
        virtual int OnUserPreInvite(User* source,User* dest,Channel* channel, time_t timeout);
-       
+
        /** Called after a user has been successfully invited to a channel.
         * You cannot prevent the invite from occuring using this function, to do that,
         * use OnUserPreInvite instead.
@@ -632,7 +632,7 @@ class CoreExport Module : public Extensible
         * @param timeout The time the invite will expire (0 == never)
         */
        virtual void OnUserInvite(User* source,User* dest,Channel* channel, time_t timeout);
-       
+
        /** Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
         * Returning any nonzero value from this function stops the process immediately, causing no
         * output to be sent to the user by the core. If you do this you must produce your own numerics,
@@ -682,7 +682,7 @@ class CoreExport Module : public Extensible
         * @param text The original message text causing the exempt list to be built
         */
        virtual void OnBuildExemptList(MessageType message_type, Channel* chan, User* sender, char status, CUList &exempt_list, const std::string &text);
-       
+
        /** Called before any nickchange, local or remote. This can be used to implement Q-lines etc.
         * Please note that although you can see remote nickchanges through this function, you should
         * NOT make any changes to the User if the user is a remote user as this may cause a desnyc.
@@ -865,7 +865,7 @@ class CoreExport Module : public Extensible
         * @param extdata Encoded data for this extension name, which will be encoded at the oppsite end by an identical module using OnDecodeMetaData
         */
        virtual void ProtoSendMetaData(void* opaque, TargetTypeFlags target_type, void* target, const std::string &extname, const std::string &extdata);
-       
+
        /** Called after every WALLOPS command.
         * @param user The user sending the WALLOPS
         * @param text The content of the WALLOPS message
@@ -1170,7 +1170,7 @@ class CoreExport Module : public Extensible
         * @param newhost The new GECOS
         * @return 1 to deny the GECOS change, 0 to allow
         */
-       virtual int OnChangeLocalUserGECOS(User* user, const std::string &newhost); 
+       virtual int OnChangeLocalUserGECOS(User* user, const std::string &newhost);
 
        /** Called whenever a topic is changed by a local user.
         * Return 1 to deny the topic change, 0 to check details on the change, -1 to let it through with no checks
@@ -1416,7 +1416,7 @@ class CoreExport ConfigReader : public classbase
        /** Error code
         */
        long error;
-       
+
   public:
        /** Default constructor.
         * This constructor initialises the ConfigReader class to read the inspircd.conf file
@@ -1571,7 +1571,7 @@ class CoreExport FileReader : public classbase
         * This function will return false if the file could not be opened.
         */
        bool Exists();
+
        /** Retrieve one line from the file.
         * This method retrieves one line from the text file. If an empty non-NULL string is returned,
         * the index was out of bounds, or the line had no data on it.
@@ -1622,7 +1622,7 @@ class CoreExport ModuleManager : public classbase
        /** Holds a string describing the last module error to occur
         */
        std::string LastModuleError;
+
        /** The feature names published by various modules
         */
        featurelist Features;
@@ -1630,11 +1630,11 @@ class CoreExport ModuleManager : public classbase
        /** The interface names published by various modules
         */
        interfacelist Interfaces;
+
        /** Total number of modules loaded into the ircd
         */
-       int ModCount; 
-       
+       int ModCount;
+
        /** Our pointer to the main insp instance
         */
        InspIRCd* Instance;
@@ -1657,7 +1657,7 @@ class CoreExport ModuleManager : public classbase
 
        /** Destructor
         */
-       ~ModuleManager(); 
+       ~ModuleManager();
 
        /** Change the priority of one event in a module.
         * Each module event has a list of modules which are attached to that event type.
@@ -1672,7 +1672,7 @@ class CoreExport ModuleManager : public classbase
         * set it to be the last called, or PRIO_BEFORE and PRIO_AFTER
         * to set it to be before or after one or more other modules.
         * @param modules If PRIO_BEFORE or PRIO_AFTER is set in parameter 's',
-        * then this contains a list of one or more modules your module must be 
+        * then this contains a list of one or more modules your module must be
         * placed before or after. Your module will be placed before the highest
         * priority module in this list for PRIO_BEFORE, or after the lowest
         * priority module in this list for PRIO_AFTER.
@@ -1720,7 +1720,7 @@ class CoreExport ModuleManager : public classbase
         * @param mod Module to detach from
         */
        void DetachAll(Module* mod);
+
        /** Returns text describing the last module error
         * @return The last error message to occur
         */
@@ -1737,11 +1737,11 @@ class CoreExport ModuleManager : public classbase
         * @return True if the module was unloaded
         */
        bool Unload(const char* filename);
-       
+
        /** Called by the InspIRCd constructor to load all modules from the config file.
         */
        void LoadAll();
-       
+
        /** Get the total number of currently loaded modules
         * @return The number of loaded modules
         */
@@ -1749,14 +1749,14 @@ class CoreExport ModuleManager : public classbase
        {
                return this->ModCount;
        }
-       
+
        /** Find a module by name, and return a Module* to it.
         * This is preferred over iterating the module lists yourself.
         * @param name The module name to look up
         * @return A pointer to the module, or NULL if the module cannot be found
         */
        Module* Find(const std::string &name);
+
        /** Publish a 'feature'.
         * There are two ways for a module to find another module it depends on.
         * Either by name, using InspIRCd::FindModule, or by feature, using this
index 11cd3b1e14f2985ce270aa4e56eafb09229c0717..76c5282a383de363b14d94671c3c2988161726ee 100644 (file)
@@ -1,7 +1,7 @@
 /*       +------------------------------------+
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
- *  
+ *
  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
@@ -128,7 +128,7 @@ enum Numerics
        ERR_NOPRIVILEGES                                =       481, // rfc, beware though, we use this for other things opers may not do also
        ERR_CHANOPRIVSNEEDED                            =       482, // rfc, beware though, we use this for other things like trying to kick a uline
 
-       ERR_ALLMUSTSSL                                  =       490, // unrealircd      
+       ERR_ALLMUSTSSL                                  =       490, // unrealircd
        ERR_NOCTCPALLOWED                               =       492, // XXX: bzzzz. 1459 defines this as ERR_NOSERVICEHOST, research it more and perhaps change this! (ERR_CANNOTSENDTOCHAN?)
                                                                                        // wtf, we also use this for m_noinvite. UGLY!
        ERR_DELAYREJOIN                                 =       495, // insp-specific, XXX: we should use 'resource temporarily unavailable' from ircnet/ratbox or whatever
index 95aa029d8f56e388c28a06e9b5852ae92604c147..97d78397b0a4e14111e145ea2af34ccc35ebcd80 100644 (file)
@@ -103,12 +103,12 @@ class IOCPEngine : public SocketEngine
                }
                return -1;
        }
-       
+
        /** Global I/O completion port that sockets attach to.
         */
        HANDLE m_completionPort;
 
-       /** This is kinda shitty... :/ for getting an address from a real fd. 
+       /** This is kinda shitty... :/ for getting an address from a real fd.
         */
        std::map<int, EventHandler*> m_binding;
 
@@ -144,7 +144,7 @@ public:
        __inline int GetRemainingFds()
        {
                register int count = 0;
-               register int i = 0;                     
+               register int i = 0;
                for(; i < MAX_DESCRIPTORS; ++i)
                        if(ref[i] == 0)
                                ++count;
@@ -238,4 +238,3 @@ public:
 };
 
 #endif
-
index 0963f28f305b2da7b482014a63a7404f9f210dcb..2d732cb5fe093436e3cb286207de136485da7ece 100644 (file)
@@ -24,7 +24,7 @@ class InspIRCd;
 class CoreExport PThreadEngine : public ThreadEngine
 {
  private:
-       
+
        bool Mutex(bool enable);
 
  public:
index 666e851f74d5cf8bb9ba69cfea5651edbdc49eb3..b08ad8d4dc82ec131cc8f20c9fc8b3877168688e 100644 (file)
@@ -19,7 +19,7 @@
 inline std::string stringtime(InspIRCd* Instance)
 {
        std::ostringstream TIME;
-       TIME << Instance->Time(); 
+       TIME << Instance->Time();
        return TIME.str();
 }
 
@@ -129,7 +129,7 @@ class ListModeBase : public ModeHandler
         * specified in ListModeBase::configtag
         */
        limitlist chanlimits;
+
  public:
        /** Constructor.
         * @param Instance The creator of this class
@@ -147,7 +147,7 @@ class ListModeBase : public ModeHandler
                infokey = "listbase_mode_" + std::string(1, mode) + "_list";
        }
 
-       /** See mode.h 
+       /** See mode.h
         */
        std::pair<bool,std::string> ModeSet(User*, User*, Channel* channel, const std::string &parameter)
        {
@@ -222,7 +222,7 @@ class ListModeBase : public ModeHandler
                                        mode_junk.push_back(stackresult[j]);
                                }
 
-                               ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);                
+                               ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
                        }
                }
        }
@@ -299,7 +299,7 @@ class ListModeBase : public ModeHandler
                                {
                                        /* Give a subclass a chance to error about this */
                                        TellAlreadyOnList(source, channel, parameter);
-                                       
+
                                        // it does, deny the change
                                        return MODEACTION_DENY;
                                }
@@ -350,9 +350,9 @@ class ListModeBase : public ModeHandler
                        {
                                source->WriteNumeric(478, "%s %s %s :Channel ban/ignore list is full", source->nick.c_str(), channel->name.c_str(), parameter.c_str());
                        }
-                       
+
                        parameter = "";
-                       return MODEACTION_DENY; 
+                       return MODEACTION_DENY;
                }
                else
                {
@@ -445,7 +445,7 @@ class ListModeBase : public ModeHandler
        virtual void DoCleanup(int, void*)
        {
        }
-       
+
        /** Validate parameters.
         * Overridden by implementing module.
         * @param source Source user adding the parameter
@@ -457,7 +457,7 @@ class ListModeBase : public ModeHandler
        {
                return true;
        }
-       
+
        /** Tell the user the list is too long.
         * Overridden by implementing module.
         * @param source Source user adding the parameter
@@ -469,7 +469,7 @@ class ListModeBase : public ModeHandler
        {
                return false;
        }
-       
+
        /** Tell the user an item is already on the list.
         * Overridden by implementing module.
         * @param source Source user adding the parameter
@@ -479,7 +479,7 @@ class ListModeBase : public ModeHandler
        virtual void TellAlreadyOnList(User*, Channel*, std::string&)
        {
        }
-       
+
        /** Tell the user that the parameter is not in the list.
         * Overridden by implementing module.
         * @param source Source user removing the parameter
@@ -519,7 +519,7 @@ class ListModeBase : public ModeHandler
                                {
                                        LM->literal = LM->user->nick + "!" + LM->user->ident + "@" + LM->user->GetIPString();
                                }
-                               
+
                                for (modelist::iterator it = mlist->begin(); it != mlist->end(); it++)
                                {
                                        if (LM->extban && it->mask.length() > 1 && it->mask[0] == LM->extban && it->mask[1] == ':')
@@ -560,4 +560,3 @@ class ListModeBase : public ModeHandler
 };
 
 #endif
-
index 452be27fe320ec97eafe88b4c606b22e18257da8..bc00326969cca1737d84e80e04298b7c5bd31694 100644 (file)
@@ -31,7 +31,7 @@ class CoreExport UserManager : public Extensible
        UserManager(InspIRCd *Instance) : ServerInstance(Instance)
        {
        }
-       
+
        ~UserManager()
        {
                for (user_hash::iterator i = clientlist->begin();i != clientlist->end();i++)
@@ -99,7 +99,7 @@ class CoreExport UserManager : public Extensible
        void AddGlobalClone(User *user);
 
        /** Remove all clone counts from the user, you should
-        * use this if you change the user's IP address 
+        * use this if you change the user's IP address
         * after they have registered.
         * @param user The user to remove
         */
index ab8e53b090d77aa5fe4f1068fe79cc4d1d14d5a0..e723bb434ae6127057c208a7919172813efd661d 100644 (file)
@@ -514,26 +514,26 @@ class CoreExport User : public EventHandler
         * Use InspIRCd::IsNick() to validate nicknames.
         */
        std::string nick;
-       
+
        /** The user's unique identifier.
         * This is the unique identifier which the user has across the network.
         */
        std::string uuid;
-       
+
        /** The users ident reply.
         * Two characters are added to the user-defined limit to compensate for the tilde etc.
         */
        std::string ident;
-       
+
        /** The host displayed to non-opers (used for cloaking etc).
         * This usually matches the value of User::host.
         */
        std::string dhost;
-       
+
        /** The users full name (GECOS).
         */
        std::string fullname;
-       
+
        /** The user's mode list.
         * NOT a null terminated string.
         * Also NOT an array.
@@ -563,7 +563,7 @@ class CoreExport User : public EventHandler
         * If this string is empty, the user is not marked as away.
         */
        std::string awaymsg;
-       
+
        /** Time the user last went away.
         * This is ONLY RELIABLE if user IS_AWAY()!
         */
@@ -575,7 +575,7 @@ class CoreExport User : public EventHandler
         * The value of this is the value of a valid 'type name=' tag.
         */
        std::string oper;
-       
+
        /** True when DNS lookups are completed.
         * The UserResolver classes res_forward and res_reverse will
         * set this value once they complete.
@@ -587,7 +587,7 @@ class CoreExport User : public EventHandler
         * modules may check it.
         */
        std::string password;
-       
+
        /** User's receive queue.
         * Lines from the IRCd awaiting processing are stored here.
         * Upgraded april 2005, old system a bit hairy.
@@ -1156,4 +1156,3 @@ class CoreExport UserResolver : public Resolver
 //class ServerConfig;
 
 #endif
-
index 5d0a978b82efc3c8fb305e533d044196941da26d..6f596ae10b549cea315de93fdefeb1ec9549137b 100644 (file)
@@ -121,15 +121,15 @@ class CoreExport XLine : public classbase
        /** The time the line was added.
         */
        time_t set_time;
-       
+
        /** The duration of the ban, or 0 if permenant
         */
        long duration;
-       
+
        /** Source of the ban. This can be a servername or an oper nickname
         */
        char* source;
-       
+
        /** Reason for the ban
         */
        char* reason;
@@ -378,7 +378,7 @@ class CoreExport QLine : public XLine
  */
 typedef std::pair<std::string, std::string> IdentHostPair;
 
-/** XLineFactory is used to generate an XLine pointer, given just the 
+/** XLineFactory is used to generate an XLine pointer, given just the
  * pattern, timing information and type of line to create. This is used
  * for example in the spanningtree module which will call an XLineFactory
  * to create a new XLine when it is inbound on a server link, so that it
@@ -399,7 +399,7 @@ class CoreExport XLineFactory : public classbase
         * @param t Type of XLine this factory generates
         */
        XLineFactory(InspIRCd* Instance, const std::string &t) : ServerInstance(Instance), type(t) { }
-       
+
        /** Return the type of XLine this factory generates
         * @return The type of XLine this factory generates
         */
@@ -547,7 +547,7 @@ class CoreExport XLineManager : public classbase
         * will generate a new XLine specialized to that type. For example if you
         * pass the XLineFactory that handles glines some data it will return a
         * pointer to a GLine, polymorphically represented as XLine. This is used where
-        * you do not know the full details of the item you wish to create, e.g. in a 
+        * you do not know the full details of the item you wish to create, e.g. in a
         * server protocol module like m_spanningtree, when you receive xlines from other
         * servers.
         * @param xlf XLineFactory pointer to register
@@ -681,4 +681,3 @@ class CoreExport ZLineFactory : public XLineFactory
 };
 
 #endif
-
index 1de34eef65aace068d4c5b6551075521a7791787..5c6689dc743783248912fdb1a0eac2087b8e0a4d 100644 (file)
@@ -44,7 +44,7 @@ __END__
 close(FH);
 
 my $time = promptstring_s("Please enter the number of days that this certificate is valid for","365");
-       
+
 system("cat openssl.template | openssl req -x509 -nodes -newkey rsa:1024 -keyout key.pem -out cert.pem -days $time 2>/dev/null");
 system("openssl dhparam -out dhparams.pem 1024");
 unlink("openssl.template");
index 9ed0f8ee400ead02f0390535d9991bc1afad65a8..b8195ee9f6c4475c8b64a6fae8c2310b8daedce3 100644 (file)
@@ -81,7 +81,7 @@ int Channel::SetTopic(User *u, std::string &ntopic, bool forceset)
                        /* 0: check status, 1: don't, -1: disallow change silently */
 
                        FOREACH_RESULT(I_OnLocalTopicChange,OnLocalTopicChange(u,this,ntopic));
-               
+
                        if (MOD_RESULT == 1)
                                return CMD_FAILURE;
                        else if (MOD_RESULT == 0)
index 9ea7b020229569b13fd46358effdefbac880ebf1..7c18c8ab19cd8cb772bac95d3eddeecc479f34ca 100644 (file)
@@ -262,10 +262,10 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
                command_p.push_back(token);
 
        std::transform(command.begin(), command.end(), command.begin(), ::toupper);
-               
+
        /* find the command, check it exists */
        Commandtable::iterator cm = cmdlist.find(command);
-       
+
        if (cm == cmdlist.end())
        {
                int MOD_RESULT = 0;
@@ -310,7 +310,7 @@ bool CommandParser::ProcessCommand(User *user, std::string &cmd)
                {
                        // BE CAREFUL: .end() returns past the end of the vector, hence decrement.
                        std::vector<std::string>::iterator it = --command_p.end();
-               
+
                        lparam.insert(0, " " + *(it));
                        command_p.erase(it); // remove last element
                }
@@ -679,5 +679,3 @@ int CommandParser::TranslateUIDs(TranslateType to, const std::string &source, st
 
        return translations;
 }
-
-
index 18153d87bca84ef03c31d057661dcebb3c3a7e4d..9a388684f5d6284b1434a8214717af3fa8280829 100644 (file)
@@ -23,13 +23,13 @@ bool InspIRCd::HostMatchesEveryone(const std::string &mask, User* user)
 {
        char itrigger[MAXBUF];
        long matches = 0;
-       
+
        if (!Config->ConfValue(Config->config_data, "insane","trigger", 0, itrigger, MAXBUF))
                strlcpy(itrigger,"95.5",MAXBUF);
-       
+
        if (Config->ConfValueBool(Config->config_data, "insane","hostmasks", 0))
                return false;
-       
+
        for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++)
        {
                if ((InspIRCd::Match(u->second->MakeHost(), mask, ascii_case_insensitive_map)) ||
@@ -55,13 +55,13 @@ bool InspIRCd::IPMatchesEveryone(const std::string &ip, User* user)
 {
        char itrigger[MAXBUF];
        long matches = 0;
-       
+
        if (!Config->ConfValue(Config->config_data, "insane","trigger",0,itrigger,MAXBUF))
                strlcpy(itrigger,"95.5",MAXBUF);
-       
+
        if (Config->ConfValueBool(Config->config_data, "insane","ipmasks",0))
                return false;
-       
+
        for (user_hash::iterator u = this->Users->clientlist->begin(); u != this->Users->clientlist->end(); u++)
        {
                if (InspIRCd::Match(u->second->GetIPString(), ip, ascii_case_insensitive_map))
@@ -84,10 +84,10 @@ bool InspIRCd::NickMatchesEveryone(const std::string &nick, User* user)
 {
        char itrigger[MAXBUF];
        long matches = 0;
-       
+
        if (!Config->ConfValue(Config->config_data, "insane","trigger",0,itrigger,MAXBUF))
                strlcpy(itrigger,"95.5",MAXBUF);
-       
+
        if (Config->ConfValueBool(Config->config_data, "insane","nickmasks",0))
                return false;
 
index 7d9204fe63ef0c15051e57ff9f3e129ba1da9018..9f1bf45918a764f980bec8eeeefe135f649381d4 100644 (file)
@@ -31,7 +31,7 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User *
                        ServerInstance->Logs->Log("COMMAND",SPARSE, diebuf);
                        ServerInstance->SendError(diebuf);
                }
-               
+
                if (ServerInstance->Config->DieDelay)
                        sleep(ServerInstance->Config->DieDelay);
 
index 782ef8c45b1d82255cc192c4184d46caf539a5c1..0a4c328669a30717ffd295b7aeb2239b14a6a65e 100644 (file)
@@ -25,7 +25,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 CmdResult CommandEline::Handle (const std::vector<std::string>& parameters, User *user)
 {
        std::string target = parameters[0];
-       
+
        if (parameters.size() >= 3)
        {
                IdentHostPair ih;
index 18b5fa9ef24e3fe4833315f757e07d168e16a144..ad60b04166f364728f52280a9df441e8ab35aa75 100644 (file)
@@ -25,7 +25,7 @@ extern "C" DllExport Command* init_command(InspIRCd* Instance)
 CmdResult CommandGline::Handle (const std::vector<std::string>& parameters, User *user)
 {
        std::string target = parameters[0];
-               
+
        if (parameters.size() >= 3)
        {
                IdentHostPair ih;
@@ -92,4 +92,3 @@ CmdResult CommandGline::Handle (const std::vector<std::string>& parameters, User
 
        return CMD_SUCCESS;
 }
-
index 827951366705c90627345b79554fe6fddacbdfc4..691c92444a268f72c64e64a6f24c4865435fa6db 100644 (file)
@@ -38,7 +38,7 @@ CmdResult CommandKline::Handle (const std::vector<std::string>& parameters, User
                }
                else
                        ih = ServerInstance->XLines->IdentSplit(target.c_str());
-                       
+
         if (ih.first.empty())
         {
             user->WriteServ("NOTICE %s :*** Target not found", user->nick.c_str());
@@ -91,4 +91,3 @@ CmdResult CommandKline::Handle (const std::vector<std::string>& parameters, User
 
        return CMD_SUCCESS;
 }
-
index d22bd2fce9f1051ed2af73b8a7d9a81c222050bf..3e249b8641692f1ba1d52a366c6a5ce1202579ee 100644 (file)
@@ -27,7 +27,7 @@ CmdResult CommandNotice::Handle (const std::vector<std::string>& parameters, Use
        CUList exempt_list;
 
        user->idle_lastmsg = ServerInstance->Time();
-       
+
        if (ServerInstance->Parser->LoopCall(user, this, parameters, 0))
                return CMD_SUCCESS;
        if (parameters[0][0] == '$')
@@ -123,7 +123,7 @@ CmdResult CommandNotice::Handle (const std::vector<std::string>& parameters, Use
                }
                return CMD_SUCCESS;
        }
-       
+
        const char* destnick = parameters[0].c_str();
 
        if (IS_LOCAL(user))
@@ -185,4 +185,3 @@ CmdResult CommandNotice::Handle (const std::vector<std::string>& parameters, Use
        return CMD_SUCCESS;
 
 }
-
index da07d631c34d40b94577509b168b24ccdd3f4340..270306b05410e6b09358234bc504046323afb905 100644 (file)
@@ -128,7 +128,7 @@ CmdResult CommandOper::Handle (const std::vector<std::string>& parameters, User
                        // tell them they suck, and lag them up to help prevent brute-force attacks
                        user->WriteNumeric(491, "%s :Invalid oper credentials",user->nick.c_str());
                        user->IncreasePenalty(10);
-                       
+
                        snprintf(broadcast, MAXBUF, "WARNING! Failed oper attempt by %s!%s@%s using login '%s': The following fields do not match: %s", user->nick.c_str(), user->ident.c_str(), user->host.c_str(), parameters[0].c_str(), fields.c_str());
                        ServerInstance->SNO->WriteToSnoMask('o',std::string(broadcast));
                        ServerInstance->PI->SendSNONotice("o", std::string("OPER: ") + broadcast);
@@ -150,4 +150,3 @@ CmdResult CommandOper::Handle (const std::vector<std::string>& parameters, User
        }
        return CMD_SUCCESS;
 }
-
index 54fd1321667c7eec4552b3e259340bec4d66d8a5..d9fbfb595712214b38c495821936aaf62d9e49bc 100644 (file)
@@ -44,7 +44,7 @@ CmdResult CommandPart::Handle (const std::vector<std::string>& parameters, User
                return CMD_SUCCESS;
 
        Channel* c = ServerInstance->FindChan(parameters[0]);
-       
+
        if (c)
        {
                if (!c->PartUser(user, reason))
index 64adafbe8ac9b71e7a4406575fed31e120215f89..0ff7661a37f8b6e0c0a14f6b5dcc672ff7c47044 100644 (file)
@@ -26,7 +26,7 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us
        CUList except_list;
 
        user->idle_lastmsg = ServerInstance->Time();
-       
+
        if (ServerInstance->Parser->LoopCall(user, this, parameters, 0))
                return CMD_SUCCESS;
 
@@ -120,7 +120,7 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us
                                        chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %c%s :%s", status, chan->name.c_str(), text);
                                }
                        }
-                       else 
+                       else
                        {
                                chan->WriteAllExcept(user, false, status, except_list, "PRIVMSG %s :%s", chan->name.c_str(), text);
                        }
@@ -141,7 +141,7 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us
        if (IS_LOCAL(user))
        {
                const char* targetserver = strchr(destnick, '@');
-       
+
                if (targetserver)
                {
                        std::string nickonly;
@@ -176,7 +176,7 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us
                }
 
                int MOD_RESULT = 0;
-               
+
                std::string temp = parameters[1];
                FOREACH_RESULT(I_OnUserPreMessage,OnUserPreMessage(user, dest, TYPE_USER, temp, 0, except_list));
                if (MOD_RESULT) {
@@ -202,4 +202,3 @@ CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, Us
        }
        return CMD_SUCCESS;
 }
-
index ba31dbd3ef8e22537aaf365e8d656aba292923b5..6920896d8d5d7323fb9ce15afef83a52fa7529b2 100644 (file)
@@ -31,7 +31,7 @@ CmdResult CommandReloadmodule::Handle (const std::vector<std::string>& parameter
                        return CMD_SUCCESS;
                }
        }
-       
+
        ServerInstance->SNO->WriteToSnoMask('A', "RELOAD MODULE: %s unsuccessfully reloaded %s",user->nick.c_str(), parameters[0].c_str());
        user->WriteNumeric(975, "%s %s :%s",user->nick.c_str(), parameters[0].c_str(), ServerInstance->Modules->LastError().c_str());
        return CMD_FAILURE;
index aea34511cb7eadc70e4229b0f79fb4a06eb75d8d..66274c58ac67939bc81b262dd8f296fa4cd5c0fa 100644 (file)
@@ -61,7 +61,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
                results.push_back(sn + " 481 " + user->nick + " :Permission denied - STATS " + statschar + " requires the servers/auspex priv.");
                return;
        }
-       
+
        int MOD_RESULT = 0;
        FOREACH_RESULT(I_OnStats,OnStats(statschar, user, results));
        if (MOD_RESULT)
@@ -93,7 +93,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
                case 'n':
                case 'c':
                break;
-       
+
                case 'i':
                {
                        int idx = 0;
@@ -105,7 +105,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
                        }
                }
                break;
-       
+
                case 'Y':
                {
                        int idx = 0;
@@ -129,7 +129,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
                        }
                }
                break;
-       
+
                case 'P':
                {
                        int idx = 0;
@@ -145,7 +145,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
                        results.push_back(sn+" 249 "+user->nick+" :"+ConvToStr(idx)+" OPER(s)");
                }
                break;
+
                case 'k':
                        ServerInstance->XLines->InvokeStats("K",216,user,results);
                break;
@@ -239,7 +239,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
                                timeval tv;
                                char percent[30];
                                gettimeofday(&tv, NULL);
-                       
+
                                float n_elapsed = ((tv.tv_sec - ServerInstance->stats->LastSampled.tv_sec) * 1000000 + tv.tv_usec - ServerInstance->stats->LastSampled.tv_usec);
                                float n_eaten = ((R.ru_utime.tv_sec - ServerInstance->stats->LastCPU.tv_sec) * 1000000 + R.ru_utime.tv_usec - ServerInstance->stats->LastCPU.tv_usec);
                                float per = (n_eaten / n_elapsed) * 100;
@@ -259,7 +259,7 @@ DllExport void DoStats(InspIRCd* ServerInstance, char statschar, User* user, str
 #endif
                }
                break;
-       
+
                case 'T':
                {
                        char buffer[MAXBUF];
index 8ed5f606c4a3c84792ef50c6307051a2c9b79d24..40ba937c1ad9561b191010c2ee57472342bfd40f 100644 (file)
@@ -23,7 +23,6 @@ CmdResult CommandUserhost::Handle (const std::vector<std::string>& parameters, U
 {
        std::string retbuf = std::string("302 ") + user->nick + " :";
 
-       
        for (unsigned int i = 0; i < parameters.size(); i++)
        {
                User *u = ServerInstance->FindNick(parameters[i]);
index 4f44fd5182ed51605e7adcea4060c7be1ccd7c7e..9ba3c0fc93a1aae112759a45af2bb9e542a795e5 100644 (file)
@@ -286,10 +286,10 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
                if (CanView(ch,user))
                {
                        bool inside = ch->HasUser(user);
-       
+
                        /* who on a channel. */
                        CUList *cu = ch->GetUsers();
-       
+
                        for (CUList::iterator i = cu->begin(); i != cu->end(); i++)
                        {
                                /* None of this applies if we WHO ourselves */
@@ -298,12 +298,12 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
                                        /* opers only, please */
                                        if (opt_viewopersonly && !IS_OPER(i->first))
                                                continue;
-       
+
                                        /* If we're not inside the channel, hide +i users */
                                        if (i->first->IsModeSet('i') && !inside && !user->HasPrivPermission("users/auspex"))
                                                continue;
                                }
-       
+
                                SendWhoLine(user, initial, ch, i->first, whoresults);
                        }
                }
@@ -362,4 +362,3 @@ CmdResult CommandWho::Handle (const std::vector<std::string>& parameters, User *
                return CMD_FAILURE;
        }
 }
-
index f15b523c06db9128789c290fcc95618394110430..6340216f7768c800a20b1c45f46da0a9fa26c624 100644 (file)
@@ -56,18 +56,18 @@ CmdResult CommandWhowas::Handle (const std::vector<std::string>& parameters, Use
                                time_t rawtime = u->signon;
                                tm *timeinfo;
                                char b[MAXBUF];
-       
+
                                timeinfo = localtime(&rawtime);
-                               
+
                                /* XXX - 'b' could be only 25 chars long and then strlcpy() would terminate it for us too? */
                                strlcpy(b,asctime(timeinfo),MAXBUF);
                                b[24] = 0;
 
                                user->WriteNumeric(314, "%s %s %s %s * :%s",user->nick.c_str(),parameters[0].c_str(),u->ident,u->dhost,u->gecos);
-                               
+
                                if (user->HasPrivPermission("users/auspex"))
                                        user->WriteNumeric(379, "%s %s :was connecting from *@%s", user->nick.c_str(), parameters[0].c_str(), u->host);
-                               
+
                                if (*ServerInstance->Config->HideWhoisServer && !user->HasPrivPermission("servers/auspex"))
                                        user->WriteNumeric(312, "%s %s %s :%s",user->nick.c_str(),parameters[0].c_str(), ServerInstance->Config->HideWhoisServer, b);
                                else
index f275ac313f04bd3e9b9059f50c210201e024dd34..b0df24a9526af63118541653298c7bbd9b30ea2a 100644 (file)
@@ -35,7 +35,7 @@ CmdResult CommandZline::Handle (const std::vector<std::string>& parameters, User
                }
 
                User *u = ServerInstance->FindNick(target.c_str());
-               
+
                if (u)
                {
                        target = u->GetIPString();
index 0801fc76c247def976c0a5fb877deb2ea7a9aad1..4e2a5b5a9503a79e66f996944f8ab2d2f1a4103f 100644 (file)
@@ -214,7 +214,7 @@ int DNSRequest::SendRequests(const DNSHeader *header, const int length, QueryTyp
 
        this->rr_class = 1;
        this->type = qt;
-               
+
        DNS::EmptyHeader(payload,header,length);
 
 #ifdef IPV6
@@ -250,7 +250,7 @@ DNSRequest* DNS::AddQuery(DNSHeader *header, int &id, const char* original)
        /* Is the DNS connection down? */
        if (this->GetFd() == -1)
                return NULL;
-       
+
        /* Create an id */
        id = this->PRNG() & DNS::MAX_REQUEST_ID;
 
@@ -405,7 +405,7 @@ DNS::DNS(InspIRCd* Instance) : ServerInstance(Instance)
        /* DNS::Rehash() sets this to a valid ptr
         */
        this->cache = NULL;
-       
+
        /* Again, DNS::Rehash() sets this to a
         * valid value
         */
@@ -463,7 +463,7 @@ int DNS::GetIP(const char *name)
        DNSHeader h;
        int id;
        int length;
-       
+
        if ((length = this->MakePayload(name, DNS_QUERY_A, 1, (unsigned char*)&h.payload)) == -1)
                return -1;
 
@@ -763,7 +763,6 @@ DNSResult DNS::GetResult(int resultnum)
 
                        default:
                        break;
-                       
                }
 
                /* Build the reply with the id and hostname/ip in it */
@@ -847,7 +846,7 @@ DNSInfo DNSRequest::ResultIsReady(DNSHeader &header, int length, int result_we_w
                /* XXX: We actually initialise 'rr' here including its ttl field */
                if (curanswer == result_we_want)
                        DNS::FillResourceRecord(&rr,&header.payload[i]);
-       
+
                i += 10;
                if (rr.type != this->type)
                {
@@ -939,7 +938,7 @@ CachedQuery* DNS::GetCache(const std::string &source)
        else
                return NULL;
 }
-               
+
 void DNS::DelCache(const std::string &source)
 {
        cache->erase(source.c_str());
@@ -1064,7 +1063,7 @@ void DNS::HandleEvent(EventType, int)
        res = this->GetResult(resultnum);
 
        ServerInstance->Logs->Log("RESOLVER",DEBUG,"Result %d id %d", resultnum, res.id);
-       
+
        /* Is there a usable request id? */
        if (res.id != -1)
        {
@@ -1091,7 +1090,7 @@ void DNS::HandleEvent(EventType, int)
                        {
                                if (ServerInstance && ServerInstance->stats)
                                        ServerInstance->stats->statsDnsGood++;
-       
+
                                if (!this->GetCache(res.original.c_str()))
                                        this->cache->insert(std::make_pair(res.original.c_str(), CachedQuery(res.result, res.ttl)));
 
@@ -1100,14 +1099,14 @@ void DNS::HandleEvent(EventType, int)
                                Classes[res.id] = NULL;
                        }
                }
-       
+
                if (ServerInstance && ServerInstance->stats)
                        ServerInstance->stats->statsDns++;
        }
 
        resultnum++;
 }
-       
+
 /** Add a derived Resolver to the working set */
 bool DNS::AddResolverClass(Resolver* r)
 {
@@ -1169,5 +1168,3 @@ unsigned long DNS::PRNG()
        val += (s->statsConnects ^ (unsigned long)s->statsSent ^ (unsigned long)s->statsRecv) - ServerInstance->Config->ports.size();
        return val;
 }
-
-
index fd0b60cf58b8dbb9dca37e5b6cb481bcaca02806..29b5c7b94f3125e3df5069dcdbb25cb5d0ba3310 100644 (file)
@@ -52,7 +52,7 @@ bool DLLManager::GetSymbol(void** v, const char* sym_name)
         * try extract a symbol from the library
         * get any error message is there is any
         */
-       
+
        if (h)
        {
                dlerror(); // clear value
@@ -61,7 +61,7 @@ bool DLLManager::GetSymbol(void** v, const char* sym_name)
                if (!*v || err)
                        return false;
        }
-       
+
        /* succeeded :) */
        return true;
 }
index ab4d8368ddbb42a0f3351d4408d4d37132c4b08a..8f02e7668e0a1376155f4e3431d435f553cc163b 100644 (file)
@@ -290,7 +290,7 @@ std::string irc::hex(const unsigned char *raw, size_t rawsz)
                return "";
 
        /* EWW! This used to be using sprintf, which is WAY inefficient. -Special */
-       
+
        const char *hex = "0123456789abcdef";
        static char hexbuf[MAXBUF];
 
@@ -455,7 +455,7 @@ long irc::portparser::GetToken()
                        {
                                while (((Overlaps(in_range)) && (in_range <= range_end)))
                                        in_range++;
-                               
+
                                if (in_range <= range_end)
                                        return in_range;
                        }
@@ -522,4 +522,3 @@ long irc::portparser::GetToken()
        text = replacement;
        return text;
 }*/
-
index f38b3e6b569174fd40fb706b69d701a1feaae8cd..c56dc39aed54082a5e88ce870233bcd762988d01 100644 (file)
@@ -55,7 +55,7 @@ User* InspIRCd::FindNick(const char* nick)
                return FindUUID(nick);
 
        user_hash::iterator iter = this->Users->clientlist->find(nick);
-       
+
        if (iter == this->Users->clientlist->end())
                return NULL;
 
@@ -204,7 +204,7 @@ bool IsChannelHandler::Call(const char *chname, size_t max)
                c++;
        }
 
-       size_t len = c - chname;        
+       size_t len = c - chname;
        /* too long a name - note funky pointer arithmetic here. */
        if (len > max)
        {
@@ -219,7 +219,7 @@ bool IsNickHandler::Call(const char* n, size_t max)
 {
        if (!n || !*n)
                return false;
+
        unsigned int p = 0;
        for (const char* i = n; *i; i++, p++)
        {
@@ -443,7 +443,7 @@ void InspIRCd::AddExtBanChar(char c)
 {
        std::string &tok = Config->data005;
        std::string::size_type ebpos;
-       
+
        if ((ebpos = tok.find(" EXTBAN=,")) == std::string::npos)
        {
                tok.append(" EXTBAN=,");
@@ -452,6 +452,3 @@ void InspIRCd::AddExtBanChar(char c)
        else
                tok.insert(ebpos + 9, 1, c);
 }
-
-
-
index 431ed13d92c3bd11d07d70f5a9982e34577a8109..a921db193514338a9a0bdb31adefe6680f2d4f98 100644 (file)
@@ -319,7 +319,7 @@ void InspIRCd::WritePID(const std::string &filename)
 InspIRCd::InspIRCd(int argc, char** argv)
        : GlobalCulls(this),
 
-        /* Functor initialisation. Note that the ordering here is very important. 
+        /* Functor initialisation. Note that the ordering here is very important.
          *
          * THIS MUST MATCH ORDER OF DECLARATION OF THE HandleWhateverFunc classes
          * within class InspIRCd.
@@ -351,7 +351,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
 #ifdef WIN32
        // Strict, frequent checking of memory on debug builds
        _CrtSetDbgFlag ( _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
-       
+
        // Avoid erroneous frees on early exit
        WindowsIPC = 0;
 #endif
@@ -400,10 +400,10 @@ InspIRCd::InspIRCd(int argc, char** argv)
        this->PI = new ProtocolInterface(this);
 
        this->s_signal = 0;
-       
+
        // Create base manager classes early, so nothing breaks
        this->Users = new UserManager(this);
-       
+
        this->Users->unregistered_count = 0;
 
        this->Users->clientlist = new user_hash();
@@ -518,7 +518,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
                /* Windows can (and defaults to) hide file extensions, so let's play a bit nice for windows users. */
                std::string txtconf = this->ConfigFileName;
                txtconf.append(".txt");
-               
+
                if (ServerConfig::FileExists(txtconf.c_str()))
                {
                        strlcat(this->ConfigFileName, ".txt", MAXBUF);
@@ -625,7 +625,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
        printf("\n");
 
        this->Modules->LoadAll();
-       
+
        /* Just in case no modules were loaded - fix for bug #101 */
        this->BuildISupport();
        InitializeDisabledCommands(Config->DisabledCommands, this);
@@ -643,7 +643,7 @@ InspIRCd::InspIRCd(int argc, char** argv)
        }
 
        printf("\nInspIRCd is now running as '%s'[%s] with %d max open sockets\n", Config->ServerName,Config->GetSID().c_str(), SE->GetMaxFds());
-       
+
 #ifndef WINDOWS
        if (!Config->nofork)
        {
@@ -852,7 +852,7 @@ int InspIRCd::Run()
                                this->stats->LastCPU = ru.ru_utime;
                        }
 #else
-                       WindowsIPC->Check();    
+                       WindowsIPC->Check();
 #endif
                }
 
index 5955ae845bf003034f986749746ab2b46fd86fe5..b4c581f940305c0997cf928bbf096e62e4eb9e5a 100644 (file)
@@ -24,9 +24,9 @@
  * 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    
- *    notice, this list of conditions and the following disclaimer in the  
- *    documentation and/or other materials provided with the distribution. 
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    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.
  *
@@ -41,7 +41,7 @@
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef HAS_STRLCPY
 CoreExport size_t strlcat(char *dst, const char *src, size_t siz)
 {
@@ -136,4 +136,3 @@ CoreExport bool charremove(char* mp, char remove)
 
        return shift_down;
 }
-
index d40e366b45082515fcbf7442999d686f3c3fa844..d8c1a3b0bbe470905757728983ab429f6e4d0f23 100644 (file)
@@ -31,7 +31,7 @@
  *
  * How it works:
  *  Modules create their own logstream types (core will create one for 'file logging' for example) and create instances of these logstream types
- *  and register interest in a certain logtype. Globbing is not here, with the exception of * - for all events.. loglevel is used to drop 
+ *  and register interest in a certain logtype. Globbing is not here, with the exception of * - for all events.. loglevel is used to drop
  *  events that are of no interest to a logstream.
  *
  *  When Log is called, the vector of logstreams for that type is iterated (along with the special vector for "*"), and all registered logstreams
@@ -41,7 +41,7 @@
  * NOTE: Somehow we have to let LogManager manage the non-blocking file streams and provide an interface to share them with various LogStreams,
  *       as, for example, a user may want to let 'KILL' and 'XLINE' snotices go to /home/ircd/inspircd/logs/operactions.log, or whatever. How
  *       can we accomplish this easily? I guess with a map of pre-loved logpaths, and a pointer of FILE *..
- * 
+ *
  */
 
 void LogManager::SetupNoFork()
@@ -363,4 +363,3 @@ void FileWriter::Close()
 FileWriter::~FileWriter()
 {
 }
-
index db19260445ac0f1c3f3246916a35e72ae5e22200..3540346b56428a08bc2d71e7051823ad225c9c3e 100644 (file)
@@ -22,7 +22,7 @@ ModeChannelKey::ModeChannelKey(InspIRCd* Instance) : ModeHandler(Instance, 'k',
 }
 
 ModePair ModeChannelKey::ModeSet(User*, User*, Channel* channel, const std::string &parameter)
-{       
+{
     if (channel->modes[CM_KEY])
     {
                std::string ckey = channel->GetModeParameter('k');
@@ -101,4 +101,3 @@ ModeAction ModeChannelKey::OnModeChange(User* source, User*, Channel* channel, s
                return MODEACTION_DENY;
        }
 }
-
index b9f5de63cd33a5a16eb056f06022f42e2e6161cf..0f7992a38cf193104f74466a0d7221a69f666ad6 100644 (file)
@@ -400,21 +400,21 @@ bool ModuleManager::Load(const char* filename)
                Instance->Logs->Log("MODULE", DEFAULT, LastModuleError);
                return false;
        }
-       
+
        if (!ServerConfig::FileExists(modfile))
        {
                LastModuleError = "Module file could not be found: " + filename_str;
                Instance->Logs->Log("MODULE", DEFAULT, LastModuleError);
                return false;
        }
-       
+
        if (Modules.find(filename_str) != Modules.end())
-       {       
+       {
                LastModuleError = "Module " + filename_str + " is already loaded, cannot load a module twice!";
                Instance->Logs->Log("MODULE", DEFAULT, LastModuleError);
                return false;
        }
-               
+
        Module* newmod = NULL;
        ircd_module* newhandle = NULL;
 
@@ -569,8 +569,8 @@ void ModuleManager::LoadAll()
        {
                Instance->Config->ConfValue(Instance->Config->config_data, "module", "name", count, configToken, MAXBUF);
                printf_c("[\033[1;32m*\033[0m] Loading module:\t\033[1;32m%s\033[0m\n",configToken);
-               
-               if (!this->Load(configToken))           
+
+               if (!this->Load(configToken))
                {
                        Instance->Logs->Log("MODULE", DEFAULT, this->LastError());
                        printf_c("\n[\033[1;31m*\033[0m] %s\n\n", this->LastError().c_str());
@@ -592,7 +592,7 @@ bool ModuleManager::PublishFeature(const std::string &FeatureName, Module* Mod)
 bool ModuleManager::UnpublishFeature(const std::string &FeatureName)
 {
        featurelist::iterator iter = Features.find(FeatureName);
-       
+
        if (iter == Features.end())
                return false;
 
@@ -843,9 +843,9 @@ ConfigReader::ConfigReader(InspIRCd* Instance, const std::string &filename) : Se
 
 std::string ConfigReader::ReadValue(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool allow_linefeeds)
 {
-       /* Don't need to strlcpy() tag and name anymore, ReadConf() takes const char* */ 
+       /* Don't need to strlcpy() tag and name anymore, ReadConf() takes const char* */
        std::string result;
-       
+
        if (!ServerInstance->Config->ConfValue(*this->data, tag, name, default_value, index, result, allow_linefeeds))
        {
                this->error = CONF_VALUE_NOT_FOUND;
@@ -872,19 +872,19 @@ bool ConfigReader::ReadFlag(const std::string &tag, const std::string &name, int
 int ConfigReader::ReadInteger(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool need_positive)
 {
        int result;
-       
+
        if(!ServerInstance->Config->ConfValueInteger(*this->data, tag, name, default_value, index, result))
        {
                this->error = CONF_VALUE_NOT_FOUND;
                return 0;
        }
-       
+
        if ((need_positive) && (result < 0))
        {
                this->error = CONF_INT_NEGATIVE;
                return 0;
        }
-       
+
        return result;
 }
 
index c7c2e0c0dc79bc55a50a0a272d914fff1a114a13..b16ebd12b88275415aca2cc8dd1fa120ee102b61 100644 (file)
@@ -73,7 +73,6 @@ public:
                ServerInstance->Modules->Attach(eventlist, this, 3);
        }
 
-       
        bool OneOfMatches(const char* host, const char* ip, const char* hostlist)
        {
                std::stringstream hl(hostlist);
index dab9c721a95e71201eae2c1f5deca7eee454a084..6fb7415310acdbfe21b03b9d62e1c406db121d4a 100644 (file)
@@ -34,12 +34,12 @@ public:
        /** User
         */
        User* user;
-       
+
        AssociateUser(Module* s, Module* d, unsigned long i, User* u)
        : Request(s, d, SQLUTILAU), id(i), user(u)
        {
        }
-       
+
        AssociateUser& S()
        {
                Send();
@@ -58,12 +58,12 @@ public:
        /** Channel
         */
        Channel* chan;
-       
+
        AssociateChan(Module* s, Module* d, unsigned long i, Channel* u)
        : Request(s, d, SQLUTILAC), id(i), chan(u)
        {
        }
-       
+
        AssociateChan& S()
        {
                Send();
@@ -84,7 +84,7 @@ public:
        : Request(s, d, SQLUTILUA), id(i)
        {
        }
-       
+
        UnAssociate& S()
        {
                Send();
@@ -108,7 +108,7 @@ public:
        : Request(s, d, SQLUTILGU), id(i), user(NULL)
        {
        }
-       
+
        GetAssocUser& S()
        {
                Send();
@@ -132,7 +132,7 @@ public:
        : Request(s, d, SQLUTILGC), id(i), chan(NULL)
        {
        }
-       
+
        GetAssocChan& S()
        {
                Send();
index 1a8da4da38f0bf72716e57a98da62c5196fbe41b..4d3c8fd86fa58dfc211ab151c76364b4feb0b8df 100644 (file)
@@ -240,7 +240,7 @@ class ModuleSSLGnuTLS : public Module
                        keyfile = confdir + keyfile;
 
                int ret;
-               
+
                if (cred_alloc)
                {
                        // Deallocate the old credentials
@@ -249,13 +249,13 @@ class ModuleSSLGnuTLS : public Module
                }
                else
                        cred_alloc = true;
-               
+
                if((ret = gnutls_certificate_allocate_credentials(&x509_cred)) < 0)
                        ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Failed to allocate certificate credentials: %s", gnutls_strerror(ret));
-               
+
                if((ret = gnutls_dh_params_init(&dh_params)) < 0)
                        ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Failed to initialise DH parameters: %s", gnutls_strerror(ret));
-               
+
                if((ret =gnutls_certificate_set_x509_trust_file(x509_cred, cafile.c_str(), GNUTLS_X509_FMT_PEM)) < 0)
                        ServerInstance->Logs->Log("m_ssl_gnutls",DEFAULT, "m_ssl_gnutls.so: Failed to set X.509 trust file '%s': %s", cafile.c_str(), gnutls_strerror(ret));
 
index 1d601127a9f0e1718354029fa07bf4d6ac07e20d..39d19b2bc6d58ace3f613e238c598feb9158d6c6 100644 (file)
@@ -68,7 +68,7 @@ class ModuleAlias : public Module
                ConfigReader MyConf(ServerInstance);
 
                AllowBots = MyConf.ReadFlag("fantasy", "allowbots", "no", 0);
-               
+
                std::string fpre = MyConf.ReadValue("fantasy","prefix",0);
                fprefix = fpre.empty() ? '!' : fpre[0];
 
@@ -231,7 +231,7 @@ class ModuleAlias : public Module
 
                if (i == Aliases.end())
                        return 0;
-               
+
                /* Avoid iterating on to other aliases if no patterns match */
                std::multimap<std::string, Alias>::iterator upperbound = Aliases.upper_bound(fcommand);
 
@@ -255,7 +255,7 @@ class ModuleAlias : public Module
 
                        i++;
                }
-               
+
                return 0;
        }
 
@@ -361,7 +361,7 @@ class ModuleAlias : public Module
                if (c)
                {
                        /* Channel specific variables */
-                       SearchAndReplace(newline, std::string("$chan"), c->name);                       
+                       SearchAndReplace(newline, std::string("$chan"), c->name);
                }
 
                irc::tokenstream ss(newline);
index 892c18bd17f92b86ad7584acf61ca014e776ac2b..85c8660a25c8ecced6d663f3c23d16a0bc20ab27 100644 (file)
@@ -194,7 +194,7 @@ class ChanFounder : public ModeHandler, public FounderProtectBase
                {
                        return FounderProtectBase::HandleChange(source, theuser, adding, channel, parameter);
                }
-               
+
                char isoverride=0;
                Module *Override = ServerInstance->Modules->FindFeature("Override");
                if (Override)
index beb2b32e507846111d76b03f7cc8defc54412f55..0382ea83676878226493d8812fb758d8e8bde6ba 100644 (file)
@@ -135,7 +135,7 @@ class CommandDccallow : public Command
                                                user->WriteNumeric(996, "%s %s :You cannot add yourself to your own DCCALLOW list!", user->nick.c_str(), user->nick.c_str());
                                                return CMD_FAILURE;
                                        }
-                                       
+
                                        if (!user->GetExt("dccallow_list", dl))
                                        {
                                                dl = new dccallowlist;
@@ -143,7 +143,7 @@ class CommandDccallow : public Command
                                                // add this user to the userlist
                                                ul.push_back(user);
                                        }
-                                       
+
                                        for (dccallowlist::const_iterator k = dl->begin(); k != dl->end(); ++k)
                                        {
                                                if (k->nickname == target->nick)
@@ -356,7 +356,7 @@ class ModuleDCCAllow : public Module
                                                                        return 0;
                                                        }
                                                }
-                                               
+
                                                user->WriteServ("NOTICE %s :The user %s is not accepting DCC SENDs from you. Your file %s was not sent.", user->nick.c_str(), u->nick.c_str(), filename.c_str());
                                                u->WriteServ("NOTICE %s :%s (%s@%s) attempted to send you a file named %s, which was blocked.", u->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), filename.c_str());
                                                u->WriteServ("NOTICE %s :If you trust %s and were expecting this, you can type /DCCALLOW HELP for information on the DCCALLOW system.", u->nick.c_str(), user->nick.c_str());
@@ -476,4 +476,3 @@ class ModuleDCCAllow : public Module
 };
 
 MODULE_INIT(ModuleDCCAllow)
-
index 71742d596a77bed2fbac7ed9d58aced4f19f9bd5..60ae7e89158a081e59ae6bc22bf2c2c214ee414b 100644 (file)
@@ -281,7 +281,7 @@ int FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std::stri
                        if (i != exemptfromfilter.end()) return 0;
                }
                if (f->action == "block")
-               {       
+               {
                        ServerInstance->SNO->WriteToSnoMask('A', std::string("FILTER: ")+user->nick+" had their message filtered, target was "+target+": "+f->reason);
                        user->WriteServ("NOTICE "+std::string(user->nick)+" :Your message has been filtered and opers notified: "+f->reason);
                }
@@ -318,7 +318,7 @@ int FilterBase::OnPreCommand(std::string &command, std::vector<std::string> &par
                std::string checkline;
                int replacepoint = 0;
                bool parting = false;
-       
+
                if (command == "QUIT")
                {
                        /* QUIT with no reason: nothing to do */
@@ -348,7 +348,7 @@ int FilterBase::OnPreCommand(std::string &command, std::vector<std::string> &par
                        return 0;
 
                FilterResult* f = NULL;
-               
+
                if (flags)
                        f = this->FilterMatch(user, checkline, flags);
 
@@ -683,4 +683,3 @@ class ModuleFilter : public FilterBase
 };
 
 MODULE_INIT(ModuleFilter)
-
index bb0b3ac631be47efe4de02490df2b16195c251f0..27c749b3d319c47a667c2c0e5dabfee325c70cd7 100644 (file)
@@ -14,7 +14,7 @@
 /*
  * Originally by Chernov-Phoenix Alexey (Phoenix@RusNet) mailto:phoenix /email address separator/ pravmail.ru
  */
+
 /* $ModDesc: Gives opers cmode +y which provides a staff prefix. */
 
 #include "inspircd.h"
@@ -118,7 +118,7 @@ class ModuleOperPrefixMode : public Module
                opm = new OperPrefixMode(ServerInstance);
                if ((!ServerInstance->Modes->AddMode(opm)))
                        throw ModuleException("Could not add a new mode!");
-                       
+
                Implementation eventlist[] = { I_OnPostJoin, I_OnCleanup, I_OnUserQuit, I_OnUserKick, I_OnUserPart, I_OnOper };
                ServerInstance->Modules->Attach(eventlist, this, 6);
        }
@@ -239,4 +239,3 @@ class ModuleOperPrefixMode : public Module
 };
 
 MODULE_INIT(ModuleOperPrefixMode)
-
index cf2723bec2ae03a819ecf779bbb225550da65091..3010e1e4648d157a3c2c0156ded3483249821a11 100644 (file)
@@ -131,7 +131,7 @@ class ModuleOverride : public Module
                {
                        // If the kicker's status is less than the target's,                    or      the kicker's status is less than or equal to voice
                        if ((chan->GetStatus(source) < chan->GetStatus(user))                   || (chan->GetStatus(source) <= STATUS_VOICE))
-                       {                               
+                       {
                                ServerInstance->SNO->WriteToSnoMask('G',std::string(source->nick)+" used oper override to kick "+std::string(user->nick)+" on "+std::string(chan->name)+" ("+reason+")");
                        }
                        /* Returning -1 explicitly allows the kick */
index 85f52c4d877416d35fc04fb5d99e6d435217a75e..3880be342a24c37563dfc6a5e3e9057280d69a82 100644 (file)
@@ -45,7 +45,7 @@ class RegexFactoryRequest : public Request
 {
 private:
        std::string regex;
-       
+
 public:
        Regex* result;
 
index 6c976d6baaf3b54c225f67da24b53c3ad21202fa..d71807c69ddc78fc952ee86ae20eb181076064be 100644 (file)
@@ -37,7 +37,7 @@ class CommandSATopic : public Command
                if(target)
                {
                        std::string newTopic = parameters[1];
-                       
+
                        // 3rd parameter overrides access checks
                        target->SetTopic(user, newTopic, true);
                        ServerInstance->SNO->WriteToSnoMask('A', user->nick + " used SATOPIC on " + target->name + ", new topic: " + newTopic);
index ebe1b1220e4cf1f5299395a132f02fca486a8ee4..6789d26d80adf7c8960d0b65079c1933990a1611 100644 (file)
@@ -229,7 +229,7 @@ class ModuleServicesAccount : public Module
                                // user is ulined, won't be stopped from joining
                                return 0;
                        }
-                       
+
                        if (chan->IsModeSet('R'))
                        {
                                if (!is_registered)
index 12484e195c9cdd348226c960b306a5918778a387..7f0500fe5fedba18f5c9bc23bd18f55c100d6305 100644 (file)
@@ -24,7 +24,7 @@ class ServProtectMode : public ModeHandler
 
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding, bool)
        {
-               /* Because this returns MODEACTION_DENY all the time, there is only ONE 
+               /* Because this returns MODEACTION_DENY all the time, there is only ONE
                 * way to add this mode and that is at client introduction in the UID command,
                 * as this calls OnModeChange for each mode but disregards the return values.
                 * The mode cannot be manually added or removed, not even by a server or by a remote
index f4939c00e96e1e3b876b5ef5f401adeee8e6dea4..49d34538316cd23904355b946466d2404fb29929 100644 (file)
@@ -369,5 +369,3 @@ TreeServer::~TreeServer()
        if (iter != Utils->sidlist.end())
                Utils->sidlist.erase(iter);
 }
-
-
index 52841426165a030fc4d85756de4bd502309137bc..fea17b7d2e97c6097b246d765359776689f286fd 100644 (file)
@@ -56,7 +56,7 @@ class TreeServer : public classbase
 
        bool Warned;                            /* True if we've warned opers about high latency on this server */
        bool bursting;                          /* whether or not this server is bursting */
-       
+
        /** We don't use this constructor. Its a dummy, and won't cause any insertion
         * of the TreeServer into the hash_map. See below for the two we DO use.
         */
@@ -67,7 +67,7 @@ class TreeServer : public classbase
         * no socket associated with it. Its version string is our own local version.
         */
        TreeServer(SpanningTreeUtilities* Util, InspIRCd* Instance, std::string Name, std::string Desc, const std::string &id);
-       
+
        /** When we create a new server, we call this constructor to initialize it.
         * This constructor initializes the server's Route and Parent, and sets up
         * its ping counters so that it will be pinged one minute from now.
@@ -121,7 +121,7 @@ class TreeServer : public classbase
        /** Round trip time of last ping
         */
        unsigned long rtt;
-       
+
        /** When we recieved BURST from this server, used to calculate total burst time at ENDBURST.
         */
        unsigned long StartBurst;
index 4d87c450caa495d208c11b489027b42609813803..c006344ba9bcc2b0c5bb88c717618395502b1426 100644 (file)
@@ -250,7 +250,7 @@ bool TreeSocket::ProcessLine(std::string &line)
                                 * "miscreant" servers, though, so let's check anyway. -- w
                                 *
                                 * We also check here for totally invalid prefixes (prefixes that are neither
-                                * a valid SID or a valid UUID, so that invalid UUID or SID never makes it 
+                                * a valid SID or a valid UUID, so that invalid UUID or SID never makes it
                                 * to the higher level functions. -- B
                                 */
                                std::string direction = prefix;
@@ -694,5 +694,3 @@ void TreeSocket::OnClose()
                                this->ServerInstance->SNO->WriteToSnoMask('l', "Connection to '\2%s\2' was established for %s", quitserver.c_str(), Utils->Creator->TimeToStr(server_uptime).c_str());
        }
 }
-
-
index 75a7efd62077a0a3bf92dc5d3f9eb04922a07b78..36f1c031a525c99991a8a87fb09599e3cce97d33 100644 (file)
@@ -25,27 +25,27 @@ class RPCValue : public classbase
  protected:
        RPCValueType type;
        void *value;
-       
+
        double *CastInteger()
        {
                return (double*)value;
        }
-       
+
        std::string *CastString()
        {
                return (std::string*)value;
        }
-       
+
        RPCObjectContainer *CastObject()
        {
                return (RPCObjectContainer*)value;
        }
-       
+
        RPCArrayContainer *CastArray()
        {
                return (RPCArrayContainer*)value;
        }
-       
+
        void DestroyValue()
        {
                // Some versions of GCC complain about declaration in switch statements
@@ -74,10 +74,10 @@ class RPCValue : public classbase
                        default:
                                break;
                }
-               
+
                value = NULL;
        }
-       
+
        void InitValue()
        {
                switch (type)
@@ -100,9 +100,9 @@ class RPCValue : public classbase
                                break;
                }
        }
-       
+
        RPCValue(const RPCValue &v) { }
-       
+
  public:
        RPCValue *parent;
 
@@ -111,30 +111,30 @@ class RPCValue : public classbase
        RPCValue(bool nvalue, RPCValue *rparent = NULL) : type(RPCBoolean), value((void*)nvalue), parent(rparent) { }
        RPCValue(double nvalue, RPCValue *rparent = NULL) : type(RPCInteger), parent(rparent) { value = new double(nvalue); }
        RPCValue(const std::string &nvalue, RPCValue *rparent = NULL) : type(RPCString), parent(rparent) { value = new std::string(nvalue); }
-       
+
        virtual ~RPCValue()
        {
                DestroyValue();
        }
-       
+
        RPCValueType GetType()
        {
                return type;
        }
-       
+
        void SetNull()
        {
                DestroyValue();
                type = RPCNull;
        }
-       
+
        void SetBoolean(bool nvalue)
        {
                DestroyValue();
                value = (void*)nvalue;
                type = RPCBoolean;
        }
-       
+
        void SetInteger(double nvalue)
        {
                if (type == RPCInteger)
@@ -148,7 +148,7 @@ class RPCValue : public classbase
                        type = RPCInteger;
                }
        }
-       
+
        void SetString(const std::string &nvalue)
        {
                if (type == RPCString)
@@ -162,7 +162,7 @@ class RPCValue : public classbase
                        type = RPCString;
                }
        }
-       
+
        void SetArray()
        {
                if (type == RPCArray)
@@ -176,7 +176,7 @@ class RPCValue : public classbase
                        InitValue();
                }
        }
-       
+
        void SetObject()
        {
                if (type == RPCObject)
@@ -190,7 +190,7 @@ class RPCValue : public classbase
                        InitValue();
                }
        }
-       
+
        void ArrayAdd(RPCValue *nvalue)
        {
                if (type != RPCArray)
@@ -199,7 +199,7 @@ class RPCValue : public classbase
                a->push_back(nvalue);
                nvalue->parent = this;
        }
-       
+
        void ObjectAdd(const std::string &key, RPCValue *nvalue)
        {
                if (type != RPCObject)
@@ -208,7 +208,7 @@ class RPCValue : public classbase
                o->insert(std::make_pair(key, nvalue));
                nvalue->parent = this;
        }
-       
+
        RPCValue *GetArray(int i)
        {
                if (type != RPCArray)
@@ -218,7 +218,7 @@ class RPCValue : public classbase
                        return NULL;
                return a->at(i);
        }
-       
+
        int ArraySize()
        {
                if (type != RPCArray)
@@ -226,7 +226,7 @@ class RPCValue : public classbase
                RPCArrayContainer *a = this->CastArray();
                return a->size();
        }
-       
+
        RPCValue *GetObject(const std::string &key)
        {
                if (type != RPCObject)
@@ -237,7 +237,7 @@ class RPCValue : public classbase
                        return NULL;
                return it->second;
        }
-       
+
        std::pair<RPCObjectContainer::iterator,RPCObjectContainer::iterator> GetObjectIterator()
        {
                if (type != RPCObject)
@@ -245,21 +245,21 @@ class RPCValue : public classbase
                RPCObjectContainer *o = this->CastObject();
                return std::make_pair(o->begin(), o->end());
        }
-       
+
        std::string GetString()
        {
                if (type != RPCString)
                        return std::string();
                return *this->CastString();
        }
-       
+
        double GetInt()
        {
                if (type != RPCInteger)
                        return 0;
                return *this->CastInteger();
        }
-       
+
        bool GetBool()
        {
                if (type != RPCBoolean)
@@ -271,7 +271,7 @@ class RPCValue : public classbase
 class RPCRequest : public classbase
 {
  protected:
-       
+
  public:
        std::string method;
        RPCValue *parameters;
@@ -279,13 +279,13 @@ class RPCRequest : public classbase
        std::string provider;
        bool claimed;
        std::string error;
-       
+
        RPCRequest(const std::string &sprovider, const std::string &smethod, RPCValue *rparameters)
                : method(smethod), parameters(rparameters), provider(sprovider), claimed(false)
        {
                result = new RPCValue();
        }
-       
+
        ~RPCRequest()
        {
                if (result)
index 269880b75ea98779b878ec165d8b408cdb04faf8..1ca3e947013a5c5735fe1c88f81cc6dcaf75e483 100644 (file)
@@ -50,7 +50,7 @@ class ssl_cert : public Extensible
        ssl_cert() : empty("")
        {
        }
-       
+
        /** Get certificate distinguished name
         * @return Certificate DN
         */
@@ -228,4 +228,3 @@ class BufferedSocketNameRequest : public ISHRequest
 };
 
 #endif
-
index 75e404b802885d578b9e3ae2d1554047daf148b7..734e551b0011ce927c1eace6d46212f31f2f7b36 100644 (file)
@@ -148,7 +148,7 @@ void InspIRCd::IncrementUID(int pos)
                        for (int i = 3; i < UUID_LENGTH; i++)
                        {
                                current_uid[i] = 'A';
-                               pos  = UUID_LENGTH - 1; 
+                               pos  = UUID_LENGTH - 1;
                        }
                }
                else
index cde8839cae4ae63d7c5cb825481f719ca120d599..c166bd72d3a52869baa755eb534ae3e90b8e095c 100644 (file)
@@ -24,7 +24,7 @@ SnomaskManager::SnomaskManager(InspIRCd* Instance) : ServerInstance(Instance)
 }
 
 SnomaskManager::~SnomaskManager()
-{      
+{
        for (std::map<char, Snomask *>::iterator i = SnoMasks.begin(); i != SnoMasks.end(); i++)
        {
                delete i->second;
index fa5f0709c2e0a87c83d1da509f88939055b33484..649f3ee5f03e3bfaf806fb2a4c1d1d557faef8e1 100644 (file)
@@ -20,7 +20,7 @@
 /** This will bind a socket to a port. It works for UDP/TCP.
  * It can only bind to IP addresses, if you wish to bind to hostnames
  * you should first resolve them using class 'Resolver'.
- */ 
+ */
 bool InspIRCd::BindSocket(int sockfd, int port, const char* addr, bool dolisten)
 {
        /* We allocate 2 of these, because sockaddr_in6 is larger than sockaddr (ugh, hax) */
@@ -195,10 +195,10 @@ int InspIRCd::BindPorts(bool, int &ports_found, FailedPortList &failed_ports)
                Config->ConfValue(Config->config_data, "bind", "port", count, configToken, MAXBUF);
                Config->ConfValue(Config->config_data, "bind", "address", count, Addr, MAXBUF);
                Config->ConfValue(Config->config_data, "bind", "type", count, Type, MAXBUF);
-               
+
                if (strncmp(Addr, "::ffff:", 7) == 0)
                        this->Logs->Log("SOCKET",DEFAULT, "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead.");
-               
+
                if ((!*Type) || (!strcmp(Type,"clients")))
                {
                        irc::portparser portrange(configToken, false);
index 43de35e1ea7e3e9eb8f8cfb351e38f2ba6bb19b2..e9554bee312bbe9db32f0d7e64890cc29948a4cb 100644 (file)
@@ -149,7 +149,7 @@ std::string SocketEngine::GetName()
 }
 
 bool SocketEngine::BoundsCheckFd(EventHandler* eh)
-{       
+{
        if (!eh)
                return false;
        if ((eh->GetFd() < 0) || (eh->GetFd() > MAX_DESCRIPTORS))
index 7dce02dbd925b71b4794a30e03d5c0cd27f3a93a..6425d5fcae6716be2094586dcfc686a90f94aed5 100644 (file)
@@ -166,7 +166,7 @@ bool IOCPEngine::DelFd(EventHandler* eh, bool force /* = false */)
 
        /* decrement set size */
        --CurrentSetSize;
-       
+
        /* success */
        return true;
 }
@@ -175,7 +175,7 @@ void IOCPEngine::WantWrite(EventHandler* eh)
 {
        if (!eh)
                return;
-       
+
        void* m_writeEvent = NULL;
 
        int* fake_fd = NULL;
@@ -351,7 +351,7 @@ int IOCPEngine::DispatchEvents()
                                }
                        }
                        break;
-               
+
                        case SOCKET_IO_EVENT_ACCEPT:
                        {
                                /* this is kinda messy.. :/ */
@@ -370,7 +370,7 @@ int IOCPEngine::DispatchEvents()
                        }
                        break;
                }
-               
+
                delete ov;
        }
 
@@ -464,7 +464,7 @@ int IOCPEngine::Accept(EventHandler* fd, sockaddr *addr, socklen_t *addrlen)
 
        Overlapped* ovl = acceptevent;
        accept_overlap* ov = (accept_overlap*)ovl->m_params;
-       
+
        //sockaddr_in* server_address = (sockaddr_in*)&ov->buf[10];
        sockaddr_in* client_address = (sockaddr_in*)&ov->buf[38];
 
@@ -477,7 +477,7 @@ int IOCPEngine::Accept(EventHandler* fd, sockaddr *addr, socklen_t *addrlen)
 int IOCPEngine::GetSockName(EventHandler* fd, sockaddr *name, socklen_t* namelen)
 {
        Overlapped* ovl = NULL;
-       
+
        if (!fd->GetExt("windows_acceptevent", ovl))
                return -1;
 
@@ -524,5 +524,3 @@ int IOCPEngine::Close(EventHandler* fd)
 {
        return this->Close(fd->GetFd());
 }
-
-
index 80d73581e2e2bc9a55803795f07a7f0a3ffa0f5b..76ef3851e4b007cb18cbabc78a8f3a1c6e8bc8ea 100644 (file)
@@ -33,7 +33,7 @@ void KQueueEngine::RecoverFromFork()
        /*
         * The only bad thing about kqueue is that its fd cant survive a fork and is not inherited.
         * BUM HATS.
-        * 
+        *
         */
        EngineHandle = kqueue();
        if (EngineHandle == -1)
index 27f2aecfdca8dd5cf8d5eb3f72b7287da90ba885..ec0ddb6456c978b3e293775709e396c3148e8dfe 100644 (file)
@@ -26,7 +26,7 @@ void TimerManager::TickTimers(time_t TIME)
        {
                std::vector<Timer *>::iterator i = Timers.begin();
                Timer *t = (*i);
-               
+
                // Probable fix: move vector manipulation to *before* we modify the vector.
                Timers.erase(i);
 
@@ -62,5 +62,3 @@ bool TimerManager::TimerComparison( Timer *one, Timer *two)
 {
        return (one->GetTimer()) < (two->GetTimer());
 }
-
-
index 820d7ef6551e7f6c6271da4049f82a78ce5d7dea..bd27d63503871d6d47b6c05af170d1ea2aa84246 100644 (file)
@@ -102,7 +102,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl,
                                this->bound_user->dns_done = true;
                        }
                }
-               
+
                // Save some memory by freeing this up; it's never used again in the user's lifetime.
                this->bound_user->stored_host.resize(0);
        }
index 86b324c8292a32959e43380ef8634edf28075cfc..f8b1f0de257cfe4d4b4d53f8c911c810460ac055 100644 (file)
@@ -275,7 +275,7 @@ void UserManager::RemoveCloneCounts(User *user)
                        local_clones.erase(x);
                }
        }
-       
+
        clonemap::iterator y = global_clones.find(user->GetCIDRMask(range));
        if (y != global_clones.end())
        {
@@ -487,6 +487,3 @@ int UserManager::ModeCount(const char mode)
        else
                return 0;
 }
-
-
-
index fd71b07ad9a518b46a14f8461f0f110f43100751..7ce7ea673cc1d5643199fbac3f2d4eed31d0ef39 100644 (file)
@@ -483,7 +483,7 @@ bool User::HasModePermission(unsigned char mode, ModeType type)
        if (mode < 'A' || mode > ('A' + 64)) return false;
 
        return ((type == MODETYPE_USER ? AllowedUserModes : AllowedChanModes))[(mode - 'A')];
-       
+
 }
 
 bool User::HasPermission(const std::string &command)
@@ -918,7 +918,7 @@ void User::CheckClass()
 bool User::CheckLines(bool doZline)
 {
        const char* check[] = { "G" , "K", (doZline) ? "Z" : NULL, NULL };
-       
+
        if (!this->exempt)
        {
                for (int n = 0; check[n]; ++n)
@@ -948,7 +948,7 @@ void User::FullConnect()
         * Don't remove this! -- w00t
         */
        this->SetClass();
-       
+
        /* Check the password, if one is required by the user's connect class.
         * This CANNOT be in CheckClass(), because that is called prior to PASS as well!
         */
@@ -1158,7 +1158,7 @@ const char* User::GetCIDRMask(int range)
                        sockaddr_in6* sin;
                        int i, bytestozero, extrabits;
                        char buffer[40];
-                       
+
                        if(range > 128)
                                throw "CIDR mask width greater than address width (IPv6, 128 bit)";
 
@@ -1171,12 +1171,12 @@ const char* User::GetCIDRMask(int range)
                         * which must be set to zero.
                         */
                        bytestozero = (128 - range) / 8;
-                       
+
                        /* Some of the least significant bits of the next most significant byte may also have to
                         * be zeroed. The number of bits is the remainder of the above division.
                         */
                        extrabits = (128 - range) % 8;
-                       
+
                        /* Populate our working struct with the parts of the user's IP which are required in the
                         * final CIDR mask. Set all the subsequent bytes to zero.
                         * (16 - bytestozero) is the number of bytes which must be populated with actual IP data.
@@ -1185,13 +1185,13 @@ const char* User::GetCIDRMask(int range)
                        {
                                v6.s6_addr[i] = sin->sin6_addr.s6_addr[i];
                        }
-                       
+
                        /* And zero all the remaining bytes in the IP. */
                        for(; i < 16; i++)
                        {
                                v6.s6_addr[i] = 0;
                        }
-                                       
+
                        /* And finally, zero the extra bits required. */
                        v6.s6_addr[15 - bytestozero] = (v6.s6_addr[15 - bytestozero] >> extrabits) << extrabits;
 
@@ -1268,7 +1268,7 @@ const char* User::GetIPString()
                                this->cachedip = temp;
                                return temp;
                        }
-                       
+
                        this->cachedip = buf;
                        return buf;
                }
@@ -1285,7 +1285,7 @@ const char* User::GetIPString()
                default:
                break;
        }
-       
+
        // Unreachable, probably
        return "";
 }
@@ -1866,7 +1866,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name)
                        }
 
                        /* check if host matches.. */
-                       if (!InspIRCd::MatchCIDR(this->GetIPString(), c->GetHost(), NULL) && 
+                       if (!InspIRCd::MatchCIDR(this->GetIPString(), c->GetHost(), NULL) &&
                            !InspIRCd::MatchCIDR(this->host, c->GetHost(), NULL))
                        {
                                ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "No host match (for %s)", c->GetHost().c_str());
@@ -2054,4 +2054,3 @@ bool VisData::VisibleTo(User* user)
 {
        return true;
 }
-
index da46c2eee44926beb4d05635349280b4d58ce1a7..c92643bcd21d85e66030a3d6998ae467beb39466 100644 (file)
@@ -18,7 +18,7 @@
 #include "bancache.h"
 
 /*
- * This is now version 3 of the XLine subsystem, let's see if we can get it as nice and 
+ * This is now version 3 of the XLine subsystem, let's see if we can get it as nice and
  * efficient as we can this time so we can close this file and never ever touch it again ..
  *
  * Background:
@@ -192,7 +192,7 @@ bool XLineManager::AddLine(XLine* line, User* user)
        lookup_lines[line->type][line->Displayable()] = line;
        line->OnAdd();
 
-       FOREACH_MOD(I_OnAddLine,OnAddLine(user, line)); 
+       FOREACH_MOD(I_OnAddLine,OnAddLine(user, line));
 
        return true;
 }
@@ -423,7 +423,7 @@ XLineManager::~XLineManager()
                i->second.clear();
        }
        lookup_lines.clear();
-       
+
 }
 
 void XLine::Apply(User* u)
@@ -498,7 +498,7 @@ bool GLine::Matches(User *u)
 }
 
 void GLine::Apply(User* u)
-{       
+{
        DefaultApply(u, "G", (strcmp(this->identmask, "*") == 0) ? true : false);
 }
 
@@ -531,7 +531,7 @@ bool ZLine::Matches(User *u)
 }
 
 void ZLine::Apply(User* u)
-{       
+{
        DefaultApply(u, "Z", true);
 }
 
@@ -545,7 +545,7 @@ bool QLine::Matches(User *u)
 }
 
 void QLine::Apply(User* u)
-{       
+{
        /* Force to uuid on apply of qline, no need to disconnect any more :) */
        u->ForceNickChange(u->uuid.c_str());
 }
@@ -681,4 +681,3 @@ XLineFactory* XLineManager::GetFactory(const std::string &type)
 
        return n->second;
 }
-