From f209cce90b394acd26e22eacef0bff61e8f5b4e1 Mon Sep 17 00:00:00 2001 From: peavey Date: Sat, 14 Feb 2009 21:14:36 +0000 Subject: Nuke trailing spaces git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/base.h | 16 +++++----- include/command_parse.h | 3 +- include/commands/cmd_whowas.h | 2 +- include/configreader.h | 30 ++++++++---------- include/ctables.h | 3 +- include/dynamic.h | 20 ++++++------ include/hash_map.h | 7 ++--- include/hashcomp.h | 27 ++++++++-------- include/inspircd.h | 2 +- include/inspsocket.h | 3 +- include/mode.h | 9 +++--- include/modules.h | 46 ++++++++++++++-------------- include/numerics.h | 4 +-- include/socketengines/socketengine_iocp.h | 7 ++--- include/threadengines/threadengine_pthread.h | 2 +- include/u_listmode.h | 25 ++++++++------- include/usermanager.h | 4 +-- include/users.h | 17 +++++----- include/xline.h | 13 ++++---- 19 files changed, 112 insertions(+), 128 deletions(-) (limited to 'include') diff --git a/include/base.h b/include/base.h index 3a26b1be8..4dbddf97f 100644 --- a/include/base.h +++ b/include/base.h @@ -11,8 +11,8 @@ * --------------------------------------------------- */ -#ifndef __BASE_H__ -#define __BASE_H__ +#ifndef __BASE_H__ +#define __BASE_H__ #include #include @@ -25,7 +25,7 @@ typedef std::map 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); diff --git a/include/command_parse.h b/include/command_parse.h index c2606a97d..b3ae3236a 100644 --- a/include/command_parse.h +++ b/include/command_parse.h @@ -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 - diff --git a/include/commands/cmd_whowas.h b/include/commands/cmd_whowas.h index ba1a75ea9..bc20e893c 100644 --- a/include/commands/cmd_whowas.h +++ b/include/commands/cmd_whowas.h @@ -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; diff --git a/include/configreader.h b/include/configreader.h index 02defab63..787bcb243 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -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 - diff --git a/include/ctables.h b/include/ctables.h index 7ff47abbf..3e10e7c23 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -10,7 +10,7 @@ * * --------------------------------------------------- */ - + #ifndef __CTABLES_H__ #define __CTABLES_H__ @@ -243,4 +243,3 @@ typedef nspace::hash_map Commandtable; translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);translation.push_back(x8); #endif - diff --git a/include/dynamic.h b/include/dynamic.h index e910603f7..b48eaeacd 100644 --- a/include/dynamic.h +++ b/include/dynamic.h @@ -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 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 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 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 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 class CoreExport DLLFactory : public DLLManager return NULL; } } - + /** The destructor deletes the ModuleFactory pointer. */ ~DLLFactory() diff --git a/include/hash_map.h b/include/hash_map.h index 0da5c7433..f49b6a68b 100644 --- a/include/hash_map.h +++ b/include/hash_map.h @@ -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 @@ -42,7 +42,4 @@ #define END_HASHMAP_NAMESPACE } #endif - - #endif - diff --git a/include/hashcomp.h b/include/hashcomp.h index eaafef2c6..a1bc26602 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -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 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 - diff --git a/include/inspircd.h b/include/inspircd.h index 40f9c23f4..fcd6849d5 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -17,7 +17,7 @@ #define _FILE_OFFSET_BITS 64 #ifndef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE -#endif +#endif #ifndef WIN32 #define DllExport diff --git a/include/inspsocket.h b/include/inspsocket.h index 9d5375f8c..43903ae97 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -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 - diff --git a/include/mode.h b/include/mode.h index 84085a913..f78fcda9c 100644 --- a/include/mode.h +++ b/include/mode.h @@ -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 - diff --git a/include/modules.h b/include/modules.h index 5d4b24631..64eb3cfd1 100644 --- a/include/modules.h +++ b/include/modules.h @@ -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 diff --git a/include/numerics.h b/include/numerics.h index 11cd3b1e1..76c5282a3 100644 --- a/include/numerics.h +++ b/include/numerics.h @@ -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 diff --git a/include/socketengines/socketengine_iocp.h b/include/socketengines/socketengine_iocp.h index 95aa029d8..97d78397b 100644 --- a/include/socketengines/socketengine_iocp.h +++ b/include/socketengines/socketengine_iocp.h @@ -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 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 - diff --git a/include/threadengines/threadengine_pthread.h b/include/threadengines/threadengine_pthread.h index 0963f28f3..2d732cb5f 100644 --- a/include/threadengines/threadengine_pthread.h +++ b/include/threadengines/threadengine_pthread.h @@ -24,7 +24,7 @@ class InspIRCd; class CoreExport PThreadEngine : public ThreadEngine { private: - + bool Mutex(bool enable); public: diff --git a/include/u_listmode.h b/include/u_listmode.h index 666e851f7..b08ad8d4d 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -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 ModeSet(User*, User*, Channel* channel, const std::string ¶meter) { @@ -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 - diff --git a/include/usermanager.h b/include/usermanager.h index 452be27fe..bc0032696 100644 --- a/include/usermanager.h +++ b/include/usermanager.h @@ -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 */ diff --git a/include/users.h b/include/users.h index ab8e53b09..e723bb434 100644 --- a/include/users.h +++ b/include/users.h @@ -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 - diff --git a/include/xline.h b/include/xline.h index 5d0a978b8..6f596ae10 100644 --- a/include/xline.h +++ b/include/xline.h @@ -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 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 - -- cgit v1.2.3