From 796da03f9f54f8fb193529288592571b371bf0cd Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 5 Oct 2009 00:28:11 +0100 Subject: Something that compiles and runs, but otherwise utterly useless. Added a protocols/purple/ module and included it in the build system. Already picks up all the supported protocols and adds them individually. --- protocols/nogaim.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index fd445324..8eae178d 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -117,6 +117,7 @@ void nogaim_init() extern void oscar_initmodule(); extern void byahoo_initmodule(); extern void jabber_initmodule(); + extern void purple_initmodule(); #ifdef WITH_MSN msn_initmodule(); @@ -133,6 +134,10 @@ void nogaim_init() #ifdef WITH_JABBER jabber_initmodule(); #endif + +#ifdef WITH_PURPLE + purple_initmodule(); +#endif #ifdef WITH_PLUGINS load_plugins(); -- cgit v1.2.3 From e248c7ff061e1582ed4c2919de6d615c1813e87a Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 12 Oct 2009 23:23:49 +0100 Subject: 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. --- protocols/nogaim.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'protocols/nogaim.c') 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; } -- cgit v1.2.3 From cd741d8e2bb0b7d08cf36d90f5332a639f190281 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 23 Nov 2009 23:23:37 +0000 Subject: Fixed compatibility with non-libpurple version: oscar is now recognized as a protocol name, and removed prpl- hack from nogaim.c. --- protocols/nogaim.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'protocols/nogaim.c') diff --git a/protocols/nogaim.c b/protocols/nogaim.c index c0d4a953..f80653ff 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -110,14 +110,6 @@ struct prpl *find_protocol(const char *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; -- cgit v1.2.3