- Timestamp:
- 2006-07-27T14:55:53Z (18 years ago)
- Branches:
- master
- Children:
- a36b030
- Parents:
- 6398094
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/msn_util.c
r6398094 r2811940 54 54 { 55 55 struct msn_data *md = gc->proto_data; 56 GSList *l, **lp = NULL;57 56 char buf[1024], *realname; 58 59 if( strcmp( list, "AL" ) == 0 )60 lp = &gc->permit;61 else if( strcmp( list, "BL" ) == 0 )62 lp = &gc->deny;63 64 if( lp )65 for( l = *lp; l; l = l->next )66 if( g_strcasecmp( l->data, who ) == 0 )67 return( 1 );68 57 69 58 realname = g_new0( char, strlen( realname_ ) * 3 + 1 ); … … 76 65 g_free( realname ); 77 66 78 if( lp )79 *lp = g_slist_append( *lp, g_strdup( who ) );80 81 67 return( 1 ); 82 68 } … … 90 76 { 91 77 struct msn_data *md = gc->proto_data; 92 GSList *l = NULL, **lp = NULL;93 78 char buf[1024]; 94 95 if( strcmp( list, "AL" ) == 0 )96 lp = &gc->permit;97 else if( strcmp( list, "BL" ) == 0 )98 lp = &gc->deny;99 100 if( lp )101 {102 for( l = *lp; l; l = l->next )103 if( g_strcasecmp( l->data, who ) == 0 )104 break;105 106 if( !l )107 return( 1 );108 }109 79 110 80 g_snprintf( buf, sizeof( buf ), "REM %d %s %s\r\n", ++md->trId, list, who ); 111 81 if( msn_write( gc, buf, strlen( buf ) ) ) 112 {113 if( lp )114 *lp = g_slist_remove( *lp, l->data );115 116 82 return( 1 ); 117 }118 83 119 84 return( 0 );
Note: See TracChangeset
for help on using the changeset viewer.