Merge remote-tracking branch 'oliverlemoal/xep-0280' into xep-0280

This commit is contained in:
James Booth
2015-03-08 21:51:50 +00:00
17 changed files with 167 additions and 2 deletions

View File

@@ -904,6 +904,15 @@ static struct cmd_t command_defs[] =
"shared on|off : Share logs between all instances, default: on.",
NULL } } },
{ "/carbons",
cmd_carbons, parse_args, 1, 1, &cons_carbons_setting,
{ "/carbons on|off", "Message carbons.",
{ "/carbons on|off",
"---------------",
"Enable or disable message carbons.",
"The message carbons feature ensures that both sides of all conversations are shared with all the user's clients that implement this protocol.",
NULL } } },
{ "/reconnect",
cmd_reconnect, parse_args, 1, 1, &cons_reconnect_setting,
{ "/reconnect seconds", "Set reconnect interval.",

View File

@@ -730,7 +730,7 @@ cmd_help(gchar **args, struct cmd_help_t help)
} else if (strcmp(args[0], "settings") == 0) {
gchar *filter[] = { "/account", "/autoaway", "/autoping", "/autoconnect", "/beep",
"/chlog", "/flash", "/gone", "/grlog", "/history", "/intype",
"/carbons", "/chlog", "/flash", "/gone", "/grlog", "/history", "/intype",
"/log", "/mouse", "/notify", "/outtype", "/prefs", "/priority",
"/reconnect", "/roster", "/splash", "/states", "/statuses", "/theme",
"/titlebar", "/vercheck", "/privileges", "/occupants", "/presence", "/wrap" };
@@ -3892,6 +3892,22 @@ cmd_history(gchar **args, struct cmd_help_t help)
return result;
}
gboolean
cmd_carbons(gchar **args, struct cmd_help_t help)
{
gboolean result = _cmd_set_boolean_preference(args[0], help,
"Carbons message", PREF_CARBONS);
// enable carbons
if (strcmp(args[0], "on") == 0) {
iq_enable_carbons();
}
else if (strcmp(args[0], "off") == 0){
iq_disable_carbons();
}
return result;
}
gboolean
cmd_away(gchar **args, struct cmd_help_t help)
{

View File

@@ -85,6 +85,7 @@ gboolean cmd_grlog(gchar **args, struct cmd_help_t help);
gboolean cmd_group(gchar **args, struct cmd_help_t help);
gboolean cmd_help(gchar **args, struct cmd_help_t help);
gboolean cmd_history(gchar **args, struct cmd_help_t help);
gboolean cmd_carbons(gchar **args, struct cmd_help_t help);
gboolean cmd_info(gchar **args, struct cmd_help_t help);
gboolean cmd_intype(gchar **args, struct cmd_help_t help);
gboolean cmd_invite(gchar **args, struct cmd_help_t help);