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:
@@ -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",
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user