hirc

IRC client
Log | Files | Refs

commit a7ddefde1336dee5486a94618a8018baee5fba7e
parent 10d5eeaddd81e80792815e379feb981d33e8174d
Author: hhvn <dev@hhvn.uk>
Date:   Thu,  2 Dec 2021 23:03:03 +0000

struct.h commands.c: use Activity_none for ui messages

Diffstat:
Mcommands.c | 24++++++++++++------------
Mstruct.h | 1+
2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/commands.c b/commands.c @@ -504,16 +504,16 @@ command_help(struct Server *server, char *str) { } if (strcmp(str, "commands") == 0) { - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :Commands:"); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :Commands:"); for (i=0; commands[i].name && commands[i].func; i++) - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI : %s", commands[i].name); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI : %s", commands[i].name); return; } if (strcmp(str, "variables") == 0) { - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :Variables:"); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :Variables:"); for (i=0; config[i].name; i++) - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI : %s", config[i].name); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI : %s", config[i].name); return; } @@ -524,11 +524,11 @@ command_help(struct Server *server, char *str) { for (i=0; commands[i].name && commands[i].func; i++) { if (strcmp(commands[i].name, str) == 0) { - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", str); - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :==="); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", str); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :==="); for (j=0; commands[i].description[j]; j++) - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", commands[i].description[j]); - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :"); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", commands[i].description[j]); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :"); return; } } @@ -536,11 +536,11 @@ command_help(struct Server *server, char *str) { if (!cmdonly) { for (i=0; config[i].name; i++) { if (strcmp(config[i].name, str) == 0) { - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", str); - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :==="); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", str); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :==="); for (j=0; config[i].description[j]; j++) - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", config[i].description[j]); - hist_format(selected.history, Activity_status, HIST_SHOW|HIST_SELTMP, "SELF_UI :"); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :%s", config[i].description[j]); + hist_format(selected.history, Activity_none, HIST_SHOW|HIST_SELTMP, "SELF_UI :"); return; } } diff --git a/struct.h b/struct.h @@ -22,6 +22,7 @@ struct Nick { enum Activity { Activity_ignore, + Activity_none, Activity_self = Activity_ignore, Activity_status, Activity_notice = Activity_status,