Index: bitlbee.c
===================================================================
--- bitlbee.c	(revision 2ecfe3987effa418806ab23bc24c82e3f14ca30f)
+++ bitlbee.c	(revision d858d2196a11910382d879527d117c8a181177fc)
@@ -143,7 +143,4 @@
 	log_link( LOGLVL_ERROR, LOGOUTPUT_IRC );
 	log_link( LOGLVL_WARNING, LOGOUTPUT_IRC );
-    /* TODO: Remove debugging log_link's */
-	log_link( LOGLVL_INFO, LOGOUTPUT_IRC );
-	log_link( LOGLVL_DEBUG, LOGOUTPUT_IRC );
 	
 	return( 0 );
Index: otr.c
===================================================================
--- otr.c	(revision 2ecfe3987effa418806ab23bc24c82e3f14ca30f)
+++ otr.c	(revision d858d2196a11910382d879527d117c8a181177fc)
@@ -232,6 +232,4 @@
 	int kg=0;
 
-	log_message(LOGLVL_DEBUG, "otr_load '%s'", irc->nick);
-
 	g_snprintf(s, 511, "%s%s.otr_keys", global.conf->configdir, irc->nick);
 	e = otrl_privkey_read(irc->otr->us, s);
@@ -265,6 +263,4 @@
 	gcry_error_t e;
 
-	log_message(LOGLVL_DEBUG, "otr_save '%s'", irc->nick);
-
 	g_snprintf(s, 511, "%s%s.otr_fprints", global.conf->configdir, irc->nick);
 	e = otrl_privkey_write_fingerprints(irc->otr->us, s);
@@ -279,6 +275,4 @@
 	char s[512];
 	
-	log_message(LOGLVL_DEBUG, "otr_remove '%s'", nick);
-
 	g_snprintf(s, 511, "%s%s.otr_keys", global.conf->configdir, nick);
 	unlink(s);
@@ -291,6 +285,4 @@
 	char s[512], t[512];
 	
-	log_message(LOGLVL_DEBUG, "otr_rename '%s' -> '%s'", onick, nnick);
-
 	g_snprintf(s, 511, "%s%s.otr_keys", global.conf->configdir, onick);
 	g_snprintf(t, 511, "%s%s.otr_keys", global.conf->configdir, nnick);
@@ -433,6 +425,4 @@
 	const char *p;
 	
-	log_message(LOGLVL_DEBUG, "op_policy '%s' '%s'", context->accountname, context->protocol);
-	
 	/* policy override during keygen: if we're missing the key for context but are currently
 	   generating it, then that's as much as we can do. => temporarily return NEVER. */
@@ -459,6 +449,4 @@
 	struct im_connection *ic = check_imc(opdata, accountname, protocol);
 	
-	log_message(LOGLVL_DEBUG, "op_create_privkey '%s' '%s'", accountname, protocol);
-
 	/* will fail silently if keygen already in progress */
 	otr_keygen(ic->irc, accountname, protocol);
@@ -471,6 +459,4 @@
 	user_t *u;
 
-	log_message(LOGLVL_DEBUG, "op_is_logged_in '%s' '%s' '%s'", accountname, protocol, recipient);
-	
 	/* lookup the user_t for the given recipient */
 	u = user_findhandle(ic, recipient);
@@ -490,6 +476,4 @@
 	struct im_connection *ic = check_imc(opdata, accountname, protocol);
 
-	log_message(LOGLVL_DEBUG, "op_inject_message '%s' '%s' '%s' '%s'", accountname, protocol, recipient, message);
-
 	if (strcmp(accountname, recipient) == 0) {
 		/* huh? injecting messages to myself? */
@@ -509,6 +493,4 @@
 	char *msg = g_strdup(message);
 
-	log_message(LOGLVL_DEBUG, "op_display_otr_message '%s' '%s' '%s' '%s'", accountname, protocol, username, message);
-
 	strip_html(msg);
 	irc_usermsg(ic->irc, "otr: %s", msg);
@@ -526,6 +508,4 @@
 	
 	otrl_privkey_hash_to_human(hunam, fingerprint);
-	log_message(LOGLVL_DEBUG, "op_new_fingerprint '%s' '%s' '%s' '%s'", accountname, protocol, username, hunam);
-
 	irc_usermsg(ic->irc, "new fingerprint for %s: %s",
 		peernick(ic->irc, username, protocol), hunam);
@@ -535,6 +515,4 @@
 {
 	struct im_connection *ic = (struct im_connection *)opdata;
-
-	log_message(LOGLVL_DEBUG, "op_write_fingerprints");
 
 	otr_save(ic->irc);
@@ -547,6 +525,4 @@
 	user_t *u;
 	const char *trust;
-
-	log_message(LOGLVL_DEBUG, "op_gone_secure '%s' '%s' '%s'", context->accountname, context->protocol, context->username);
 
 	u = peeruser(ic->irc, context->username, context->protocol);
@@ -573,6 +549,4 @@
 	user_t *u;
 
-	log_message(LOGLVL_DEBUG, "op_gone_insecure '%s' '%s' '%s'", context->accountname, context->protocol, context->username);
-
 	u = peeruser(ic->irc, context->username, context->protocol);
 	if(!u) {
@@ -592,7 +566,4 @@
 		check_imc(opdata, context->accountname, context->protocol);
 	user_t *u;
-
-	log_message(LOGLVL_DEBUG, "op_still_secure '%s' '%s' '%s' is_reply=%d",
-		context->accountname, context->protocol, context->username, is_reply);
 
 	u = peeruser(ic->irc, context->username, context->protocol);
@@ -632,6 +603,4 @@
 	struct im_connection *ic = (struct im_connection *)opdata;
 
-	log_message(LOGLVL_DEBUG, "op_account_name '%s' '%s'", account, protocol);
-	
 	return peernick(ic->irc, account, protocol);
 }
@@ -1131,6 +1100,4 @@
 	user_t *u;
 	
-	log_message(LOGLVL_DEBUG, "peeruser '%s' '%s'", handle, protocol);
-	
 	for(u=irc->users; u; u=u->next) {
 		struct prpl *prpl;
@@ -1295,6 +1262,4 @@
 	}
 	*p = '\0';
-	log_message(LOGLVL_DEBUG, "match_fingerprint '%s'", prefix);
-	log_message(LOGLVL_DEBUG, "n=%d strlen(prefix)=%d", n, strlen(prefix));
 	
 	/* find first fingerprint with the given prefix */
@@ -1361,6 +1326,4 @@
 	}
 	*p = '\0';
-	log_message(LOGLVL_DEBUG, "match_privkey '%s'", prefix);
-	log_message(LOGLVL_DEBUG, "n=%d strlen(prefix)=%d", n, strlen(prefix));
 	
 	/* find first key which matches the given prefix */
@@ -1504,6 +1467,4 @@
 	kg_t *kg;
 	
-	log_message(LOGLVL_DEBUG, "keygen_in_progress '%s' '%s'", handle, protocol);
-	
 	if(!irc->otr->sent_accountname || !irc->otr->sent_protocol)
 		return 0;
@@ -1574,5 +1535,4 @@
 	if(irc->otr->sent_accountname) {
 		/* enqueue our job for later transmission */
-		log_message(LOGLVL_DEBUG, "enqueueing keygen for %s/%s", handle, protocol);
 		kg_t **kg = &irc->otr->todo;
 		while(*kg)
@@ -1583,5 +1543,4 @@
 	} else {
 		/* send our job over and remember it */
-		log_message(LOGLVL_DEBUG, "slave: generate for %s/%s!", handle, protocol);
 		fprintf(irc->otr->to, "%s\n%s\n", handle, protocol);
 		fflush(irc->otr->to);
@@ -1637,11 +1596,6 @@
 	char filename[512], msg[512];
 
-	log_message(LOGLVL_DEBUG, "keygen_finish_handler cond=%d", cond);
-
 	myfgets(filename, 512, irc->otr->from);
 	myfgets(msg, 512, irc->otr->from);
-	
-	log_message(LOGLVL_DEBUG, "filename='%s'", filename);
-	log_message(LOGLVL_DEBUG, "msg='%s'", msg);
 	
 	irc_usermsg(irc, "%s", msg);
@@ -1667,5 +1621,4 @@
 		kg_t *p = irc->otr->todo;
 		/* send the next one over */
-		log_message(LOGLVL_DEBUG, "slave: keygen for %s/%s!", p->accountname, p->protocol);
 		fprintf(irc->otr->to, "%s\n%s\n", p->accountname, p->protocol);
 		fflush(irc->otr->to);
@@ -1677,5 +1630,4 @@
 	} else {
 		/* okay, the slave is idle now, so kill him */
-		log_message(LOGLVL_DEBUG, "all keys done. die, slave!");
 		fclose(irc->otr->from);
 		fclose(irc->otr->to);
@@ -1692,6 +1644,4 @@
 	int n;
 	char buf[1024];
-	
-	log_message(LOGLVL_DEBUG, "copyfile '%s' '%s'", a, b);
 	
 	fda = open(a, O_RDONLY);
