diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/socketengine.h | 2 | ||||
-rw-r--r-- | include/socketengine_iocp.h | 2 | ||||
-rw-r--r-- | include/users.h | 30 |
3 files changed, 31 insertions, 3 deletions
diff --git a/include/socketengine.h b/include/socketengine.h index 95688117e..887d2dd56 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -353,7 +353,7 @@ public: */ virtual int Shutdown(EventHandler* fd, int how); - /** Abstraction for BSD sockets shutdownt(2). + /** Abstraction for BSD sockets shutdown(2). * This function should emulate its namesake system call exactly. * @return This method should return exactly the same values as the system call it emulates. */ diff --git a/include/socketengine_iocp.h b/include/socketengine_iocp.h index cf1a08c4c..b024828f1 100644 --- a/include/socketengine_iocp.h +++ b/include/socketengine_iocp.h @@ -221,7 +221,7 @@ public: virtual int NonBlocking(int fd); - virtual int GetSockName(EventHandler* fd, sockaddr *name, socklen_t* name); + virtual int GetSockName(EventHandler* fd, sockaddr *name, socklen_t* namelen); virtual int Close(int fd); diff --git a/include/users.h b/include/users.h index 40c360351..28bc895a5 100644 --- a/include/users.h +++ b/include/users.h @@ -175,6 +175,16 @@ class CoreExport ConnectClass : public classbase public: + /** Create a new connect class based on an existing connect class. This is required for std::vector (at least under windows). + */ + ConnectClass(const ConnectClass& source) : type(source.type), name(source.name), + registration_timeout(source.registration_timeout), flood(source.flood), host(source.host), + pingtime(source.pingtime), pass(source.pass), threshold(source.threshold), sendqmax(source.sendqmax), + recvqmax(source.recvqmax), maxlocal(source.maxlocal), maxglobal(source.maxglobal), maxchans(source.maxchans), + port(source.port) + { + } + /** Create a new connect class with no settings. */ ConnectClass() : type(CC_DENY), name("unnamed"), registration_timeout(0), flood(0), host(""), pingtime(0), pass(""), @@ -351,10 +361,28 @@ public: return maxglobal; } - bool operator= (ConnectClass &other) + bool operator== (ConnectClass &other) { return (other.GetName() == name); } + + void operator=(const ConnectClass & other) + { + type = other.type; + name = other.name; + registration_timeout = other.registration_timeout; + flood = other.flood; + host = other.host; + pingtime = other.pingtime; + pass = other.pass; + threshold = other.threshold; + sendqmax = other.sendqmax; + recvqmax = other.recvqmax; + maxlocal = other.maxlocal; + maxglobal = other.maxglobal; + maxchans = other.maxchans; + port = other.port; + } }; /** Holds a complete list of all channels to which a user has been invited and has not yet joined. |