Moved chat logging to profanity module

Removed jabber modules dependency on chat log
This commit is contained in:
James Booth
2012-10-02 22:00:05 +01:00
parent ee8407f4a4
commit a970b9ea86
3 changed files with 29 additions and 15 deletions

View File

@@ -25,7 +25,6 @@
#include <strophe.h>
#include "chat_log.h"
#include "common.h"
#include "jabber.h"
#include "log.h"
@@ -161,11 +160,6 @@ jabber_send(const char * const msg, const char * const recipient)
free(coded_msg);
free(coded_msg2);
free(coded_msg3);
if (prefs_get_chlog()) {
const char *jid = xmpp_conn_get_jid(jabber_conn.conn);
chat_log_chat(jid, (char *)recipient, msg, OUT);
}
}
void
@@ -280,15 +274,6 @@ _message_handler(xmpp_conn_t * const conn,
char *from = xmpp_stanza_get_attribute(stanza, "from");
prof_handle_incoming_message(from, message);
if (prefs_get_chlog()) {
char from_cpy[strlen(from) + 1];
strcpy(from_cpy, from);
char *short_from = strtok(from_cpy, "/");
const char *jid = xmpp_conn_get_jid(jabber_conn.conn);
chat_log_chat(jid, short_from, message, IN);
}
return 1;
}