mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-24 11:56:21 +00:00
Removed #AX_PREFIX_CONFIG_H
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prof_config.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <glib.h>
|
||||
@@ -44,10 +44,10 @@
|
||||
#include "roster_list.h"
|
||||
#include "chat_session.h"
|
||||
#include "plugins/plugins.h"
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBOTR
|
||||
#include "otr/otr.h"
|
||||
#endif
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
#include "pgp/gpg.h"
|
||||
#endif
|
||||
|
||||
@@ -81,7 +81,7 @@ cl_ev_disconnect(void)
|
||||
muc_invites_clear();
|
||||
chat_sessions_clear();
|
||||
tlscerts_clear_current();
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
p_gpg_on_disconnect();
|
||||
#endif
|
||||
}
|
||||
@@ -91,7 +91,7 @@ cl_ev_presence_send(const resource_presence_t presence_type, const char *const m
|
||||
{
|
||||
char *signed_status = NULL;
|
||||
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
char *account_name = jabber_get_account_name();
|
||||
ProfAccount *account = accounts_get_account(account_name);
|
||||
if (account->pgp_keyid) {
|
||||
@@ -112,8 +112,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
|
||||
char *plugin_msg = plugins_pre_chat_message_send(chatwin->barejid, msg);
|
||||
|
||||
// OTR suported, PGP supported
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBGPGME
|
||||
if (chatwin->pgp_send) {
|
||||
char *id = message_send_chat_pgp(chatwin->barejid, plugin_msg);
|
||||
chat_log_pgp_msg_out(chatwin->barejid, plugin_msg);
|
||||
@@ -136,8 +136,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
|
||||
#endif
|
||||
|
||||
// OTR supported, PGP unsupported
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifndef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBOTR
|
||||
#ifndef HAVE_LIBGPGME
|
||||
gboolean handled = otr_on_message_send(chatwin, plugin_msg);
|
||||
if (!handled) {
|
||||
char *id = message_send_chat(chatwin->barejid, plugin_msg);
|
||||
@@ -153,8 +153,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
|
||||
#endif
|
||||
|
||||
// OTR unsupported, PGP supported
|
||||
#ifndef PROF_HAVE_LIBOTR
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifndef HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBGPGME
|
||||
if (chatwin->pgp_send) {
|
||||
char *id = message_send_chat_pgp(chatwin->barejid, plugin_msg);
|
||||
chat_log_pgp_msg_out(chatwin->barejid, plugin_msg);
|
||||
@@ -174,8 +174,8 @@ cl_ev_send_msg(ProfChatWin *chatwin, const char *const msg)
|
||||
#endif
|
||||
|
||||
// OTR unsupported, PGP unsupported
|
||||
#ifndef PROF_HAVE_LIBOTR
|
||||
#ifndef PROF_HAVE_LIBGPGME
|
||||
#ifndef HAVE_LIBOTR
|
||||
#ifndef HAVE_LIBGPGME
|
||||
char *id = message_send_chat(chatwin->barejid, plugin_msg);
|
||||
chat_log_msg_out(chatwin->barejid, plugin_msg);
|
||||
chatwin_outgoing_msg(chatwin, plugin_msg, id, PROF_MSG_PLAIN);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "prof_config.h"
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -51,10 +51,10 @@
|
||||
#include "profanity.h"
|
||||
#include "event/client_events.h"
|
||||
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBOTR
|
||||
#include "otr/otr.h"
|
||||
#endif
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
#include "pgp/gpg.h"
|
||||
#endif
|
||||
|
||||
@@ -67,11 +67,11 @@ sv_ev_login_account_success(char *account_name, int secured)
|
||||
|
||||
roster_create();
|
||||
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBOTR
|
||||
otr_on_connect(account);
|
||||
#endif
|
||||
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
p_gpg_on_connect(account->jid);
|
||||
#endif
|
||||
|
||||
@@ -107,7 +107,7 @@ sv_ev_roster_received(void)
|
||||
|
||||
char *account_name = jabber_get_account_name();
|
||||
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
// check pgp key valid if specified
|
||||
ProfAccount *account = accounts_get_account(account_name);
|
||||
if (account && account->pgp_keyid) {
|
||||
@@ -157,7 +157,7 @@ sv_ev_lost_connection(void)
|
||||
{
|
||||
cons_show_error("Lost connection.");
|
||||
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBOTR
|
||||
GSList *recipients = wins_get_chat_recipients();
|
||||
GSList *curr = recipients;
|
||||
while (curr) {
|
||||
@@ -178,7 +178,7 @@ sv_ev_lost_connection(void)
|
||||
chat_sessions_clear();
|
||||
ui_disconnected();
|
||||
roster_destroy();
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
p_gpg_on_disconnect();
|
||||
#endif
|
||||
}
|
||||
@@ -358,7 +358,7 @@ sv_ev_outgoing_carbon(char *barejid, char *message, char *pgp_message)
|
||||
|
||||
chat_state_active(chatwin->state);
|
||||
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
if (pgp_message) {
|
||||
char *decrypted = p_gpg_decrypt(pgp_message);
|
||||
if (decrypted) {
|
||||
@@ -374,7 +374,7 @@ sv_ev_outgoing_carbon(char *barejid, char *message, char *pgp_message)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
static void
|
||||
_sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, char *pgp_message, GDateTime *timestamp)
|
||||
{
|
||||
@@ -392,7 +392,7 @@ _sv_ev_incoming_pgp(ProfChatWin *chatwin, gboolean new_win, char *barejid, char
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBOTR
|
||||
static void
|
||||
_sv_ev_incoming_otr(ProfChatWin *chatwin, gboolean new_win, char *barejid, char *resource, char *message, GDateTime *timestamp)
|
||||
{
|
||||
@@ -432,8 +432,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
|
||||
}
|
||||
|
||||
// OTR suported, PGP supported
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBGPGME
|
||||
if (pgp_message) {
|
||||
if (chatwin->is_otr) {
|
||||
win_println((ProfWin*)chatwin, 0, "PGP encrypted message received whilst in OTR session.");
|
||||
@@ -449,8 +449,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
|
||||
#endif
|
||||
|
||||
// OTR supported, PGP unsupported
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifndef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBOTR
|
||||
#ifndef HAVE_LIBGPGME
|
||||
_sv_ev_incoming_otr(chatwin, new_win, barejid, resource, message, timestamp);
|
||||
rosterwin_roster();
|
||||
return;
|
||||
@@ -458,8 +458,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
|
||||
#endif
|
||||
|
||||
// OTR unsupported, PGP supported
|
||||
#ifndef PROF_HAVE_LIBOTR
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifndef HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBGPGME
|
||||
if (pgp_message) {
|
||||
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message, timestamp);
|
||||
} else {
|
||||
@@ -471,8 +471,8 @@ sv_ev_incoming_message(char *barejid, char *resource, char *message, char *pgp_m
|
||||
#endif
|
||||
|
||||
// OTR unsupported, PGP unsupported
|
||||
#ifndef PROF_HAVE_LIBOTR
|
||||
#ifndef PROF_HAVE_LIBGPGME
|
||||
#ifndef HAVE_LIBOTR
|
||||
#ifndef HAVE_LIBGPGME
|
||||
_sv_ev_incoming_plain(chatwin, new_win, barejid, resource, message, timestamp);
|
||||
rosterwin_roster();
|
||||
return;
|
||||
@@ -491,7 +491,7 @@ sv_ev_incoming_carbon(char *barejid, char *resource, char *message, char *pgp_me
|
||||
new_win = TRUE;
|
||||
}
|
||||
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
if (pgp_message) {
|
||||
_sv_ev_incoming_pgp(chatwin, new_win, barejid, resource, message, pgp_message, NULL);
|
||||
} else {
|
||||
@@ -608,7 +608,7 @@ sv_ev_contact_offline(char *barejid, char *resource, char *status)
|
||||
ui_contact_offline(barejid, resource, status);
|
||||
}
|
||||
|
||||
#ifdef PROF_HAVE_LIBOTR
|
||||
#ifdef HAVE_LIBOTR
|
||||
ProfChatWin *chatwin = wins_get_chat(barejid);
|
||||
if (chatwin && otr_is_secure(barejid)) {
|
||||
chatwin_otr_unsecured(chatwin);
|
||||
@@ -631,7 +631,7 @@ sv_ev_contact_online(char *barejid, Resource *resource, GDateTime *last_activity
|
||||
ui_contact_online(barejid, resource, last_activity);
|
||||
}
|
||||
|
||||
#ifdef PROF_HAVE_LIBGPGME
|
||||
#ifdef HAVE_LIBGPGME
|
||||
if (pgpsig) {
|
||||
p_gpg_verify(barejid, pgpsig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user