diff options
author | linuxdaemon <linuxdaemon@users.noreply.github.com> | 2019-01-14 05:48:45 -0600 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-01-14 11:48:45 +0000 |
commit | f400d5f394a258dee58fb56420acd65e22503761 (patch) | |
tree | eaf405f6da42adad8e92535e0f9b3b72b275ab3e /include | |
parent | 0a7d2456d9e8b5a506e4619c40caef4606864502 (diff) |
Redo OnSetEndPoint logic to fix duplicate clones (#1549).
Diffstat (limited to 'include')
-rw-r--r-- | include/inspsocket.h | 3 | ||||
-rw-r--r-- | include/users.h | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/inspsocket.h b/include/inspsocket.h index e432f9c16..69fdaac8b 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -312,8 +312,9 @@ class CoreExport StreamSocket : public EventHandler /** Called when the endpoint addresses are changed. * @param local The new local endpoint. * @param remote The new remote endpoint. + * @return true if the connection is still open, false if it has been closed */ - virtual void OnSetEndPoint(const irc::sockets::sockaddrs& local, const irc::sockets::sockaddrs& remote) { } + virtual bool OnSetEndPoint(const irc::sockets::sockaddrs& local, const irc::sockets::sockaddrs& remote); /** Send the given data out the socket, either now or when writes unblock */ diff --git a/include/users.h b/include/users.h index 469c17124..eaf400c67 100644 --- a/include/users.h +++ b/include/users.h @@ -380,9 +380,9 @@ class CoreExport User : public Extensible /** Sets the client IP for this user * @return true if the conversion was successful */ - virtual bool SetClientIP(const std::string& address, bool recheck_eline = true); + virtual bool SetClientIP(const std::string& address); - virtual void SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline = true); + virtual void SetClientIP(const irc::sockets::sockaddrs& sa); /** Constructor * @throw CoreException if the UID allocated to the user already exists @@ -689,7 +689,7 @@ class CoreExport UserIOHandler : public StreamSocket { } void OnDataReady() CXX11_OVERRIDE; - void OnSetEndPoint(const irc::sockets::sockaddrs& local, const irc::sockets::sockaddrs& remote) CXX11_OVERRIDE; + bool OnSetEndPoint(const irc::sockets::sockaddrs& local, const irc::sockets::sockaddrs& remote) CXX11_OVERRIDE; void OnError(BufferedSocketError error) CXX11_OVERRIDE; /** Adds to the user's write buffer. @@ -820,9 +820,9 @@ class CoreExport LocalUser : public User, public insp::intrusive_list_node<Local */ void SetClass(const std::string &explicit_name = ""); - bool SetClientIP(const std::string& address, bool recheck_eline = true) CXX11_OVERRIDE; + bool SetClientIP(const std::string& address) CXX11_OVERRIDE; - void SetClientIP(const irc::sockets::sockaddrs& sa, bool recheck_eline = true) CXX11_OVERRIDE; + void SetClientIP(const irc::sockets::sockaddrs& sa) CXX11_OVERRIDE; /** Send a NOTICE message from the local server to the user. * The message will be sent even if the user is connected to a remote server. |