summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp8
-rw-r--r--src/bridge/bridge.hpp4
2 files changed, 12 insertions, 0 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 973e095..606cb02 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -21,6 +21,14 @@ Bridge::~Bridge()
{
}
+void Bridge::shutdown()
+{
+ for (auto it = this->irc_clients.begin(); it != this->irc_clients.end(); ++it)
+ {
+ it->second->send_quit_command();
+ }
+}
+
Xmpp::body Bridge::make_xmpp_body(const std::string& str)
{
std::string res;
diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp
index bbbca95..7a36b59 100644
--- a/src/bridge/bridge.hpp
+++ b/src/bridge/bridge.hpp
@@ -24,6 +24,10 @@ class Bridge
public:
explicit Bridge(const std::string& user_jid, XmppComponent* xmpp, Poller* poller);
~Bridge();
+ /**
+ * QUIT all connected IRC servers.
+ */
+ void shutdown();
static Xmpp::body make_xmpp_body(const std::string& str);
/***