jcs
/wallops
/amendments
/117
irc: When using /msg, don't trigger activity in server window
We just sent the message, we don't need to be notified.
jcs made amendment 117 2 months ago
--- irc.c Tue Sep 17 15:56:38 2024
+++ irc.c Tue Sep 17 16:10:37 2024
@@ -1039,6 +1039,7 @@ void
irc_process_input(struct irc_connection *conn, struct irc_channel *channel,
char *query_nick, char *str)
{
+ struct chatter_tab *tab;
char *arg0, *arg1, *channel_name;
size_t n;
bool say = false;
@@ -1216,9 +1217,13 @@ irc_process_input(struct irc_connection *conn, struct
arg1 = strsep(&str, " ");
if (arg1 == NULL || str == NULL)
goto not_enough_params;
+ if ((tab = chatter_find_tab(conn->chatter, conn, NULL)))
+ tab->ignore_activity = true;
chatter_printf(conn->chatter, conn, NULL,
"$B[$0msg$B($0%s$B)]$0$/ %s",
arg1, str);
+ if (tab)
+ tab->ignore_activity = false;
irc_printf(conn, "PRIVMSG %s :%s\r\n", arg1, str);
return;
}