diff options
Diffstat (limited to 'include/users.h')
-rw-r--r-- | include/users.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/include/users.h b/include/users.h index dfe4328ce..d59e540b4 100644 --- a/include/users.h +++ b/include/users.h @@ -212,6 +212,36 @@ public: { } + /* Update an existing entry with new values + */ + void Update(unsigned int timeout, unsigned int fld, const std::string &hst, unsigned int ping, + const std::string &pas, unsigned int thres, unsigned long sendq, unsigned long recvq, + unsigned long maxl, unsigned long maxg, int p) + { + if (timeout) + registration_timeout = timeout; + if (fld) + flood = fld; + if (!hst.empty()) + host = hst; + if (ping) + pingtime = ping; + if (!pas.empty()) + pass = pas; + if (thres) + threshold = thres; + if (sendq) + sendqmax = sendq; + if (recvq) + recvqmax = recvq; + if (maxl) + maxlocal = maxl; + if (maxg) + maxglobal = maxg; + if (p) + port = p; + } + /** Returns the type, CC_ALLOW or CC_DENY */ char GetType() @@ -245,11 +275,20 @@ public: return host; } + /** Get port number + */ int GetPort() { return port; } + /** Set port number + */ + void SetPort(int p) + { + port = p; + } + /** Returns the ping frequency */ unsigned int GetPingTime() @@ -298,6 +337,11 @@ public: { return maxglobal; } + + bool operator= (ConnectClass &other) + { + return (other.GetName() == name); + } }; /** Holds a complete list of all channels to which a user has been invited and has not yet joined. |