Feature #973 ยป 0048-Drop-long-deprecated-metamessage-command.patch
server/commands.c | ||
---|---|---|
NULL, NULL,
|
||
CMD_ECHO_ALL, VCF_NONE, 50
|
||
},
|
||
{"metamessage", ALLOW_CTRL,
|
||
/* TRANS: translate text between <> only */
|
||
N_("metamessage <meta-line>"),
|
||
N_("Set metaserver info line."),
|
||
N_("This command is deprecated. Set metamessage setting directly instead. "
|
||
"Command sets user defined metaserver info line. If parameter is omitted, "
|
||
"previously set metamessage will be removed. For most of the time "
|
||
"user defined metamessage will be used instead of automatically "
|
||
"generated messages, if it is available."), NULL,
|
||
CMD_ECHO_ADMINS, VCF_NONE, 50
|
||
},
|
||
{"metapatches", ALLOW_HACK,
|
||
/* TRANS: translate text between <> only */
|
||
N_("metapatches <meta-line>"),
|
server/commands.h | ||
---|---|---|
CMD_SET,
|
||
CMD_TEAM,
|
||
CMD_RULESETDIR,
|
||
CMD_METAMESSAGE,
|
||
CMD_METAPATCHES,
|
||
CMD_METACONN,
|
||
CMD_METASERVER,
|
server/stdinhand.c | ||
---|---|---|
return TRUE;
|
||
}
|
||
/**********************************************************************//**
|
||
Handle metamessage command.
|
||
**************************************************************************/
|
||
static bool metamessage_command(struct connection *caller,
|
||
char *arg, bool check)
|
||
{
|
||
struct setting *pset;
|
||
log_deprecation(_("/metamessage command is deprecated. "
|
||
"Set metamessage setting instead."));
|
||
if (check) {
|
||
return TRUE;
|
||
}
|
||
set_user_meta_message_string(arg);
|
||
if (is_metaserver_open()) {
|
||
send_server_info_to_metaserver(META_INFO);
|
||
cmd_reply(CMD_METAMESSAGE, caller, C_OK,
|
||
_("Metaserver message string set to '%s'."), arg);
|
||
} else {
|
||
cmd_reply(CMD_METAMESSAGE, caller, C_OK,
|
||
_("Metaserver message string set to '%s', "
|
||
"not reporting to metaserver."), arg);
|
||
}
|
||
/* Metamessage is also a setting. */
|
||
pset = setting_by_name("metamessage");
|
||
setting_changed(pset);
|
||
send_server_setting(NULL, pset);
|
||
return TRUE;
|
||
}
|
||
/**********************************************************************//**
|
||
Handle metaserver command.
|
||
**************************************************************************/
|
||
... | ... | |
return load_command(caller, arg, check, FALSE);
|
||
case CMD_METAPATCHES:
|
||
return metapatches_command(caller, arg, check);
|
||
case CMD_METAMESSAGE:
|
||
return metamessage_command(caller, arg, check);
|
||
case CMD_METACONN:
|
||
return metaconnection_command(caller, arg, check);
|
||
case CMD_METASERVER:
|