summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc_client.cpp4
-rw-r--r--src/irc/irc_client.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index b0d3a47..b13e5ab 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -131,7 +131,7 @@ IrcClient::IrcClient(std::shared_ptr<Poller> poller, const std::string& hostname
const std::string& nickname, const std::string& username,
const std::string& realname, const std::string& user_hostname,
Bridge& bridge):
- TCPSocketHandler(poller),
+ TCPClientSocketHandler(poller),
hostname(hostname),
user_hostname(user_hostname),
username(username),
@@ -338,7 +338,7 @@ void IrcClient::parse_in_buffer(const size_t)
if (pos == std::string::npos)
break ;
IrcMessage message(this->in_buf.substr(0, pos));
- this->in_buf = this->in_buf.substr(pos + 2, std::string::npos);
+ this->consume_in_buffer(pos + 2);
log_debug("IRC RECEIVING: (", this->get_hostname(), ") ", message);
// Call the standard callback (if any), associated with the command
diff --git a/src/irc/irc_client.hpp b/src/irc/irc_client.hpp
index 1b4d892..4edc32c 100644
--- a/src/irc/irc_client.hpp
+++ b/src/irc/irc_client.hpp
@@ -5,7 +5,7 @@
#include <irc/irc_channel.hpp>
#include <irc/iid.hpp>
-#include <network/tcp_socket_handler.hpp>
+#include <network/tcp_client_socket_handler.hpp>
#include <network/resolver.hpp>
#include <unordered_map>
@@ -23,7 +23,7 @@ class Bridge;
* Represent one IRC client, i.e. an endpoint connected to a single IRC
* server, through a TCP socket, receiving and sending commands to it.
*/
-class IrcClient: public TCPSocketHandler
+class IrcClient: public TCPClientSocketHandler
{
public:
explicit IrcClient(std::shared_ptr<Poller> poller, const std::string& hostname,