debian/0000755000000000000000000000000012175762411007174 5ustar debian/examples0000644000000000000000000000003312053767446010741 0ustar mcabberrc.example contrib/ debian/copyright0000644000000000000000000000326712053767446011147 0ustar This package was debianized by Mario Iseli on Sat, 08 Jul 2006 01:02:41 +0200. It was downloaded from Copyright Holders: Mikael Berthe Konstantin Klyagin Peter Deutsch Panos Tsirigotis The Jabber Team http://jabber.org/ Tha Apache Group Thomas Muldowney Ryan Eatmon Robert Norris Jeremie Miller Daniel Borca James Clark Free Software Foundation, Inc. Massachusetts Institute of Technology See also: /usr/share/doc/mcabber/AUTHORS License Copyright (C) 2005-2010 Mikael Berthe This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Mikael Berthe has added an exception to the license which allows linking with OpenSSL. On Debian systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2', later versions can be found in the same directory. debian/menu0000644000000000000000000000017212053767446010073 0ustar ?package(mcabber):needs="text" section="Applications/Network/Communication"\ title="mcabber" command="/usr/bin/mcabber" debian/patches/0000755000000000000000000000000012171261575010624 5ustar debian/patches/mcabber_bookmark_password.patch0000644000000000000000000000633212171261553017047 0ustar This patch adds support for storing passwords to a MUC (patch by Nico Golde ). --- a/mcabber/commands.c +++ b/mcabber/commands.c @@ -3149,7 +3149,7 @@ static void room_bookmark(gpointer bud, char *arg) { const char *roomid; - const char *name = NULL, *nick = NULL, *group = NULL; + const char *name = NULL, *nick = NULL, *group = NULL, *passwd = NULL; char *tmpnick = NULL; enum room_autowhois autowhois = 0; enum room_flagjoins flagjoins = 0; @@ -3163,7 +3163,8 @@ char **paramlst; char **pp; - paramlst = split_arg(arg, 3, 0); // At most 3 parameters + paramlst = split_arg(arg, 4, 0); // At most 4 parameters + for (pp = paramlst; *pp; pp++) { if (!strcasecmp(*pp, "add")) action = bm_add; @@ -3178,9 +3179,11 @@ autojoin_set = 1; } else if (!strcmp(*pp, "-")) nick_set = 1; - else { + else if(nick_set == 0){ nick_set = 1; nick = tmpnick = to_utf8 (*pp); + } else if(nick_set == 1){ + passwd = to_utf8(*pp); } } free_arg_lst(paramlst); @@ -3204,7 +3207,7 @@ group = buddy_getgroupname(bud); } - xmpp_set_storage_bookmark(roomid, name, nick, NULL, autojoin, + xmpp_set_storage_bookmark(roomid, name, nick, passwd, autojoin, printstatus, autowhois, flagjoins, group); g_free (tmpnick); } @@ -3231,11 +3234,15 @@ (bm_elt->autojoin ? '*' : ' '), bm_elt->roomjid); if (bm_elt->nick) g_string_append_printf(sbuf, " (%s)", bm_elt->nick); + if (bm_elt->passwd) + /* replace password for security reasons */ + g_string_append_printf(sbuf, " (*****)"); if (bm_elt->name) g_string_append_printf(sbuf, " %s", bm_elt->name); g_free(bm_elt->roomjid); g_free(bm_elt->name); g_free(bm_elt->nick); + g_free(bm_elt->passwd); g_free(bm_elt); scr_WriteIncomingMessage(NULL, sbuf->str, 0, HBB_PREFIX_INFO | HBB_PREFIX_CONT, 0); --- a/mcabber/xmpp.c +++ b/mcabber/xmpp.c @@ -2226,7 +2226,7 @@ // If the node is a conference item, let's add the note to our list. if (x->name && !strcmp(x->name, "conference")) { struct bookmark *bm_elt; - const char *autojoin, *name, *nick; + const char *autojoin, *name, *nick, *passwd; const char *fjid = lm_message_node_get_attribute(x, "jid"); if (!fjid) continue; @@ -2235,10 +2235,13 @@ autojoin = lm_message_node_get_attribute(x, "autojoin"); nick = lm_message_node_get_child_value(x, "nick"); name = lm_message_node_get_attribute(x, "name"); + passwd = lm_message_node_get_child_value(x, "password"); if (autojoin && (!strcmp(autojoin, "1") || !strcmp(autojoin, "true"))) bm_elt->autojoin = 1; if (nick) bm_elt->nick = g_strdup(nick); + if (nick) + bm_elt->passwd = g_strdup(passwd); if (name) bm_elt->name = g_strdup(name); sl_bookmarks = g_slist_append(sl_bookmarks, bm_elt); --- a/mcabber/xmpp.h +++ b/mcabber/xmpp.h @@ -24,6 +24,7 @@ gchar *roomjid; gchar *name; gchar *nick; + gchar *passwd; guint autojoin; /* enum room_printstatus pstatus; */ /* enum room_autowhois awhois; */ debian/patches/mcabber_use_libotr4.patch0000644000000000000000000005145112170751340015552 0ustar # HG changeset patch # Parent 1b31bdb72d83850b146a0e1e135eba35bad73d29 Switch to libotr v4 API --- a/configure.ac +++ b/configure.ac @@ -184,16 +184,26 @@ # Check for otr AC_ARG_ENABLE(otr, - AC_HELP_STRING([--enable-otr], - [enable OTR (Off-the-Record) messaging support]), - enable_otr=$enableval, otr="") + AC_HELP_STRING([--enable-otr], + [enable OTR (Off-the-Record) messaging support]), + enable_otr=$enableval, + otr="") if test "x$enable_otr" = "xyes"; then - # Look for libgcrypt and libotr - AM_PATH_LIBGCRYPT(1.2.2, [ - AM_PATH_LIBOTR(3.1.0, , - AC_MSG_ERROR(libotr 3.1.0 or newer is required.)) - ], AC_MSG_ERROR(libgcrypt 1.2.2 or newer is required.) - ) + # Look for libgcrypt and libotr + AM_PATH_LIBGCRYPT(1.2.2, [ + AM_PATH_LIBOTR(4.0.0, [ + AC_DEFINE([HAVE_LIBOTR], 1, [Define if you use libotr]) + ], [ + AM_PATH_LIBOTR(3.1.0, [ + AC_DEFINE([HAVE_LIBOTR], 1, [Define if you use libotr]) + AC_DEFINE([HAVE_LIBOTR3], 1, [Define if you use libotr v3]) + ], [ + AC_MSG_ERROR(libotr 3.1.0 or newer is required.) + ]) + ]) + ], [ + AC_MSG_ERROR(libgcrypt 1.2.2 or newer is required.) + ]) fi # Check for Enchant stuff @@ -290,3 +300,4 @@ mcabber.pc Makefile]) AC_OUTPUT +dnl vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2: For Vim users... --- a/mcabber/otr.c +++ b/mcabber/otr.c @@ -56,6 +56,20 @@ const char *protocol, const char *recipient, const char *message); +static void cb_update_context_list(void *opdata); +static void cb_new_fingerprint (void *opdata, OtrlUserState us, + const char *accountname, + const char *protocol, + const char *username, + unsigned char fingerprint[20]); +static void cb_write_fingerprints (void *opdata); +static void cb_gone_secure (void *opdata, ConnContext *context); +static void cb_gone_insecure (void *opdata, ConnContext *context); +static void cb_still_secure (void *opdata, ConnContext *context, + int is_reply); +static int cb_max_message_size (void *opdata, ConnContext *context); + +#ifdef HAVE_LIBOTR3 static void cb_notify (void *opdata, OtrlNotifyLevel level, const char *accountname, @@ -69,22 +83,26 @@ const char *protocol, const char *username, const char *msg); -static void cb_update_context_list(void *opdata); static const char *cb_protocol_name (void *opdata, const char *protocol); static void cb_protocol_name_free (void *opdata, const char *protocol_name); -static void cb_new_fingerprint (void *opdata, OtrlUserState us, - const char *accountname, - const char *protocol, - const char *username, - unsigned char fingerprint[20]); -static void cb_write_fingerprints (void *opdata); -static void cb_gone_secure (void *opdata, ConnContext *context); -static void cb_gone_insecure (void *opdata, ConnContext *context); -static void cb_still_secure (void *opdata, ConnContext *context, - int is_reply); static void cb_log_message (void *opdata, const char *message); -static int cb_max_message_size (void *opdata, ConnContext *context); + +static void otr_handle_smp_tlvs (OtrlTLV *tlvs, ConnContext *ctx); +#else /* HAVE_LIBOTR3 */ +static char *tagfile = NULL; +static guint otr_timer_source = 0; + +static void cb_handle_smp_event (void *opdata, OtrlSMPEvent event, + ConnContext *context, unsigned short percent, + char *question); +static void cb_handle_msg_event (void *opdata, OtrlMessageEvent event, + ConnContext *context, const char *message, + gcry_error_t err); +static void cb_create_instag (void *opdata, const char *accountname, + const char *protocol); +static void cb_timer_control (void *opdata, unsigned int interval); +#endif /* HAVE_LIBOTR3 */ static OtrlMessageAppOps ops = { @@ -92,26 +110,44 @@ cb_create_privkey, cb_is_logged_in, cb_inject_message, +#ifdef HAVE_LIBOTR3 cb_notify, cb_display_otr_message, +#endif cb_update_context_list, +#ifdef HAVE_LIBOTR3 cb_protocol_name, cb_protocol_name_free, +#endif cb_new_fingerprint, cb_write_fingerprints, cb_gone_secure, cb_gone_insecure, cb_still_secure, +#ifdef HAVE_LIBOTR3 cb_log_message, +#endif cb_max_message_size, - NULL, /*account_name*/ - NULL /*account_name_free*/ + NULL, /* account_name */ + NULL, /* account_name_free */ +#ifndef HAVE_LIBOTR3 + NULL, /* received_symkey */ + NULL, /* otr_error_message */ + NULL, /* otr_error_message_free */ + NULL, /* resent_msg_prefix */ + NULL, /* resent_msg_prefix_free */ + cb_handle_smp_event, + cb_handle_msg_event, + cb_create_instag, + NULL, /* convert_msg */ + NULL, /* convert_free */ + cb_timer_control, +#endif }; static void otr_message_disconnect(ConnContext *ctx); static ConnContext *otr_get_context(const char *buddy); static void otr_startstop(const char *buddy, int start); -static void otr_handle_smp_tlvs(OtrlTLV *tlvs, ConnContext *ctx); static char *otr_get_dir(void); @@ -135,7 +171,6 @@ account = jidtodisp(fjid); keyfile = g_strdup_printf("%s%s.key", root, account); fprfile = g_strdup_printf("%s%s.fpr", root, account); - g_free(root); if (otrl_privkey_read(userstate, keyfile)){ scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR key from %s", keyfile); @@ -145,6 +180,14 @@ scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR fingerprints from %s", fprfile); } +#ifndef HAVE_LIBOTR3 + tagfile = g_strdup_printf("%s%s.tag", root, account); + if (otrl_instag_read(userstate, tagfile)) { + scr_LogPrint(LPRINT_LOGNORM, "Could not read OTR instance tag from %s", tagfile); + cb_create_instag(NULL, account, OTR_PROTOCOL_NAME); + } +#endif + g_free(root); } void otr_terminate(void) @@ -154,6 +197,13 @@ if (!otr_is_enabled) return; +#ifndef HAVE_LIBOTR3 + if (otr_timer_source > 0) { + g_source_remove (otr_timer_source); + otr_timer_source = 0; + } +#endif + for (ctx = userstate->context_root; ctx; ctx = ctx->next) if (ctx->msgstate == OTRL_MSGSTATE_ENCRYPTED) otr_message_disconnect(ctx); @@ -175,6 +225,12 @@ userstate = NULL; g_free(keyfile); keyfile = NULL; + g_free(fprfile); + fprfile = NULL; +#ifndef HAVE_LIBOTR3 + g_free(tagfile); + tagfile = NULL; +#endif } static char *otr_get_dir(void) @@ -206,7 +262,12 @@ mc_strtolower(lowcasebuddy); ctx = otrl_context_find(userstate, lowcasebuddy, account, OTR_PROTOCOL_NAME, +#ifdef HAVE_LIBOTR3 1, &null, NULL, NULL); +#else + // INSTAG XXX + OTRL_INSTAG_BEST, 1, &null, NULL, NULL); +#endif g_free(lowcasebuddy); return ctx; } @@ -216,7 +277,12 @@ if (ctx->msgstate == OTRL_MSGSTATE_ENCRYPTED) cb_gone_insecure(NULL, ctx); otrl_message_disconnect(userstate, &ops, NULL, ctx->accountname, +#ifdef HAVE_LIBOTR3 ctx->protocol, ctx->username); +#else + // INSTAG XXX + ctx->protocol, ctx->username, OTRL_INSTAG_BEST); +#endif } static void otr_startstop(const char *buddy, int start) @@ -283,6 +349,8 @@ cb_write_fingerprints(NULL); } +#ifdef HAVE_LIBOTR3 + static void otr_handle_smp_tlvs(OtrlTLV *tlvs, ConnContext *ctx) { OtrlTLV *tlv = NULL; @@ -354,6 +422,130 @@ } } +#else /* HAVE_LIBOTR3 */ + +static void cb_handle_smp_event(void *opdata, OtrlSMPEvent event, + ConnContext *context, unsigned short percent, + char *question) +{ + const char *msg = NULL; + char *freeme = NULL; + switch (event) { + case OTRL_SMPEVENT_ASK_FOR_SECRET: + msg = freeme = g_strdup_printf("OTR: Socialist Millionaires' Protocol: " + "Received SMP Initiation.\n" + "Answer with /otr smpr %s $secret", + context->username); + break; + case OTRL_SMPEVENT_ASK_FOR_ANSWER: + msg = freeme = g_strdup_printf("OTR: Socialist Millionaires' Protocol: " + "Received SMP Initiation.\n" + "Answer with /otr smpr %s $secret\n" + "Question: %s", context->username, + question); + break; + case OTRL_SMPEVENT_CHEATED: + msg = "OTR: Socialist Millionaires' Protocol: Correspondent cancelled negotiation!"; + otrl_message_abort_smp(userstate, &ops, opdata, context); + break; + case OTRL_SMPEVENT_IN_PROGRESS: + scr_log_print(LPRINT_DEBUG, "OTR: Socialist Millionaires' Protocol: " + "Negotiation is in pogress..."); + break; + case OTRL_SMPEVENT_SUCCESS: + msg = "OTR: Socialist Millionaires' Protocol: Success!"; + break; + case OTRL_SMPEVENT_FAILURE: + msg = "OTR: Socialist Millionaires' Protocol: Failure."; + break; + case OTRL_SMPEVENT_ABORT: + msg = "OTR: Socialist Millionaires' Protocol: Aborted."; + break; + case OTRL_SMPEVENT_ERROR: + msg = "OTR: Socialist Millionaires' Protocol: Error occured, aborting negotiations!"; + otrl_message_abort_smp(userstate, &ops, opdata, context); + break; + default: + break; + } + + if (msg) { + scr_WriteIncomingMessage(context->username, msg, 0, HBB_PREFIX_INFO, 0); + g_free(freeme); + } +} + +static void cb_handle_msg_event(void *opdata, OtrlMessageEvent event, + ConnContext *context, const char *message, + gcry_error_t err) +{ + const char *msg = NULL; + char *freeme = NULL; + switch (event) { + case OTRL_MSGEVENT_ENCRYPTION_REQUIRED: + msg = "OTR: Policy requires encryption on message!"; + break; + case OTRL_MSGEVENT_ENCRYPTION_ERROR: + msg = "OTR: Encryption error! Message not sent."; + break; + case OTRL_MSGEVENT_CONNECTION_ENDED: + msg = "OTR: Connection closed by remote end, message lost. " + "Close or refresh connection."; + break; + case OTRL_MSGEVENT_SETUP_ERROR: + // FIXME + msg = freeme = g_strdup_printf("OTR: Error setting up private conversation: %u", + err); + break; + case OTRL_MSGEVENT_MSG_REFLECTED: + msg = "OTR: Received own OTR message!"; + break; + case OTRL_MSGEVENT_MSG_RESENT: + msg = "OTR: Previous message was resent."; + break; + case OTRL_MSGEVENT_RCVDMSG_NOT_IN_PRIVATE: + msg = "OTR: Received encrypted message, but connection is not established " \ + "yet! Message lost."; + break; + case OTRL_MSGEVENT_RCVDMSG_UNREADABLE: + msg = "OTR: Unable to read incoming message!"; + break; + case OTRL_MSGEVENT_RCVDMSG_MALFORMED: + msg = "OTR: Malformed incoming message!"; + break; + case OTRL_MSGEVENT_LOG_HEARTBEAT_RCVD: + scr_log_print(LPRINT_DEBUG, "OTR: Received heartbeat."); + break; + case OTRL_MSGEVENT_LOG_HEARTBEAT_SENT: + scr_log_print(LPRINT_DEBUG, "OTR: Sent heartbeat."); + break; + case OTRL_MSGEVENT_RCVDMSG_GENERAL_ERR: + msg = freeme = g_strdup_printf("OTR: Received general otr error: %s", + message); + break; + case OTRL_MSGEVENT_RCVDMSG_UNENCRYPTED: + msg = freeme = g_strdup_printf("OTR: Received unencrypted message: %s", + message); + break; + case OTRL_MSGEVENT_RCVDMSG_UNRECOGNIZED: + msg = "OTR: Unable to determine type of received OTR message!"; + break; + case OTRL_MSGEVENT_RCVDMSG_FOR_OTHER_INSTANCE: + // XXX + scr_log_print(LPRINT_DEBUG, "OTR: Received message for other instance."); + break; + default: + break; + } + + if (msg) { + scr_WriteIncomingMessage(context->username, msg, 0, HBB_PREFIX_INFO, 0); + g_free(freeme); + } +} + +#endif /* HAVE_LIBOTR3 */ + /* * returns whether a otr_message was received * sets *otr_data to NULL, when it was an internal otr message @@ -362,8 +554,10 @@ { int ignore_message; char *newmessage = NULL; +#ifdef HAVE_LIBOTR3 OtrlTLV *tlvs = NULL; OtrlTLV *tlv = NULL; +#endif ConnContext *ctx; ctx = otr_get_context(buddy); @@ -371,8 +565,8 @@ ignore_message = otrl_message_receiving(userstate, &ops, NULL, ctx->accountname, ctx->protocol, ctx->username, *otr_data, - &newmessage, &tlvs,NULL, NULL); - +#ifdef HAVE_LIBOTR3 + &newmessage, &tlvs, NULL, NULL); tlv = otrl_tlv_find(tlvs, OTRL_TLV_DISCONNECTED); if (tlv) { @@ -387,6 +581,9 @@ if (tlvs != NULL) otrl_tlv_free(tlvs); +#else + &newmessage, NULL, NULL, NULL, NULL); +#endif if (ignore_message) *otr_data = NULL; @@ -410,13 +607,27 @@ if (ctx->msgstate == OTRL_MSGSTATE_PLAINTEXT) err = otrl_message_sending(userstate, &ops, NULL, ctx->accountname, +#ifdef HAVE_LIBOTR3 ctx->protocol, ctx->username, *msg, NULL, &newmessage, NULL, NULL); +#else + // INSTAG XXX + ctx->protocol, ctx->username, OTRL_INSTAG_BEST, + *msg, NULL, &newmessage, OTRL_FRAGMENT_SEND_SKIP, + NULL, NULL, NULL); +#endif else { htmlmsg = html_escape(*msg); err = otrl_message_sending(userstate, &ops, NULL, ctx->accountname, +#ifdef HAVE_LIBOTR3 ctx->protocol, ctx->username, htmlmsg, NULL, &newmessage, NULL, NULL); +#else + // INSTAG XXX + ctx->protocol, ctx->username, OTRL_INSTAG_BEST, + htmlmsg, NULL, &newmessage, OTRL_FRAGMENT_SEND_SKIP, + NULL, NULL, NULL); +#endif g_free(htmlmsg); } @@ -648,6 +859,59 @@ LM_MESSAGE_SUB_TYPE_NOT_SET, NULL); } +/* When the list of ConnContexts changes (including a change in + * state), this is called so the UI can be updated. */ +static void cb_update_context_list(void *opdata) +{ + /*maybe introduce new status characters for mcabber, + * then use this function (?!)*/ +} + +/* A new fingerprint for the given user has been received. */ +static void cb_new_fingerprint(void *opdata, OtrlUserState us, + const char *accountname, const char *protocol, + const char *username, + unsigned char fingerprint[20]) +{ + char *sbuf = NULL; + char readable[45]; + + otrl_privkey_hash_to_human(readable, fingerprint); + sbuf = g_strdup_printf("OTR: new fingerprint: %s", readable); + scr_WriteIncomingMessage(username, sbuf, 0, HBB_PREFIX_INFO, 0); + g_free(sbuf); +} + +/* The list of known fingerprints has changed. Write them to disk. */ +static void cb_write_fingerprints(void *opdata) +{ + otrl_privkey_write_fingerprints(userstate, fprfile); +} + +/* A ConnContext has entered a secure state. */ +static void cb_gone_secure(void *opdata, ConnContext *context) +{ + scr_WriteIncomingMessage(context->username, "OTR: channel established", 0, + HBB_PREFIX_INFO, 0); +} + +/* A ConnContext has left a secure state. */ +static void cb_gone_insecure(void *opdata, ConnContext *context) +{ + scr_WriteIncomingMessage(context->username, "OTR: channel closed", 0, + HBB_PREFIX_INFO, 0); +} + +/* We have completed an authentication, using the D-H keys we + * already knew. is_reply indicates whether we initiated the AKE. */ +static void cb_still_secure(void *opdata, ConnContext *context, int is_reply) +{ + scr_WriteIncomingMessage(context->username, "OTR: channel reestablished", 0, + HBB_PREFIX_INFO, 0); +} + +#ifdef HAVE_LIBOTR3 + /* Display a notification message for a particular * accountname / protocol / username conversation. */ static void cb_notify(void *opdata, OtrlNotifyLevel level, @@ -684,14 +948,6 @@ return 0; } -/* When the list of ConnContexts changes (including a change in - * state), this is called so the UI can be updated. */ -static void cb_update_context_list(void *opdata) -{ - /*maybe introduce new status characters for mcabber, - * then use this function (?!)*/ -} - /* Return a newly allocated string containing a human-friendly name * for the given protocol id */ static const char *cb_protocol_name(void *opdata, const char *protocol) @@ -705,54 +961,40 @@ /* We didn't allocated memory, so we don't have to free anything :p */ } -/* A new fingerprint for the given user has been received. */ -static void cb_new_fingerprint(void *opdata, OtrlUserState us, - const char *accountname, const char *protocol, - const char *username, - unsigned char fingerprint[20]) +/* Log a message. The passed message will end in "\n". */ +static void cb_log_message(void *opdata, const char *message) { - char *sbuf = NULL; - char readable[45]; - - otrl_privkey_hash_to_human(readable, fingerprint); - sbuf = g_strdup_printf("OTR: new fingerprint: %s", readable); - scr_WriteIncomingMessage(username, sbuf, 0, HBB_PREFIX_INFO, 0); - g_free(sbuf); + scr_LogPrint(LPRINT_DEBUG, "OTR: %s", message); } -/* The list of known fingerprints has changed. Write them to disk. */ -static void cb_write_fingerprints(void *opdata) -{ - otrl_privkey_write_fingerprints(userstate, fprfile); -} +#else /* HAVE_LIBOTR3 */ -/* A ConnContext has entered a secure state. */ -static void cb_gone_secure(void *opdata, ConnContext *context) +/* Generate unique instance tag for account. */ +static void cb_create_instag(void *opdata, const char *accountname, + const char *protocol) { - scr_WriteIncomingMessage(context->username, "OTR: channel established", 0, - HBB_PREFIX_INFO, 0); + if (otrl_instag_generate(userstate, tagfile, accountname, protocol)) { + scr_LogPrint(LPRINT_LOGNORM, "OTR instance tag generation failed!"); + } } -/* A ConnContext has left a secure state. */ -static void cb_gone_insecure(void *opdata, ConnContext *context) +static gboolean otr_timer_cb(gpointer userdata) { - scr_WriteIncomingMessage(context->username, "OTR: channel closed", 0, - HBB_PREFIX_INFO, 0); + otrl_message_poll(userstate, &ops, userdata); + return TRUE; } -/* We have completed an authentication, using the D-H keys we - * already knew. is_reply indicates whether we initiated the AKE. */ -static void cb_still_secure(void *opdata, ConnContext *context, int is_reply) +static void cb_timer_control(void *opdata, unsigned int interval) { - scr_WriteIncomingMessage(context->username, "OTR: channel reestablished", 0, - HBB_PREFIX_INFO, 0); + if (otr_timer_source > 0) { + g_source_remove(otr_timer_source); + otr_timer_source = 0; + } + if (interval > 0) + otr_timer_source = g_timeout_add_seconds(interval, otr_timer_cb, opdata); } -/* Log a message. The passed message will end in "\n". */ -static void cb_log_message(void *opdata, const char *message) -{ - scr_LogPrint(LPRINT_DEBUG, "OTR: %s", message); -} +#endif /* HAVE_LIBOTR3 */ /* Find the maximum message size supported by this protocol. */ static int cb_max_message_size(void *opdata, ConnContext *context) --- a/mcabber/otr.h +++ b/mcabber/otr.h @@ -5,6 +5,9 @@ #ifdef HAVE_LIBOTR +#ifndef HAVE_LIBOTR3 +# include +#endif #include #include #include debian/patches/mcabber_bookmark_password_doc.patch0000644000000000000000000000503712171261575017701 0ustar This patch documents the new feature to store a password with a MUC in the /help command for the /room command. Patch by Franziska 'Rhalina' Lichtblau () --- a/doc/help/de/hlp_room.txt +++ b/doc/help/de/hlp_room.txt @@ -2,7 +2,7 @@ /ROOM join|leave|names|nick|remove|topic|unlock|destroy /ROOM privmsg|invite|whois|kick|ban|unban|role|affil /ROOM setopt print_status|auto_whois|flag_joins [wert] - /ROOM bookmark [add|del] [-autojoin|+autojoin] [-|nick] + /ROOM bookmark [add|del] [-autojoin|+autojoin] [-|nick] [password] Der "room" Befehl umfasst die Multi-User Chat (kurz MUC) Befehle. @@ -45,7 +45,8 @@ Bei "auto_whois" sind die Werte "default", "off" und "on" gültig. Für "flag_joins" sind folgende Werte möglich: "default", "none", "joins", "all". Wenn man die Einstellungen auf "default" setzt, so werden die Optionen muc_print_status / muc_auto_whois / muc_flag_joins benutzt. -/room bookmark [add|del] [-autojoin|+autojoin] [-|nick] - Zum Hinzufügen, Löschen und Ändern von Raum-Bookmarks. +/room bookmark [add|del] [-autojoin|+autojoin] [-|nick] [password] + Zum Hinzufügen, Löschen und Ändern von Raum-Bookmarks und optionalen + Speichern eines Passworts eines MUCs. Wenn autojoin gesetzt ist, wird mcabber nach dem verbinden zum Server diesen MUC automatisch betreten. Um die Liste der Bookmarks zu sehen, benutze "/room bookmark", bei ausgewähltem Status Buffer. --- a/doc/help/en/hlp_room.txt +++ b/doc/help/en/hlp_room.txt @@ -2,7 +2,7 @@ /ROOM join|leave|names|nick|remove|topic|unlock|destroy /ROOM privmsg|invite|whois|kick|ban|unban|role|affil /ROOM setopt print_status|auto_whois|flag_joins [value] - /ROOM bookmark [add|del] [-autojoin|+autojoin] [-|nick] + /ROOM bookmark [add|del] [-autojoin|+autojoin] [-|nick] [password] The 'room' command handles Multi-User Chat room actions. @@ -45,7 +45,8 @@ For auto_whois, the possible values are "default", "off", "on". For flag_joins, the possible values are "default", "none", "joins", "all". When the value is "default", the options muc_print_status / muc_auto_whois / muc_flag_joins is used. -/room bookmark [add|del] [-autojoin|+autojoin] [-|nick] - Add, remove or update a bookmark (default is add). +/room bookmark [add|del] [-autojoin|+autojoin] [-|nick] [password] + Add, remove or update a bookmark (default is add) and optionally store a + password for entering the MUC. If autojoin is set, mcabber will automatically join the MUC room when it connects to the server. To see the list of bookmarks, use /room bookmark in the status buffer. debian/patches/series0000644000000000000000000000013612170743430012033 0ustar mcabber_bookmark_password.patch mcabber_bookmark_password_doc.patch mcabber_use_libotr4.patch debian/source/0000755000000000000000000000000012053767446010504 5ustar debian/source/format0000644000000000000000000000001412053767446011712 0ustar 3.0 (quilt) debian/compat0000644000000000000000000000000212053767446010402 0ustar 7 debian/watch0000644000000000000000000000010312053767446010227 0ustar version=3 http://www.mcabber.com/files/mcabber-([0-9.]+)\.tar\.bz2 debian/README.source0000644000000000000000000000033712053767446011366 0ustar This package uses dpatch to manage all modifications to the upstream source. If you are unfamilar with how dpatch works you can find a quick reference included with dpatch in the file /usr/share/doc/dpatch/README.source.gz debian/changelog0000644000000000000000000001521512170761657011060 0ustar mcabber (0.10.2-1) unstable; urgency=low * New upstream version (now 0.10.2) (Closes: #706597) * Removing now uneeded patch mcabber_fix_aspell * Updated patch for bookmarking MUCs with passwords for new upstream version * Migration from libotr2 to libotr5 (Closes: #711072) * Added upstream patch to work with libotr5-dev * Added build dependency to libotr5-dev * Convert debian/rules to dh_autoreconf (build dependency to dh-autoreconf) -- Franziska Lichtblau Mon, 15 Jul 2013 12:19:34 +0200 mcabber (0.10.1-4) unstable; urgency=low * Integrated patch from upstream VCS fixing segmentation fault when using aspell (Closes: #572623) * Upgrade to Standards-Version 3.9.4 no changes needed -- Franziska Lichtblau Sat, 24 Nov 2012 11:04:41 +0100 mcabber (0.10.1-3) unstable; urgency=low * Added patch for storing passwords to MUCs in bookmarks. Thanks to Nico Golde for the patch. (Closes: #650632) * Updated german and english help output for the new /room command * Overtook maintainership (Franziska Lichtblau) thanks to Mario Iseli for the work done so far * Removed Gerfried Fuchs from Uploaders - thanks for your work * Upgrade to Standards-Version 3.9.3 no changes needed * Added hardening flags to debian/rules * Added build-dependency to dpkg-dev (>= 1.16.1~) due to importing debian buildflags * Added source format 3.0 (quilt) - removed build-dependency to quilt and dh_quilt_pach, dh_quilt_unpatch from debian/rules -- Franziska Lichtblau Sat, 16 Jun 2012 15:34:56 +0200 mcabber (0.10.1-2) unstable; urgency=low [ Franziska Lichtblau ] * Added Franziska Lichtblau to Uploaders * Added contrib-folder with useful scripts to /usr/share/doc/mcabber/examples/ (Closes: #596060) * Fixed lintian warnings (debian-rules-missing-recommended-target build-arch) + (debian-rules-missing-recommended-target build-indep): added build-arch + build-indep target * Upgrade to Standards-Verions 3.9.2, no changes needed [ Gerfried Fuchs ] * Added Vcs-* fields to debian/control. -- Gerfried Fuchs Thu, 18 Aug 2011 16:45:27 +0200 mcabber (0.10.1-1.1) unstable; urgency=low * Non-maintainer upload. * Don't ship .la files (Closes: #622447). -- Luk Claes Sat, 25 Jun 2011 16:19:57 +0200 mcabber (0.10.1-1) unstable; urgency=low * New upstream bugfix release. * Bump to Standards-Version 3.9.1. * Add libasyncns-dev to Build-Depends so it doesn't FTBFS, loudmouth doesn't use embedded version anymore. -- Gerfried Fuchs Sun, 05 Dec 2010 11:57:25 +0100 mcabber (0.10.0-1) unstable; urgency=low * New upstream release, requiring now libloudmouth1-dev. * Fix typo in changelog. * Add ${misc:Depends} to Depends of the package. * Bump to Standards-Version 3.8.4. * Updated Homepage URL in control, watch and copyright files. * Enhanced package description with Upstream input. * Updated copyright information with Upstream input. * Remove dpatch handling, patch not needed anymore. -- Gerfried Fuchs Tue, 13 Apr 2010 07:55:17 +0200 mcabber (0.9.10-1) unstable; urgency=low * New upstream release: - fixes FTBFS problem (closes: #546681) - reduces CPU usage on reconnect troubles (closes: #510545) * Adding myself to Uploaders. * Bump Standards-Version to 3.8.3. * Raise debhelper and compat to 7, use dh_prep instead of dh_clean -k. * Switched README.source from the full text to a reference to the file included with the dpatch package. * Updated copyright information slightly in debian/copyright. * Remove duplication of Section and Priority in binary package control file stanca. * Fix config.{sub,guess} handling. -- Gerfried Fuchs Thu, 08 Oct 2009 19:37:25 +0200 mcabber (0.9.9-0.1) unstable; urgency=low * Non-maintainer upload. * New upstream release. * Build-Depends changes: added libgcrypt11-dev (closes: #497384), versioned dependency on libotr2-dev (closes: #510200) -- Gerfried Fuchs Wed, 18 Feb 2009 21:44:27 +0100 mcabber (0.9.7-0.1) unstable; urgency=low * Non-maintainer upload. * New upstream release, which includes: - using stat instead of lstat for permission check (closes: #475182) * Fix watchfile to watch only for numbered versions (closes: #479601) * Updated Standards-Version to 3.8.0: - Added README.source quick introduction on dpatch usage. -- Gerfried Fuchs Wed, 16 Jul 2008 17:51:43 +0200 mcabber (0.9.5-1.1) unstable; urgency=low * Non-maintainer upload. * --enable-otr and add Build-Depends libotr2-dev (Closes: #453729). * Add Build-Depends on libaspell-dev to make --enable-aspell actually work (Closes: #461977). -- Gerfried Fuchs Tue, 22 Jan 2008 15:59:24 +0100 mcabber (0.9.5-1) unstable; urgency=low * New upstream release. * New maintainer E-Mail address. * Added Homepage field to debian/control. * Fix debian-rules-ignores-make-clean-error by checking if the file exists if the file exists.. -- Mario Iseli Tue, 20 Nov 2007 13:47:26 +0100 mcabber (0.9.3-1) unstable; urgency=low * New upstream release. * Updated the manpage patch. * Added --enable-aspell and --enable-gpgme to the call of configure. -- Mario Iseli Wed, 20 Jun 2007 17:27:50 +0100 mcabber (0.9.1-1) unstable; urgency=low * New upstream release (Closes: #420065). * Added build-dependency on libgpgme-dev to enable GPG support. * Added build-dependency on dpatch and added a first patch in debian/patches to fix the manpage. -- Mario Iseli Thu, 19 Apr 2007 21:02:12 +0200 mcabber (0.8.3-1) unstable; urgency=low * New upstream release -- Mario Iseli Sun, 19 Nov 2006 14:13:06 +0100 mcabber (0.8.2-2) unstable; urgency=low * Added support for Unicode (linked against linbcursesw5) * Depend now on libncursesw5 * Build-Depend now on linbcursesw5-dev -- Mario Iseli Wed, 11 Oct 2006 23:02:51 +0200 mcabber (0.8.2-1) unstable; urgency=low * New upstream release -- Mario Iseli Sat, 23 Sep 2006 11:36:18 +0200 mcabber (0.8.1-1) unstable; urgency=medium * New upstream release -- Mario Iseli Mon, 21 Aug 2006 23:25:51 +0200 mcabber (0.8.0-1) unstable; urgency=low * New upstream release -- Mario Iseli Mon, 14 Aug 2006 19:39:56 +0200 mcabber (0.7.8-1) unstab le; urgency=low * Initial release Closes: #362617 -- Mario Iseli Sat, 08 Jul 2006 00:43:32 +0200 debian/control0000644000000000000000000000144012170763717010603 0ustar Source: mcabber Section: net Priority: optional Maintainer: Franziska Lichtblau Build-Depends: debhelper (>= 7), autotools-dev, dh-autoreconf, dpkg-dev (>= 1.16.1~), libglib2.0-dev, libncursesw5-dev, libssl-dev, libgpgme11-dev, libotr5-dev (>= 3.1.0), libgcrypt11-dev, libaspell-dev, libloudmouth1-dev, libasyncns-dev Homepage: http://www.mcabber.com/ Standards-Version: 3.9.4 Vcs-Browser: http://git.deb.at/w/pkg/mcabber.git Vcs-Git: git://git.deb.at/pkg/mcabber.git Package: mcabber Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: small Jabber (XMPP) console client MCabber is a Jabber (XMPP) text-mode client, which includes features such as SASL support, history logging, commands completion, dynamic modules and external actions triggers. debian/rules0000755000000000000000000000267412170757431010266 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 export DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS += -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: dh_testdir dh_autoreconf CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --enable-gpgme --enable-aspell --enable-otr --enable-modules build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_autoreconf_clean dh_clean install: build dh_testdir dh_testroot dh_prep dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/mcabber rm `find $(CURDIR)/debian/mcabber -name '*.la'` binary-indep: build install binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs dh_installexamples dh_installmenu dh_installman dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install debian/docs0000644000000000000000000000002412053767446010053 0ustar AUTHORS README TODO debian/dirs0000644000000000000000000000001012053767446010057 0ustar usr/bin