summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/degesch.c b/degesch.c
index dc16c93..21be937 100644
--- a/degesch.c
+++ b/degesch.c
@@ -6504,24 +6504,6 @@ irc_handle_rpl_inviting (struct server *s, const struct irc_message *msg)
}
static void
-irc_handle_rpl_nowaway (struct server *s, const struct irc_message *msg)
-{
- (void) msg;
-
- if (s->irc_user)
- s->irc_user->away = true;
-}
-
-static void
-irc_handle_rpl_unaway (struct server *s, const struct irc_message *msg)
-{
- (void) msg;
-
- if (s->irc_user)
- s->irc_user->away = false;
-}
-
-static void
irc_handle_err_nicknameinuse (struct server *s, const struct irc_message *msg)
{
if (msg->params.len < 2)
@@ -6712,6 +6694,7 @@ irc_process_numeric (struct server *s,
str_vector_add_vector (&copy, msg->params.vector + !!msg->params.len);
struct buffer *buffer = s->buffer;
+ int flags = BUFFER_LINE_STATUS;
switch (numeric)
{
case IRC_RPL_WELCOME:
@@ -6742,14 +6725,18 @@ irc_process_numeric (struct server *s,
irc_handle_rpl_topicwhotime (s, msg); buffer = NULL; break;
case IRC_RPL_INVITING:
irc_handle_rpl_inviting (s, msg); buffer = NULL; break;
- case IRC_RPL_NOWAWAY:
- irc_handle_rpl_nowaway (s, msg); break;
- case IRC_RPL_UNAWAY:
- irc_handle_rpl_unaway (s, msg); break;
case IRC_ERR_NICKNAMEINUSE:
irc_handle_err_nicknameinuse (s, msg); buffer = NULL; break;
+ // Auto-away spams server buffers with activity
+ case IRC_RPL_NOWAWAY:
+ flags |= BUFFER_LINE_UNIMPORTANT;
+ if (s->irc_user) s->irc_user->away = true; break;
+ case IRC_RPL_UNAWAY:
+ flags |= BUFFER_LINE_UNIMPORTANT;
+ if (s->irc_user) s->irc_user->away = false; break;
+
case IRC_RPL_LIST:
case IRC_RPL_WHOREPLY:
case IRC_RPL_ENDOFWHO:
@@ -6777,8 +6764,7 @@ irc_process_numeric (struct server *s,
if (buffer)
{
// Join the parameter vector back and send it to the server buffer
- log_server (s, buffer, BUFFER_LINE_STATUS,
- "#&m", join_str_vector (&copy, ' '));
+ log_server (s, buffer, flags, "#&m", join_str_vector (&copy, ' '));
}
str_vector_free (&copy);