1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

irc: add option irc.look.display_host_wallops

This commit is contained in:
Sébastien Helleu
2023-12-10 21:13:00 +01:00
parent 3db8eb65ff
commit b3422b96c0
19 changed files with 105 additions and 22 deletions
+7
View File
@@ -77,6 +77,7 @@ struct t_config_option *irc_config_look_display_host_join = NULL;
struct t_config_option *irc_config_look_display_host_join_local = NULL;
struct t_config_option *irc_config_look_display_host_notice = NULL;
struct t_config_option *irc_config_look_display_host_quit = NULL;
struct t_config_option *irc_config_look_display_host_wallops = NULL;
struct t_config_option *irc_config_look_display_join_message = NULL;
struct t_config_option *irc_config_look_display_old_topic = NULL;
struct t_config_option *irc_config_look_display_pv_away_once = NULL;
@@ -3182,6 +3183,12 @@ irc_config_init ()
N_("display host in part/quit messages"),
NULL, 0, 0, "on", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_display_host_wallops = weechat_config_new_option (
irc_config_file, irc_config_section_look,
"display_host_wallops", "boolean",
N_("display host in wallops messages"),
NULL, 0, 0, "on", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_display_join_message = weechat_config_new_option (
irc_config_file, irc_config_section_look,
"display_join_message", "string",
+1
View File
@@ -112,6 +112,7 @@ extern struct t_config_option *irc_config_look_display_host_join;
extern struct t_config_option *irc_config_look_display_host_join_local;
extern struct t_config_option *irc_config_look_display_host_notice;
extern struct t_config_option *irc_config_look_display_host_quit;
extern struct t_config_option *irc_config_look_display_host_wallops;
extern struct t_config_option *irc_config_look_display_join_message;
extern struct t_config_option *irc_config_look_display_old_topic;
extern struct t_config_option *irc_config_look_display_pv_away_once;
+8 -1
View File
@@ -3936,13 +3936,20 @@ IRC_PROTOCOL_CALLBACK(wallops)
{
const char *nick_address;
char *str_message;
int display_host;
IRC_PROTOCOL_MIN_PARAMS(1);
if (ctxt->ignore_remove)
return WEECHAT_RC_OK;
nick_address = irc_protocol_nick_address (ctxt->server, 0, NULL, ctxt->nick, ctxt->address);
display_host = weechat_config_boolean (irc_config_look_display_host_wallops);
nick_address = irc_protocol_nick_address (
ctxt->server,
0,
NULL,
ctxt->nick,
(display_host) ? ctxt->address : NULL);
str_message = irc_protocol_string_params (ctxt->params, 0, ctxt->num_params - 1);