diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-04-08 16:10:29 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-04-08 16:10:29 +0200 |
commit | 11bcee97b781bac6e38db4e1630ac6934209e73b (patch) | |
tree | d1377a6ebef982752ce3e9afd3137b370d87d1c1 | |
parent | f8de26f98e3c38d3deacb674e533c588e6b48548 (diff) | |
parent | 9e08d5d5ba8958807158d7afaedd40e60cfb40ff (diff) |
Misc. merges. (Main thing: "$blah is not in your list yet, would you like to add him?")
-rw-r--r-- | doc/bitlbee.8 | 2 | ||||
-rw-r--r-- | irc.c | 6 | ||||
-rw-r--r-- | protocols/nogaim.c | 33 | ||||
-rw-r--r-- | protocols/nogaim.h | 12 | ||||
-rw-r--r-- | query.c | 4 | ||||
-rw-r--r-- | utils/bitlbeed.c | 2 |
6 files changed, 40 insertions, 19 deletions
diff --git a/doc/bitlbee.8 b/doc/bitlbee.8 index f1d4dbce..201e366e 100644 --- a/doc/bitlbee.8 +++ b/doc/bitlbee.8 @@ -115,7 +115,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple PLace, Suite 330, Boston, MA 02111-1307 USA .SH AUTHORS .PP - Wilmer van der Gaast <lintux@lintux.cx> + Wilmer van der Gaast <wilmer@gaast.net> .BR Jelmer Vernooij <jelmer@vernstok.nl> .BR @@ -198,7 +198,7 @@ void irc_abort( irc_t *irc, int immed, char *format, ... ) } } -static gboolean irc_free_userhash( gpointer key, gpointer value, gpointer data ) +static gboolean irc_free_hashkey( gpointer key, gpointer value, gpointer data ) { g_free( key ); @@ -284,10 +284,10 @@ void irc_free(irc_t * irc) } } - g_hash_table_foreach_remove(irc->userhash, irc_free_userhash, NULL); + g_hash_table_foreach_remove(irc->userhash, irc_free_hashkey, NULL); g_hash_table_destroy(irc->userhash); - g_hash_table_foreach_remove(irc->watches, irc_free_userhash, NULL); + g_hash_table_foreach_remove(irc->watches, irc_free_hashkey, NULL); g_hash_table_destroy(irc->watches); if (irc->nicks != NULL) { diff --git a/protocols/nogaim.c b/protocols/nogaim.c index de7faba7..fb9c7986 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -565,9 +565,40 @@ void serv_buddy_rename( struct gaim_connection *gc, char *handle, char *realname /* prpl.c */ +struct show_got_added_data +{ + struct gaim_connection *gc; + char *handle; +}; + +void show_got_added_no( gpointer w, struct show_got_added_data *data ) +{ + g_free( data->handle ); + g_free( data ); +} + +void show_got_added_yes( gpointer w, struct show_got_added_data *data ) +{ + data->gc->prpl->add_buddy( data->gc, data->handle ); + add_buddy( data->gc, NULL, data->handle, data->handle ); + + return show_got_added_no( w, data ); +} + void show_got_added( struct gaim_connection *gc, char *handle, const char *realname ) { - return; + struct show_got_added_data *data = g_new0( struct show_got_added_data, 1 ); + char *s; + + /* TODO: Make a setting for this! */ + if( user_findhandle( gc, 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->gc = gc; + data->handle = g_strdup( handle ); + query_add( gc->irc, gc, s, show_got_added_yes, show_got_added_no, data ); } diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 894b5b05..4699f69f 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -14,7 +14,7 @@ * * Copyright (C) 1998-1999, Mark Spencer <markster@marko.net> * (and possibly other members of the Gaim team) - * Copyright 2002-2004 Wilmer van der Gaast <lintux@lintux.cx> + * Copyright 2002-2004 Wilmer van der Gaast <wilmer@gaast.net> */ /* @@ -51,22 +51,12 @@ #define SELF_ALIAS_LEN 400 #define BUDDY_ALIAS_MAXLEN 388 /* because MSN names can be 387 characters */ -#define PERMIT_ALL 1 -#define PERMIT_NONE 2 -#define PERMIT_SOME 3 -#define DENY_SOME 4 - #define WEBSITE "http://www.bitlee.org/" #define IM_FLAG_AWAY 0x0020 #define OPT_CONN_HTML 0x00000001 #define OPT_LOGGED_IN 0x00010000 #define GAIM_AWAY_CUSTOM "Custom" -#define GAIM_LOGO 0 -#define GAIM_ERROR 1 -#define GAIM_WARNING 2 -#define GAIM_INFO 3 - /* ok. now the fun begins. first we create a connection structure */ struct gaim_connection { @@ -139,13 +139,13 @@ void query_answer( irc_t *irc, query_t *q, int ans ) } if( ans ) { - q->yes( NULL, q->data ); serv_got_crap( q->gc, "Accepted: %s", q->question ); + q->yes( NULL, q->data ); } else { - q->no( NULL, q->data ); serv_got_crap( q->gc, "Rejected: %s", q->question ); + q->no( NULL, q->data ); } q->data = NULL; diff --git a/utils/bitlbeed.c b/utils/bitlbeed.c index b8db348e..82bd0879 100644 --- a/utils/bitlbeed.c +++ b/utils/bitlbeed.c @@ -5,7 +5,7 @@ * A tiny daemon to allow you to run The Bee as a non-root user * * (without access to /etc/inetd.conf or whatever) * * * -* Copyright 2002-2004 Wilmer van der Gaast <lintux@debian.org> * +* Copyright 2002-2004 Wilmer van der Gaast <wilmer@gaast.net> * * * * Licensed under the GNU General Public License * * * |