aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2009-11-25 00:45:27 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2009-11-25 00:45:27 +0000
commite5d8d21fd20516be53f873d269b469be109eca91 (patch)
tree14849d3e7e524f69d9f02be9ecfa61eeb5ab1baa /protocols
parent0ac1a37573f966d7a03b85816c583bd6976c402f (diff)
Added in-memory help info, which I wanted to implement for ages already.
Sadly the way I'm using it now doesn't work yet since nogaim_init() is called before help_init(). I'll fix that later. (Have to do that anyway to at least make ForkDaemon mode work..)
Diffstat (limited to 'protocols')
-rw-r--r--protocols/purple/purple.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/purple/purple.c b/protocols/purple/purple.c
index 33b19a67..50770187 100644
--- a/protocols/purple/purple.c
+++ b/protocols/purple/purple.c
@@ -22,6 +22,7 @@
\***************************************************************************/
#include "bitlbee.h"
+#include "help.h"
#include <stdarg.h>
@@ -474,6 +475,8 @@ static void *prplcb_request_action( const char *title, const char *primary, cons
prplcb_request_action_yes, prplcb_request_action_no, pqad );
g_free( q );
+
+ return pqad;
}
static PurpleRequestUiOps bee_request_uiops =
@@ -534,6 +537,7 @@ void purple_initmodule()
{
struct prpl funcs;
GList *prots;
+ GString *help;
if( B_EV_IO_READ != PURPLE_INPUT_READ ||
B_EV_IO_WRITE != PURPLE_INPUT_WRITE )
@@ -573,6 +577,8 @@ void purple_initmodule()
funcs.send_typing = purple_send_typing;
funcs.handle_cmp = g_strcasecmp;
+ help = g_string_new("BitlBee libpurple module supports the following IM protocols:\n");
+
for( prots = purple_plugins_get_protocols(); prots; prots = prots->next )
{
PurplePlugin *prot = prots->data;
@@ -584,6 +590,8 @@ void purple_initmodule()
ret->name += 5;
register_protocol( ret );
+ g_string_append_printf( help, "\n* %s (%s)", ret->name, prot->info->name );
+
if( g_strcasecmp( prot->info->id, "prpl-aim" ) == 0 )
{
ret = g_memdup( &funcs, sizeof( funcs ) );
@@ -592,4 +600,7 @@ void purple_initmodule()
register_protocol( ret );
}
}
+
+ help_add_mem( &global.help, "purple", help->str );
+ g_string_free( help, TRUE );
}