aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--protocols/nogaim.c18
-rw-r--r--query.c4
3 files changed, 10 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 8a3b3ef6..948e9b58 100644
--- a/Makefile
+++ b/Makefile
@@ -9,8 +9,8 @@
-include Makefile.settings
# Program variables
-#objects = bitlbee.o chat.o dcc.o help.o ipc.o irc.o irc_commands.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS)
-objects = bitlbee.o dcc.o help.o ipc.o irc.o irc_im.o irc_channel.o irc_commands.o irc_send.o irc_user.o nick.o root_commands.o set.o storage.o $(STORAGE_OBJS)
+#objects = chat.o
+objects = bitlbee.o dcc.o help.o ipc.o irc.o irc_im.o irc_channel.o irc_commands.o irc_send.o irc_user.o nick.o query.o root_commands.o set.o storage.o $(STORAGE_OBJS)
headers = account.h bitlbee.h commands.h conf.h config.h help.h ipc.h irc.h log.h nick.h query.h set.h sock.h storage.h user.h lib/events.h lib/ftutil.h lib/http_client.h lib/ini.h lib/md5.h lib/misc.h lib/proxy.h lib/sha1.h lib/ssl_client.h lib/url.h protocols/ft.h protocols/nogaim.h
subdirs = lib protocols
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index 4521eb32..cbfbe00a 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -358,7 +358,7 @@ void imc_logout( struct im_connection *ic, int allow_reconnect )
void imcb_ask( struct im_connection *ic, char *msg, void *data,
query_callback doit, query_callback dont )
{
- //query_add( ic->irc, ic, msg, doit, dont, data );
+ query_add( (irc_t *) ic->bee->ui_data, ic, msg, doit, dont, data );
}
void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group )
@@ -451,7 +451,6 @@ struct imcb_ask_cb_data
char *handle;
};
-#if 0
static void imcb_ask_auth_cb_no( void *data )
{
struct imcb_ask_cb_data *cbd = data;
@@ -471,11 +470,9 @@ static void imcb_ask_auth_cb_yes( void *data )
g_free( cbd->handle );
g_free( cbd );
}
-#endif
void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname )
{
-#if 0
struct imcb_ask_cb_data *data = g_new0( struct imcb_ask_cb_data, 1 );
char *s, *realname_ = NULL;
@@ -489,12 +486,11 @@ void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *re
data->ic = ic;
data->handle = g_strdup( handle );
- query_add( ic->irc, ic, s, imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, data );
-#endif
+ query_add( (irc_t *) ic->bee->ui_data, ic, s,
+ imcb_ask_auth_cb_yes, imcb_ask_auth_cb_no, data );
}
-#if 0
static void imcb_ask_add_cb_no( void *data )
{
g_free( ((struct imcb_ask_cb_data*)data)->handle );
@@ -509,24 +505,22 @@ static void imcb_ask_add_cb_yes( void *data )
return imcb_ask_add_cb_no( data );
}
-#endif
void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname )
{
-#if 0
struct imcb_ask_cb_data *data = g_new0( struct imcb_ask_cb_data, 1 );
char *s;
/* TODO: Make a setting for this! */
- if( user_findhandle( ic, handle ) != NULL )
+ if( bee_user_by_handle( ic->bee, ic, handle ) != NULL )
return;
s = g_strdup_printf( "The user %s is not in your buddy list yet. Do you want to add him/her now?", handle );
data->ic = ic;
data->handle = g_strdup( handle );
- query_add( ic->irc, ic, s, imcb_ask_add_cb_yes, imcb_ask_add_cb_no, data );
-#endif
+ query_add( (irc_t *) ic->bee->ui_data, ic, s,
+ imcb_ask_add_cb_yes, imcb_ask_add_cb_no, data );
}
void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags )
diff --git a/query.c b/query.c
index e8f69572..b60669f7 100644
--- a/query.c
+++ b/query.c
@@ -63,7 +63,7 @@ query_t *query_add( irc_t *irc, struct im_connection *ic, char *question,
irc->queries = q;
}
- if( g_strcasecmp( set_getstr( &irc->set, "query_order" ), "lifo" ) == 0 || irc->queries == q )
+ if( g_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "lifo" ) == 0 || irc->queries == q )
query_display( irc, q );
return( q );
@@ -178,7 +178,7 @@ static query_t *query_default( irc_t *irc )
{
query_t *q;
- if( g_strcasecmp( set_getstr( &irc->set, "query_order" ), "fifo" ) == 0 )
+ if( g_strcasecmp( set_getstr( &irc->b->set, "query_order" ), "fifo" ) == 0 )
q = irc->queries;
else
for( q = irc->queries; q && q->next; q = q->next );