comparison 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
comparison
equal deleted inserted replaced
1298:af035a304bec 1299:3b338a5c01fc
39 #include "commands.h" 39 #include "commands.h"
40 #include "histolog.h" 40 #include "histolog.h"
41 #include "hooks.h" 41 #include "hooks.h"
42 #include "utils.h" 42 #include "utils.h"
43 #include "pgp.h" 43 #include "pgp.h"
44 #include "otr.h"
44 45
45 #ifdef ENABLE_HGCSET 46 #ifdef ENABLE_HGCSET
46 # include "hgcset.h" 47 # include "hgcset.h"
47 #endif 48 #endif
48 49
149 proxy_host, proxy_port); 150 proxy_host, proxy_port);
150 } 151 }
151 } 152 }
152 153
153 bjid = compose_jid(username, servername, resource); 154 bjid = compose_jid(username, servername, resource);
155 #if defined(HAVE_LIBOTR)
156 otr_init(bjid);
157 #endif
154 jc = jb_connect(bjid, servername, port, ssl, password); 158 jc = jb_connect(bjid, servername, port, ssl, password);
155 g_free(bjid); 159 g_free(bjid);
156 160
157 if (!jc) 161 if (!jc)
158 scr_LogPrint(LPRINT_LOGNORM, "Error connecting to (%s)", servername); 162 scr_LogPrint(LPRINT_LOGNORM, "Error connecting to (%s)", servername);
259 puts("Compiled with GnuTLS support."); 263 puts("Compiled with GnuTLS support.");
260 #endif 264 #endif
261 #ifdef HAVE_GPGME 265 #ifdef HAVE_GPGME
262 puts("Compiled with GPG support."); 266 puts("Compiled with GPG support.");
263 #endif 267 #endif
268 #ifdef HAVE_LIBOTR
269 puts("Compiled with OTR support.");
270 #endif
264 #ifdef WITH_ASPELL 271 #ifdef WITH_ASPELL
265 puts("Compiled with Aspell support."); 272 puts("Compiled with Aspell support.");
266 #endif 273 #endif
267 #ifdef DEBUG_ENABLE 274 #ifdef DEBUG_ENABLE
268 puts("Compiled with debugging support."); 275 puts("Compiled with debugging support.");
462 469
463 jb_main(); 470 jb_main();
464 } 471 }
465 } 472 }
466 473
474 #ifdef HAVE_LIBOTR
475 otr_terminate();
476 #endif
467 jb_disconnect(); 477 jb_disconnect();
468 #ifdef HAVE_GPGME 478 #ifdef HAVE_GPGME
469 gpg_terminate(); 479 gpg_terminate();
470 #endif 480 #endif
471 scr_TerminateCurses(); 481 scr_TerminateCurses();