Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    r449a51d r3e1ef92c  
    9898void register_protocol (struct prpl *p)
    9999{
    100         int i;
    101         gboolean refused = global.conf->protocols != NULL;
    102  
    103         for (i = 0; global.conf->protocols && global.conf->protocols[i]; i++)
    104         {
    105                 if (g_strcasecmp(p->name, global.conf->protocols[i]) == 0)
    106                         refused = FALSE;
    107         }
    108 
    109         if (refused)
    110                 log_message(LOGLVL_WARNING, "Protocol %s disabled\n", p->name);
    111         else
    112                 protocols = g_list_append(protocols, p);
     100        protocols = g_list_append(protocols, p);
    113101}
    114102
     
    383371/* list.c */
    384372
    385 void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group )
     373void imcb_add_buddy( struct im_connection *ic, char *handle, char *group )
    386374{
    387375        user_t *u;
     
    457445}
    458446
    459 void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname )
     447void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname )
    460448{
    461449        user_t *u = user_findhandle( ic, handle );
    462         char *set;
    463450       
    464451        if( !u || !realname ) return;
     
    473460                        imcb_log( ic, "User `%s' changed name to `%s'", u->nick, u->realname );
    474461        }
    475        
    476         set = set_getstr( &ic->acc->set, "nick_source" );
    477         if( strcmp( set, "handle" ) != 0 )
    478         {
    479                 char *name = g_strdup( realname );
    480                
    481                 if( strcmp( set, "first_name" ) == 0 )
    482                 {
    483                         int i;
    484                         for( i = 0; name[i] && !isspace( name[i] ); i ++ ) {}
    485                         name[i] = '\0';
    486                 }
    487                
    488                 imcb_buddy_nick_hint( ic, handle, name );
    489                
    490                 g_free( name );
    491         }
    492 }
    493 
    494 void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group )
     462}
     463
     464void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group )
    495465{
    496466        user_t *u;
     
    502472/* Mainly meant for ICQ (and now also for Jabber conferences) to allow IM
    503473   modules to suggest a nickname for a handle. */
    504 void imcb_buddy_nick_hint( struct im_connection *ic, const char *handle, const char *nick )
     474void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick )
    505475{
    506476        user_t *u = user_findhandle( ic, handle );
     
    647617        oo = u->online;
    648618       
    649         g_free( u->away );
    650         g_free( u->status_msg );
    651         u->away = u->status_msg = NULL;
     619        if( u->away )
     620        {
     621                g_free( u->away );
     622                u->away = NULL;
     623        }
    652624       
    653625        if( ( flags & OPT_LOGGED_IN ) && !u->online )
     
    687659                }
    688660        }
    689         else
    690         {
    691                 u->status_msg = g_strdup( message );
    692         }
     661        /* else waste_any_state_information_for_now(); */
    693662       
    694663        /* LISPy... */
     
    715684}
    716685
    717 void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at )
     686void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at )
    718687{
    719688        irc_t *irc = ic->irc;
     
    848817}
    849818
    850 void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at )
     819void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at )
    851820{
    852821        struct im_connection *ic = c->ic;
     
    920889/* buddy_chat.c */
    921890
    922 void imcb_chat_add_buddy( struct groupchat *b, const char *handle )
     891void imcb_chat_add_buddy( struct groupchat *b, char *handle )
    923892{
    924893        user_t *u = user_findhandle( b->ic, handle );
     
    955924
    956925/* This function is one BIG hack... :-( EREWRITE */
    957 void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason )
     926void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason )
    958927{
    959928        user_t *u;
Note: See TracChangeset for help on using the changeset viewer.