diff mcabber/src/main.c @ 1299:3b338a5c01fc

OTR support
author Frank Zschockelt <mcabber_otr[at]freakysoft.de>
date Thu, 30 Aug 2007 00:52:51 +0200
parents c5c09f8f60b0
children 6c116207ab2e
line wrap: on
line diff
--- a/mcabber/src/main.c	Tue Aug 28 18:56:50 2007 +0200
+++ b/mcabber/src/main.c	Thu Aug 30 00:52:51 2007 +0200
@@ -41,6 +41,7 @@
 #include "hooks.h"
 #include "utils.h"
 #include "pgp.h"
+#include "otr.h"
 
 #ifdef ENABLE_HGCSET
 # include "hgcset.h"
@@ -151,6 +152,9 @@
   }
 
   bjid = compose_jid(username, servername, resource);
+#if defined(HAVE_LIBOTR)
+  otr_init(bjid);
+#endif
   jc = jb_connect(bjid, servername, port, ssl, password);
   g_free(bjid);
 
@@ -261,6 +265,9 @@
 #ifdef HAVE_GPGME
   puts("Compiled with GPG support.");
 #endif
+#ifdef HAVE_LIBOTR
+  puts("Compiled with OTR support.");
+#endif
 #ifdef WITH_ASPELL
   puts("Compiled with Aspell support.");
 #endif
@@ -464,6 +471,9 @@
     }
   }
 
+#ifdef HAVE_LIBOTR
+  otr_terminate();
+#endif
   jb_disconnect();
 #ifdef HAVE_GPGME
   gpg_terminate();