diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-09-29 22:28:36 -0700 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-09-29 22:28:36 -0700 | 
| commit | 665c24f36e591b1011c47b7aaa13a62533e79dac (patch) | |
| tree | 95a27168fa6cd96f26519eb8c266f4e3c90e59ab /protocols | |
| parent | ecae65f7337dbf8c0e2dbc6388d6e35804e1c3ce (diff) | |
Some simple error msgs on failed Twitter commands (undo and rt).
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/twitter/twitter.c | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index d5127415..7a49c084 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -28,6 +28,16 @@  #include "twitter_lib.h"  #include "url.h" +#define twitter_msg( ic, fmt... ) \ +	do {                                                        \ +		struct twitter_data *td = ic->proto_data;           \ +		if( td->home_timeline_gc )                          \ +			imcb_chat_log( td->home_timeline_gc, fmt ); \ +		else                                                \ +			imcb_log( ic, fmt );                        \ +	} while( 0 ); +		 +  /**   * Main loop function   */ @@ -435,6 +445,8 @@ static void twitter_handle_command( struct im_connection *ic, char *message )  		/* TODO: User feedback. */  		if( id )  			twitter_status_destroy( ic, id ); +		else +			twitter_msg( ic, "Could not undo last action" );  		g_free( cmds );  		return; @@ -466,6 +478,9 @@ static void twitter_handle_command( struct im_connection *ic, char *message )  		td->last_status_id = 0;  		if( id )  			twitter_status_retweet( ic, id ); +		else +			twitter_msg( ic, "User `%s' does not exist or didn't " +			                 "post any statuses recently", cmd[1] );  		g_free( cmds );  		return; | 
