aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-10-14 22:36:09 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2009-10-14 22:36:09 +0100
commit6967d012be48db989ce2723a6ecc2b10b537c8f7 (patch)
tree221603f0bd34039ee1b069564ba15c6a6853dd14
parent4524f664357f9f15e7535fc6f251c5be98d162da (diff)
I think daemon mode and libpurple won't go together very well for now since
libpurple seems to keep track of a merged contact list. For now people shouldn't be trying this combination.
-rw-r--r--protocols/purple/purple.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c
index aff4f3fa..ca2a49f1 100644
--- a/protocols/purple/purple.c
+++ b/protocols/purple/purple.c
@@ -132,8 +132,16 @@ static void purple_sync_settings( account_t *acc, PurpleAccount *pa )
static void purple_login( account_t *acc )
{
struct im_connection *ic = imcb_new( acc );
+ static void *irc_check = NULL;
PurpleAccount *pa;
+ if( irc_check != NULL && irc_check != acc->irc )
+ {
+ irc_usermsg( acc->irc, "Daemon mode detected. Do *not* try to use libpurple in daemon mode! Please use inetd or ForkDaemon mode instead." );
+ return;
+ }
+ irc_check = acc->irc;
+
/* For now this is needed in the _connected() handlers if using
GLib event handling, to make sure we're not handling events
on dead connections. */
@@ -384,7 +392,7 @@ static PurpleConversationUiOps bee_conv_uiops =
static void prplcb_debug_print( PurpleDebugLevel level, const char *category, const char *arg_s )
{
- printf( "DEBUG %s: %s", category, arg_s );
+ fprintf( stderr, "DEBUG %s: %s", category, arg_s );
}
static PurpleDebugUiOps bee_debug_uiops =