Changeset 90cd6c4 for protocols/nogaim.c


Ignore:
Timestamp:
2010-03-14T18:22:43Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
21d48d9
Parents:
ceebeb1
Message:

Allow disabling certain IM protocols at runtime, patch from
misc@…, bug #381.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/nogaim.c

    rceebeb1 r90cd6c4  
    9898void register_protocol (struct prpl *p)
    9999{
    100         protocols = g_list_append(protocols, p);
     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);
    101113}
    102114
Note: See TracChangeset for help on using the changeset viewer.