mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Added command to show libotr version
This commit is contained in:
parent
42630139c2
commit
25131e3f36
@ -593,9 +593,9 @@ static struct cmd_t command_defs[] =
|
|||||||
|
|
||||||
{ "/otr",
|
{ "/otr",
|
||||||
cmd_otr, parse_args, 1, 2, NULL,
|
cmd_otr, parse_args, 1, 2, NULL,
|
||||||
{ "/otr gen|myfp|theirfp|start|end|trust|untrust|log|warn", "Off The Record encryption commands.",
|
{ "/otr gen|myfp|theirfp|start|end|trust|untrust|log|warn|libver", "Off The Record encryption commands.",
|
||||||
{ "/otr gen|myfp|theirfp|start|end|trust|untrust|log|warn",
|
{ "/otr gen|myfp|theirfp|start|end|trust|untrust|log|warn|libver",
|
||||||
"------------------------------------------------------",
|
"-------------------------------------------------------------",
|
||||||
"gen - Generate your private key.",
|
"gen - Generate your private key.",
|
||||||
"myfp - Show your fingerprint.",
|
"myfp - Show your fingerprint.",
|
||||||
"theirfp - Show contacts fingerprint.",
|
"theirfp - Show contacts fingerprint.",
|
||||||
@ -605,6 +605,7 @@ static struct cmd_t command_defs[] =
|
|||||||
"untrust - Indicate the the contact's fingerprint is not verified,",
|
"untrust - Indicate the the contact's fingerprint is not verified,",
|
||||||
"log - How to log OTR messages, options are 'on', 'off' and 'redact', with redaction being the default.",
|
"log - How to log OTR messages, options are 'on', 'off' and 'redact', with redaction being the default.",
|
||||||
"warn - Show when unencrypted messaging is being used in the title bar, options are 'on' and 'off' with 'on' being the default.",
|
"warn - Show when unencrypted messaging is being used in the title bar, options are 'on' and 'off' with 'on' being the default.",
|
||||||
|
"libver - Show which version of the libotr library is being used.",
|
||||||
NULL } } },
|
NULL } } },
|
||||||
|
|
||||||
{ "/outtype",
|
{ "/outtype",
|
||||||
@ -1056,6 +1057,7 @@ cmd_init(void)
|
|||||||
autocomplete_add(otr_ac, "untrust");
|
autocomplete_add(otr_ac, "untrust");
|
||||||
autocomplete_add(otr_ac, "log");
|
autocomplete_add(otr_ac, "log");
|
||||||
autocomplete_add(otr_ac, "warn");
|
autocomplete_add(otr_ac, "warn");
|
||||||
|
autocomplete_add(otr_ac, "libver");
|
||||||
|
|
||||||
otr_log_ac = autocomplete_new();
|
otr_log_ac = autocomplete_new();
|
||||||
autocomplete_add(otr_log_ac, "on");
|
autocomplete_add(otr_log_ac, "on");
|
||||||
|
@ -2593,6 +2593,10 @@ cmd_otr(gchar **args, struct cmd_help_t help)
|
|||||||
// update the current window
|
// update the current window
|
||||||
ui_switch_win(wins_get_current_num());
|
ui_switch_win(wins_get_current_num());
|
||||||
return result;
|
return result;
|
||||||
|
} else if (strcmp(args[0], "libver") == 0) {
|
||||||
|
char *version = otr_libotr_version();
|
||||||
|
cons_show("Using libotr version %s", version);
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jabber_get_connection_status() != JABBER_CONNECTED) {
|
if (jabber_get_connection_status() != JABBER_CONNECTED) {
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include "config/accounts.h"
|
#include "config/accounts.h"
|
||||||
|
|
||||||
void otr_init(void);
|
void otr_init(void);
|
||||||
|
char* otr_libotr_version(void);
|
||||||
void otr_on_connect(ProfAccount *account);
|
void otr_on_connect(ProfAccount *account);
|
||||||
void otr_keygen(ProfAccount *account);
|
void otr_keygen(ProfAccount *account);
|
||||||
|
|
||||||
|
@ -100,6 +100,12 @@ cb_gone_secure(void *opdata, ConnContext *context)
|
|||||||
ui_gone_secure(context->username, otr_is_trusted(context->username));
|
ui_gone_secure(context->username, otr_is_trusted(context->username));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
otr_libotr_version(void)
|
||||||
|
{
|
||||||
|
return OTRL_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
otr_init(void)
|
otr_init(void)
|
||||||
{
|
{
|
||||||
|
@ -129,6 +129,12 @@ cb_gone_secure(void *opdata, ConnContext *context)
|
|||||||
ui_gone_secure(context->username, otr_is_trusted(context->username));
|
ui_gone_secure(context->username, otr_is_trusted(context->username));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
otr_libotr_version(void)
|
||||||
|
{
|
||||||
|
return OTRL_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
otr_init(void)
|
otr_init(void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user