diff options
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/nogaim.c | 33 | ||||
| -rw-r--r-- | protocols/nogaim.h | 12 | 
2 files changed, 33 insertions, 12 deletions
| 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  { | 
