Some cleanups
This commit is contained in:
@@ -196,12 +196,8 @@ namespace utils
|
|||||||
outbuf_ptr++;
|
outbuf_ptr++;
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
case E2BIG:
|
case E2BIG: // This should never happen
|
||||||
// This should never happen
|
default: // This should happen even neverer
|
||||||
done = true;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// This should happen even neverer
|
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -222,9 +222,8 @@ void XmppComponent::close_document()
|
|||||||
this->doc_open = false;
|
this->doc_open = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmppComponent::handle_handshake(const Stanza& stanza)
|
void XmppComponent::handle_handshake(const Stanza&)
|
||||||
{
|
{
|
||||||
(void)stanza;
|
|
||||||
this->authenticated = true;
|
this->authenticated = true;
|
||||||
this->ever_auth = true;
|
this->ever_auth = true;
|
||||||
log_info("Authenticated with the XMPP server");
|
log_info("Authenticated with the XMPP server");
|
||||||
|
|||||||
@@ -942,7 +942,7 @@ void IrcClient::on_nick(const IrcMessage& message)
|
|||||||
{
|
{
|
||||||
const std::string new_nick = IrcUser(message.arguments[0]).nick;
|
const std::string new_nick = IrcUser(message.arguments[0]).nick;
|
||||||
const std::string current_nick = IrcUser(message.prefix).nick;
|
const std::string current_nick = IrcUser(message.prefix).nick;
|
||||||
const auto change_nick_func = [&](const std::string& chan_name, const IrcChannel* channel)
|
const auto change_nick_func = [this, &new_nick, ¤t_nick](const std::string& chan_name, const IrcChannel* channel)
|
||||||
{
|
{
|
||||||
IrcUser* user;
|
IrcUser* user;
|
||||||
if (channel->get_self() && channel->get_self()->nick == current_nick)
|
if (channel->get_self() && channel->get_self()->nick == current_nick)
|
||||||
|
|||||||
+2
-2
@@ -14,9 +14,9 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
// A flag set by the SIGINT signal handler.
|
// A flag set by the SIGINT signal handler.
|
||||||
static volatile std::atomic<bool> stop(false);
|
static std::atomic<bool> stop(false);
|
||||||
// Flag set by the SIGUSR1/2 signal handler.
|
// Flag set by the SIGUSR1/2 signal handler.
|
||||||
static volatile std::atomic<bool> reload(false);
|
static std::atomic<bool> reload(false);
|
||||||
// A flag indicating that we are wanting to exit the process. i.e: if this
|
// A flag indicating that we are wanting to exit the process. i.e: if this
|
||||||
// flag is set and all connections are closed, we can exit properly.
|
// flag is set and all connections are closed, we can exit properly.
|
||||||
static bool exiting = false;
|
static bool exiting = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user