aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/nogaim.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-10-12 23:23:49 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2009-10-12 23:23:49 +0100
commite248c7ff061e1582ed4c2919de6d615c1813e87a (patch)
tree357edc410a3c959b47b97f8abefca48365810011 /protocols/nogaim.c
parentdd0d57b10a8c2d07001ca2d4228232962ed8b95d (diff)
Automatically try prpl-$proto if $proto doesn't exist, and disable native
protocol modules if purple is enabled; they don't go together very well.
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r--protocols/nogaim.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index 8eae178d..7e8782ac 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -101,12 +101,23 @@ void register_protocol (struct prpl *p)
struct prpl *find_protocol(const char *name)
{
GList *gl;
- for (gl = protocols; gl; gl = gl->next)
+
+ for( gl = protocols; gl; gl = gl->next )
{
struct prpl *proto = gl->data;
- if(!g_strcasecmp(proto->name, name))
+
+ if( g_strcasecmp( proto->name, name ) == 0 )
return proto;
+
+#ifdef WITH_PURPLE
+ /* I know, hardcoding is evil, but that doesn't make it
+ impossible. :-) */
+ if( g_strncasecmp( proto->name, "prpl-", 5 ) == 0 &&
+ g_strcasecmp( proto->name + 5, name ) == 0 )
+ return proto;
+#endif
}
+
return NULL;
}