Shutdown cleanly on SIGINT
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
/***
|
||||
|
||||
Reference in New Issue
Block a user