]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
for real
authorpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 12 Jun 2008 21:04:37 +0000 (21:04 +0000)
committerpippijn <pippijn@e03df62e-2008-0410-955e-edbf42e46eb7>
Thu, 12 Jun 2008 21:04:37 +0000 (21:04 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9898 e03df62e-2008-0410-955e-edbf42e46eb7

include/connection.h
include/inspstring.h
include/socket.h
src/channels.cpp

index b754a375057adc897af542a5641008e873a886ef..c90a953d2a9de917cfe079fd65b56c0dbca7d7a2 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef __CONNECTION_H__
 #define __CONNECTION_H__
 
-#include <time.h>
+#include <ctime>
 #include "inspircd_config.h"
 #include "base.h"
 #include "socketengine.h"
@@ -55,21 +55,21 @@ class CoreExport connection : public EventHandler
         * the connection state.
         */
        char registered;
-       
+
        /** Time the connection was last pinged
         */
        time_t lastping;
-       
+
        /** Time the connection was created, set in the constructor. This
         * may be different from the time the user's classbase object was
         * created.
         */
        time_t signon;
-       
+
        /** Time that the connection last sent a message, used to calculate idle time
         */
        time_t idle_lastmsg;
-       
+
        /** Used by PING checking code
         */
        time_t nping;
index bb03bc2edbe5f2480c2df745321a06629c5b881f..5d3d42a5c47b5b4f2810f2667241296737052ae6 100644 (file)
@@ -16,7 +16,7 @@
 
 // This (inspircd_config) is needed as inspstring doesn't pull in the central header
 #include "inspircd_config.h"
-#include <string.h>
+#include <cstring>
 //#include <cstddef>
 
 #ifndef HAS_STRLCPY
index e6ea1615df0e79fe2adfa6b37090084e5c17dedb..a26c1256d2db4f2967aa209dc442ed4827acf3cf 100644 (file)
@@ -33,7 +33,7 @@
 
 #endif
 
-#include <errno.h>
+#include <cerrno>
 #include "socketengine.h"
 
 /* Contains irc-specific definitions */
@@ -69,7 +69,7 @@ namespace irc
 
 #endif
                /** Match raw binary data using CIDR rules.
-                * 
+                *
                 * This function will use binary comparison to compare the
                 * two bit sequences, address and mask, up to mask_bits
                 * bits in size. If they match, it will return true.
@@ -108,7 +108,7 @@ namespace irc
                CoreExport bool MatchCIDR(const std::string &address, const std::string &cidr_mask, bool match_with_username);
 
                /** Convert an insp_inaddr into human readable form.
-                * 
+                *
                 * @param n An insp_inaddr (IP address) structure
                 * @return A human-readable address. IPV6 addresses
                 * will be shortened to remove fields which are 0.
@@ -116,7 +116,7 @@ namespace irc
                CoreExport const char* insp_ntoa(insp_inaddr n);
 
                /** Convert a human-readable address into an insp_inaddr.
-                * 
+                *
                 * @param a A human-readable address
                 * @param n An insp_inaddr struct which the result
                 * will be copied into on success.
index d03f80f64e0c40edbe95df45fa36b7b6ac84d7a3..219979dc93cdf96ebc3f24b15a25520eee5b433b 100644 (file)
@@ -14,7 +14,7 @@
 /* $Core: libIRCDchannels */
 
 #include "inspircd.h"
-#include <stdarg.h>
+#include <cstdarg>
 #include "wildcard.h"
 #include "mode.h"
 
@@ -44,7 +44,7 @@ void Channel::SetMode(char mode,bool mode_on)
 
 void Channel::SetModeParam(char mode,const char* parameter,bool mode_on)
 {
-       CustomModeList::iterator n = custom_mode_params.find(mode);     
+       CustomModeList::iterator n = custom_mode_params.find(mode);
 
        if (mode_on)
        {
@@ -96,7 +96,7 @@ void Channel::AddUser(User* user)
 unsigned long Channel::DelUser(User* user)
 {
        CUListIter a = internal_userlist.find(user);
-       
+
        if (a != internal_userlist.end())
        {
                internal_userlist.erase(a);
@@ -105,7 +105,7 @@ unsigned long Channel::DelUser(User* user)
                DelHalfoppedUser(user);
                DelVoicedUser(user);
        }
-       
+
        return internal_userlist.size();
 }
 
@@ -139,7 +139,7 @@ void Channel::DelHalfoppedUser(User* user)
        CUListIter a = internal_halfop_userlist.find(user);
 
        if (a != internal_halfop_userlist.end())
-       {   
+       {
                internal_halfop_userlist.erase(a);
        }
 }
@@ -152,7 +152,7 @@ void Channel::AddVoicedUser(User* user)
 void Channel::DelVoicedUser(User* user)
 {
        CUListIter a = internal_voice_userlist.find(user);
-       
+
        if (a != internal_voice_userlist.end())
        {
                internal_voice_userlist.erase(a);
@@ -203,9 +203,9 @@ void Channel::SetDefaultModes()
        }
 }
 
-/* 
+/*
  * add a channel to a user, creating the record for it if needed and linking
- * it to the user record 
+ * it to the user record
  */
 Channel* Channel::JoinUser(InspIRCd* Instance, User *user, const char* cn, bool override, const char* key, bool bursting, time_t TS)
 {
@@ -439,7 +439,7 @@ bool Channel::IsBanned(User* user)
                for (BanList::iterator i = this->bans.begin(); i != this->bans.end(); i++)
                {
                        /* This allows CIDR ban matching
-                        * 
+                        *
                         *        Full masked host                      Full unmasked host                   IP with/without CIDR
                         */
                        if ((match(user->GetFullHost(),i->data)) || (match(user->GetFullRealHost(),i->data)) || (match(mask, i->data, true)))
@@ -467,7 +467,7 @@ bool Channel::IsExtBanned(User *user, char type)
                std::string maskptr = i->data.substr(2);
 
                /* This allows CIDR ban matching
-                * 
+                *
                 *        Full masked host                             Full unmasked host                     IP with/without CIDR
                 */
                if ((match(user->GetFullHost(), maskptr)) || (match(user->GetFullRealHost(), maskptr)) || (match(mask, maskptr, true)))
@@ -608,7 +608,7 @@ long Channel::KickUser(User *src, User *user, const char* reason)
                        FOREACH_RESULT(I_OnAccessCheck,OnAccessCheck(src,user,this,AC_KICK));
                        if ((MOD_RESULT == ACR_DENY) && (!ServerInstance->ULine(src->server)))
                                return this->GetUserCounter();
-       
+
                        if ((MOD_RESULT == ACR_DEFAULT) || (!ServerInstance->ULine(src->server)))
                        {
                                int them = this->GetStatus(src);
@@ -909,12 +909,12 @@ void Channel::UserList(User *user, CUList *ulist)
                if (call_modules)
                {
                        FOREACH_MOD(I_OnNamesListItem, OnNamesListItem(user, i->first, this, prefixlist, nick));
-       
+
                        /* Nick was nuked, a module wants us to skip it */
                        if (nick.empty())
                                continue;
                }
-               
+
                size_t ptrlen = 0;
 
                if (curlen + prefixlist.length() + nick.length() + 1 > 480)
@@ -980,7 +980,7 @@ void Channel::ResetMaxBans()
 const char* Channel::GetPrefixChar(User *user)
 {
        static char pf[2] = {0, 0};
-       
+
        prefixlist::iterator n = prefixes.find(user);
        if (n != prefixes.end())
        {