mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
irc: remove default CTCP replies FINGER and USERINFO (issue #1974)
This commit is contained in:
+2
-1
@@ -25,7 +25,8 @@ New features::
|
||||
* irc: create default options irc.ctcp.* when file irc.conf is created (issue #1974)
|
||||
* irc: evaluate options irc.ctcp.* (issue #1974)
|
||||
* irc: build dynamically the list of CTCPs supported in reply to "CTCP CLIENTINFO" (issue #1974)
|
||||
* irc: remove Git revision and compilation date from CTCP VERSION/FINGER reply (issue #1974)
|
||||
* irc: remove Git revision and compilation date from CTCP VERSION reply (issue #1974)
|
||||
* irc: remove default CTCP replies FINGER and USERINFO (issue #1974)
|
||||
* trigger: add options `-o`, `-ol`, `-i` and `-il` in command `/trigger list` (issue #1953)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
@@ -21,6 +21,22 @@ IRC CTCP replies are now evaluated, with the same variables available, so now
|
||||
the syntax is for example `${version}` instead of `$version`. +
|
||||
The existing options `irc.ctcp.*` are automatically converted on upgrade.
|
||||
|
||||
In addition, for privacy reasons, these default CTCP replies have been removed:
|
||||
|
||||
- FINGER
|
||||
- USERINFO
|
||||
|
||||
If ever you want that WeeChat replies to these CTCP requests, you can add them
|
||||
back with the two following commands:
|
||||
|
||||
----
|
||||
/set irc.ctcp.finger "WeeChat ${version}"
|
||||
/set irc.ctcp.userinfo "${username} (${realname})"
|
||||
----
|
||||
|
||||
They will then be advertised in reply to "CTCP CLIENTINFO", which is now built
|
||||
dynamically with these options.
|
||||
|
||||
[[v4.1.0_fset_allowed_values]]
|
||||
=== Allowed values for options on fset buffer
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ struct t_irc_channel;
|
||||
|
||||
/* list of supported CTCPs (for completion in command /ctcp) */
|
||||
#define IRC_COMMAND_CTCP_SUPPORTED_COMPLETION \
|
||||
"action|clientinfo|finger|ping|source|time|userinfo|version"
|
||||
"action|clientinfo|ping|source|time|version"
|
||||
|
||||
extern void irc_command_away_server (struct t_irc_server *server,
|
||||
const char *arguments,
|
||||
|
||||
@@ -42,10 +42,8 @@
|
||||
|
||||
struct t_irc_ctcp_reply irc_ctcp_default_reply[] =
|
||||
{ { "clientinfo", "${clientinfo}" },
|
||||
{ "finger", "WeeChat ${version}" },
|
||||
{ "source", "${download}" },
|
||||
{ "time", "${time}" },
|
||||
{ "userinfo", "${username} (${realname})" },
|
||||
{ "version", "WeeChat ${version}" },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
@@ -572,8 +570,8 @@ irc_ctcp_eval_reply (struct t_irc_server *server, const char *format)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* $clientinfo: supported CTCP, example:
|
||||
* ACTION DCC CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION
|
||||
* $clientinfo: supported CTCP, example with default config:
|
||||
* ACTION CLIENTINFO DCC PING SOURCE TIME VERSION
|
||||
*/
|
||||
info = irc_ctcp_get_supported_ctcp (server);
|
||||
if (info)
|
||||
|
||||
@@ -125,19 +125,19 @@ TEST(IrcCtcp, IrcCtcpGetSupportedCtcp)
|
||||
server = irc_server_alloc ("server");
|
||||
CHECK(server);
|
||||
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC FINGER PING SOURCE TIME USERINFO VERSION",
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC PING SOURCE TIME VERSION",
|
||||
irc_ctcp_get_supported_ctcp (server));
|
||||
|
||||
config_file_option_set_with_string ("irc.ctcp.version", "");
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC FINGER PING SOURCE TIME USERINFO",
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC PING SOURCE TIME",
|
||||
irc_ctcp_get_supported_ctcp (server));
|
||||
|
||||
config_file_option_set_with_string ("irc.ctcp.time", "");
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC FINGER PING SOURCE USERINFO",
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC PING SOURCE",
|
||||
irc_ctcp_get_supported_ctcp (server));
|
||||
|
||||
config_file_option_set_with_string ("irc.ctcp.version", "test");
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC FINGER PING SOURCE USERINFO VERSION",
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC PING SOURCE VERSION",
|
||||
irc_ctcp_get_supported_ctcp (server));
|
||||
|
||||
config_file_search_with_string ("irc.ctcp.version", NULL, NULL, &ptr_option, NULL);
|
||||
@@ -179,7 +179,7 @@ TEST(IrcCtcp, IrcCtcpEvalReply)
|
||||
WEE_TEST_STR("abc", irc_ctcp_eval_reply (server, "abc"));
|
||||
|
||||
/* ${clientinfo} */
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC FINGER PING SOURCE TIME USERINFO VERSION",
|
||||
WEE_TEST_STR("ACTION CLIENTINFO DCC PING SOURCE TIME VERSION",
|
||||
irc_ctcp_eval_reply (server, "${clientinfo}"));
|
||||
|
||||
/* ${version} */
|
||||
|
||||
@@ -2954,7 +2954,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
|
||||
"irc_privmsg,irc_ctcp,host_user@host,log1");
|
||||
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION CLIENTINFO "
|
||||
"DCC FINGER PING SOURCE TIME USERINFO VERSION",
|
||||
"DCC PING SOURCE TIME VERSION",
|
||||
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
|
||||
"no_highlight,log1");
|
||||
}
|
||||
@@ -2971,7 +2971,7 @@ TEST(IrcProtocolWithServer, privmsg)
|
||||
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
|
||||
"irc_privmsg,irc_ctcp,host_user@host,log1");
|
||||
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION CLIENTINFO "
|
||||
"DCC FINGER PING SOURCE TIME USERINFO VERSION",
|
||||
"DCC PING SOURCE TIME VERSION",
|
||||
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
|
||||
"no_highlight,log1");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user