diff options
Diffstat (limited to 'src/otr')
-rw-r--r-- | src/otr/otr.c | 7 | ||||
-rw-r--r-- | src/otr/otr.h | 1 | ||||
-rw-r--r-- | src/otr/otrlib.h | 2 | ||||
-rw-r--r-- | src/otr/otrlibv3.c | 6 | ||||
-rw-r--r-- | src/otr/otrlibv4.c | 6 |
5 files changed, 22 insertions, 0 deletions
diff --git a/src/otr/otr.c b/src/otr/otr.c index f28406f2..64194cfc 100644 --- a/src/otr/otr.c +++ b/src/otr/otr.c @@ -99,6 +99,12 @@ _otr_libotr_version(void) return OTRL_VERSION; } +static char * +_otr_start_query(void) +{ + return otrlib_start_query(); +} + static void _otr_init(void) { @@ -454,6 +460,7 @@ otr_init_module(void) { otr_init = _otr_init; otr_libotr_version = _otr_libotr_version; + otr_start_query = _otr_start_query; otr_on_connect = _otr_on_connect; otr_keygen = _otr_keygen; otr_key_loaded = _otr_key_loaded; diff --git a/src/otr/otr.h b/src/otr/otr.h index eaf975d3..6318f425 100644 --- a/src/otr/otr.h +++ b/src/otr/otr.h @@ -29,6 +29,7 @@ void otr_init_module(void); void (*otr_init)(void); char* (*otr_libotr_version)(void); +char* (*otr_start_query)(void); void (*otr_on_connect)(ProfAccount *account); void (*otr_keygen)(ProfAccount *account); diff --git a/src/otr/otrlib.h b/src/otr/otrlib.h index bf187363..160a9e73 100644 --- a/src/otr/otrlib.h +++ b/src/otr/otrlib.h @@ -25,6 +25,8 @@ OtrlPolicy otrlib_policy(void); +char* otrlib_start_query(void); + void otrlib_init_ops(OtrlMessageAppOps *ops); ConnContext * otrlib_context_find(OtrlUserState user_state, const char * const recipient, char *jid); diff --git a/src/otr/otrlibv3.c b/src/otr/otrlibv3.c index b12f0b8f..3336093d 100644 --- a/src/otr/otrlibv3.c +++ b/src/otr/otrlibv3.c @@ -31,6 +31,12 @@ otrlib_policy(void) return OTRL_POLICY_ALLOW_V1 | OTRL_POLICY_ALLOW_V2 ; } +char * +otrlib_start_query(void) +{ + return "?OTR?v2?"; +} + static int cb_display_otr_message(void *opdata, const char *accountname, const char *protocol, const char *username, const char *msg) diff --git a/src/otr/otrlibv4.c b/src/otr/otrlibv4.c index f0b58a46..5c670355 100644 --- a/src/otr/otrlibv4.c +++ b/src/otr/otrlibv4.c @@ -32,6 +32,12 @@ otrlib_policy(void) return OTRL_POLICY_ALLOW_V1 | OTRL_POLICY_ALLOW_V2 | OTRL_POLICY_ALLOW_V3; } +char * +otrlib_start_query(void) +{ + return "?OTR?v23?"; +} + static const char* cb_otr_error_message(void *opdata, ConnContext *context, OtrlErrorCode err_code) |