static void _init_plugin(PurplePlugin *plugin) { PurpleAccountUserSplit *split; PurpleAccountOption *option; split = purple_account_user_split_new(_("Server"), IRC_DEFAULT_SERVER, '@'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); option = purple_account_option_int_new(_("Port"), "port", IRC_DEFAULT_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Encodings"), "encoding", IRC_DEFAULT_CHARSET); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Username"), "username", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Real name"), "realname", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* option = purple_account_option_string_new(_("Quit message"), "quitmsg", IRC_DEFAULT_QUIT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); */ option = purple_account_option_bool_new(_("Use SSL"), "ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); _irc_plugin = plugin; purple_prefs_remove("/plugins/prpl/irc/quitmsg"); purple_prefs_remove("/plugins/prpl/irc"); irc_register_commands(); }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountOption *option; option = purple_account_option_int_new(_("Pager port"), "port", YAHOO_PAGER_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer server"), "xfer_host", YAHOOJP_XFER_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("File transfer port"), "xfer_port", YAHOO_XFER_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Chat room locale"), "room_list_locale", YAHOOJP_ROOMLIST_LOCALE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Use account proxy for HTTP and HTTPS connections"), "proxy_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #if 0 option = purple_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #endif yahoojp_register_commands(); yahoo_init_colorht(); }
static void plainprpl_init(PurplePlugin *plugin) { PurpleAccountOption *option; PurpleKeyValuePair *kvp; GList *list; kvp = g_new0(PurpleKeyValuePair, 1); kvp->key = g_strdup(_("IPv4")); kvp->value = g_strdup("ipv4"); list = g_list_append(NULL, kvp); kvp = g_new0(PurpleKeyValuePair, 1); kvp->key = g_strdup(_("IPv6")); kvp->value = g_strdup("ipv6"); list = g_list_append(list, kvp); option = purple_account_option_list_new(_("Protocol"), "listen_af", list); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Port"), "listen_port", PLAIN_DEFAULT_PORT_STR); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Allow messages from unknown contacts."), "allow_unknown", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("On Login"), "on_login",""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("On Logout"), "on_logout",""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* To lookup an IP address */ option = purple_account_option_string_new(_("On Resolve"), "on_lookup", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #if 0 /* When verification fails */ option = purple_account_option_string_new(_("On Invalid"), "on_invalid", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #endif #if PURPLE_MAJOR_VERSION == 2 /* * Workaround to tell the OTR plugin our maximum message size. * There is not other way for current libpurple 2.x. */ otr_set_max_message_size( PLAINPRPL_ID, MAX_MESSAGE_SIZE ); #endif }
static void _init_plugin(PurplePlugin *plugin) { PurpleAccountUserSplit *split; PurpleAccountOption *option; split = purple_account_user_split_new(_("Server"), IRC_DEFAULT_SERVER, '@'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); option = purple_account_option_int_new(_("Port"), "port", IRC_DEFAULT_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Encodings"), "encoding", IRC_DEFAULT_CHARSET); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Auto-detect incoming UTF-8"), "autodetect_utf8", IRC_DEFAULT_AUTODETECT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Ident name"), "username", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Real name"), "realname", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* option = purple_account_option_string_new(_("Quit message"), "quitmsg", IRC_DEFAULT_QUIT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); */ option = purple_account_option_bool_new(_("Use SSL"), "ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #ifdef HAVE_CYRUS_SASL option = purple_account_option_bool_new(_("Authenticate with SASL"), "sasl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new( _("Allow plaintext SASL auth over unencrypted connection"), "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #endif _irc_plugin = plugin; purple_prefs_remove("/plugins/prpl/irc/quitmsg"); purple_prefs_remove("/plugins/prpl/irc"); irc_register_commands(); }
static void nullprpl_init(PurplePlugin *plugin) { /* see accountopt.h for information about user splits and protocol options */ PurpleAccountUserSplit *split = purple_account_user_split_new( _("Example user split"), /* text shown to user */ "default", /* default value */ '@'); /* field separator */ PurpleAccountOption *option = purple_account_option_string_new( _("Example option"), /* text shown to user */ "example", /* pref name */ "default"); /* default value */ purple_debug_info("nullprpl", "starting up\n"); prpl_info.user_splits = g_list_append(NULL, split); prpl_info.protocol_options = g_list_append(NULL, option); /* register whisper chat command, /msg */ purple_cmd_register("msg", "ws", /* args: recipient and message */ PURPLE_CMD_P_DEFAULT, /* priority */ PURPLE_CMD_FLAG_CHAT, "prpl-null", send_whisper, "msg <username> <message>: send a private message, aka a whisper", NULL); /* userdata */ /* get ready to store offline messages */ goffline_messages = g_hash_table_new_full(g_str_hash, /* hash fn */ g_str_equal, /* key comparison fn */ g_free, /* key free fn */ NULL); /* value free fn */ _null_protocol = plugin; }
/*------------------------------------------------------------------------ * Initializing the MXit protocol instance. * * @param protocol The MXit protocol */ static void mxit_protocol_init( PurpleProtocol *protocol ) { PurpleAccountOption *option; protocol->id = MXIT_PROTOCOL_ID; protocol->name = MXIT_PROTOCOL_NAME; protocol->options = OPT_PROTO_REGISTER_NOSCREENNAME | OPT_PROTO_UNIQUE_CHATNAME | OPT_PROTO_INVITE_MESSAGE | OPT_PROTO_AUTHORIZATION_DENIED_MESSAGE; protocol->icon_spec = purple_buddy_icon_spec_new( "png,jpeg,bmp", /* supported formats */ 32, 32, /* min width & height */ 800, 800, /* max width & height */ CP_MAX_FILESIZE, /* max filesize */ PURPLE_ICON_SCALE_SEND | PURPLE_ICON_SCALE_DISPLAY /* scaling rules */ ); /* Configuration options */ /* WAP server (reference: "libpurple/accountopt.h") */ option = purple_account_option_string_new( _( "WAP Server" ), MXIT_CONFIG_WAPSERVER, DEFAULT_WAPSITE ); protocol->account_options = g_list_append( protocol->account_options, option ); option = purple_account_option_bool_new( _( "Connect via HTTP" ), MXIT_CONFIG_USE_HTTP, FALSE ); protocol->account_options = g_list_append( protocol->account_options, option ); option = purple_account_option_bool_new( _( "Enable splash-screen popup" ), MXIT_CONFIG_SPLASHPOPUP, FALSE ); protocol->account_options = g_list_append( protocol->account_options, option ); }
static void waprpl_init(PurplePlugin *plugin) { PurpleAccountOption *option; prpl_info.user_splits = NULL; option = purple_account_option_string_new("Server", "server", WHATSAPP_DEFAULT_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new("Port", "port", WHATSAPP_DEFAULT_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new("Nickname", "nick", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); _whatsapp_protocol = plugin; }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountOption *option; option = purple_account_option_string_new(_("Server"), "server", NETSOUL_DEFAULT_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Port"), "port", NETSOUL_DEFAULT_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Location"), "location", NETSOUL_DEFAULT_LOCATION); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Comment"), "comment", NETSOUL_DEFAULT_COMMENT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); _netsoul_plugin = plugin; }
static void init_plugin(PurplePlugin *plugin) { purple_debug_warning("np","\n=== START LOG ==\n"); PurpleAccountOption *option; option = purple_account_option_string_new(_("Server"), "server", NP_IM_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Port"), "port", NP_IM_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("HTTP Method Server"), "http_method_server", NP_HTTPCONN_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); // User-Agent option = purple_account_option_string_new(_("User-Agent"), "np_user_agent", NP_USER_AGENT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); // Device Id char *device_id =rand_guid(); option = purple_account_option_string_new(_("Device-ID"), "deivce_id", device_id); g_free(device_id); option = purple_account_option_bool_new(_("Allow direct connections"), "direct_connect", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Allow connecting from multiple locations"), "mpop", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); purple_prefs_remove("/plugins/prpl/np"); }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountOption *option; oscar_init(PURPLE_PLUGIN_PROTOCOL_INFO(plugin)); option = purple_account_option_string_new(_("Encoding"), "encoding", OSCAR_DEFAULT_CUSTOM_ENCODING); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); }
static gboolean plugin_load(PurplePlugin *plugin) { PurpleAccountOption *option; PurplePluginInfo *info = plugin->info; PurplePluginProtocolInfo *prpl_info = info->extra_info; option = purple_account_option_string_new("Server", "host", "bajor.omegle.com"); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); return TRUE; }
static void ga_plugin_init(PurplePlugin *plugin) { PurpleAccountOption *option; GHashTable *ui_info = purple_core_get_ui_info(); const gchar *ui_name = g_hash_table_lookup(ui_info, "version"); if(!ui_name) ui_name = GA_NAME; option = purple_account_option_string_new("User-agent", "user-agent", ui_name); ga_plugin_prpl_info.protocol_options = g_list_append(ga_plugin_prpl_info.protocol_options, option); _gayattitude_plugin = plugin; }
static gboolean plugin_load(PurplePlugin *plugin) { PurplePlugin *prpl = NULL; PurpleAccountOption *option; void *gc_handle = NULL; #if !PURPLE_VERSION_CHECK(2,4,0) gchar *notice_help = NULL; #endif prpl = purple_find_prpl("prpl-irc"); /* if we didn't find the prpl, bail */ if (!prpl) return FALSE; #if !PURPLE_VERSION_CHECK(2,4,0) /* specify our help string and register our command */ notice_help = _("notice target message: Send a notice to the specified target."); notice_cmd_id = purple_cmd_register("notice", "ws", PURPLE_CMD_P_PLUGIN, PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY, "prpl-irc", notice_cmd_cb, notice_help, NULL); #endif /* we need this handle for the signed-on signal */ gc_handle = purple_connections_get_handle(); /* list signals in alphabetical order for consistency */ purple_signal_connect(prpl, "irc-sending-text", plugin, G_CALLBACK(irc_sending_text), NULL); purple_signal_connect(prpl, "irc-receiving-text", plugin, G_CALLBACK(irc_receiving_text), NULL); purple_signal_connect(gc_handle, "signed-on", plugin, G_CALLBACK(signed_on_cb), NULL); irc_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl); /* Alphabetize the option label strings */ option = purple_account_option_string_new(_("Auto-Join Channels"), "autojoin", ""); irc_info->protocol_options = g_list_append(irc_info->protocol_options, option); option = purple_account_option_string_new(_("CTCP Version reply"), "ctcp-message", "Purple IRC"); irc_info->protocol_options = g_list_append(irc_info->protocol_options, option); option = purple_account_option_string_new(_("Default Quit Message"), "quit-message", "Leaving."); irc_info->protocol_options = g_list_append(irc_info->protocol_options, option); option = purple_account_option_string_new(_("Default Part Message"), "part-message", "Leaving."); irc_info->protocol_options = g_list_append(irc_info->protocol_options, option); option = purple_account_option_string_new(_("Set User Modes On Connect"), "setumodes", "i"); irc_info->protocol_options = g_list_append(irc_info->protocol_options, option); option = purple_account_option_string_new(_("Unset User Modes On Connect"), "unsetumodes", ""); irc_info->protocol_options = g_list_append(irc_info->protocol_options, option); return TRUE; }
static void waprpl_init(PurplePlugin * plugin) { PurpleAccountOption *option; prpl_info.user_splits = NULL; option = purple_account_option_string_new("Server", "server", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new("Port", "port", WHATSAPP_DEFAULT_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new("Nickname", "nick", ""); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new("Resource", "resource", default_resource); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); _whatsapp_protocol = plugin; // Some signals which can be caught by plugins purple_signal_register(plugin, "whatsapp-sending-message", purple_marshal_VOID__POINTER_POINTER_POINTER_POINTER, NULL, 4, purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_CONNECTION), purple_value_new(PURPLE_TYPE_STRING), /* id */ purple_value_new(PURPLE_TYPE_STRING), /* who */ purple_value_new(PURPLE_TYPE_STRING) /* message */ ); purple_signal_register(plugin, "whatsapp-message-received", purple_marshal_VOID__POINTER_POINTER_UINT, NULL, 3, purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_CONNECTION), purple_value_new(PURPLE_TYPE_STRING), /* id */ purple_value_new(PURPLE_TYPE_INT) /* reception-types */ ); }
static void plugin_init(PurplePlugin *plugin) { PurpleAccountOption *option; PurplePluginInfo *info = plugin->info; PurplePluginProtocolInfo *prpl_info = info->extra_info; /* Add options to the advanced screen in the account settings */ option = purple_account_option_bool_new( _("Show history in new conversations"), "facebook_show_history", TRUE); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); option = purple_account_option_bool_new( _("Use Facebook friend-lists as Pidgin groups"), "facebook_use_groups", TRUE); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); option = purple_account_option_bool_new( _("Hide myself in the Buddy List"), "facebook_hide_self", TRUE); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); option = purple_account_option_bool_new( _("Set Facebook status through Pidgin status"), "facebook_set_status_through_pidgin", FALSE); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); option = purple_account_option_bool_new( _("Show Facebook notifications as e-mails in Pidgin"), "facebook_get_notifications", TRUE); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); option = purple_account_option_string_new( _("Notifications RSS Feed URL"), "notifications_feed_url", ""); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); option = purple_account_option_bool_new( _("Edit Facebook friends from Pidgin"), "facebook_manage_friends", FALSE); prpl_info->protocol_options = g_list_append( prpl_info->protocol_options, option); }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountUserSplit *split; PurpleAccountOption *option; /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ split = purple_account_user_split_new(_("Domain"), NULL, '@'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); split = purple_account_user_split_new(_("Resource"), "Home", '/'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); option = purple_account_option_bool_new(_("Force old (port 5223) SSL"), "old_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new( _("Allow plaintext auth over unencrypted streams"), "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Connect server"), "connect_server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); jabber_init_plugin(plugin); purple_prefs_remove("/plugins/prpl/jabber"); /* XXX - If any other plugin wants SASL this won't be good ... */ #ifdef HAVE_CYRUS_SASL sasl_client_init(NULL); #endif jabber_register_commands(); jabber_iq_init(); }
/*------------------------------------------------------------------------ * Initialising the MXit plugin. * * @param plugin The plugin object */ static void init_plugin( PurplePlugin* plugin ) { PurpleAccountOption* option; purple_debug_info( MXIT_PLUGIN_ID, "Loading MXit libPurple plugin...\n" ); /* Configuration options */ /* WAP server (reference: "libpurple/accountopt.h") */ option = purple_account_option_string_new( _( "WAP Server" ), MXIT_CONFIG_WAPSERVER, DEFAULT_WAPSITE ); proto_info.protocol_options = g_list_append( proto_info.protocol_options, option ); option = purple_account_option_bool_new( _( "Connect via HTTP" ), MXIT_CONFIG_USE_HTTP, FALSE ); proto_info.protocol_options = g_list_append( proto_info.protocol_options, option ); option = purple_account_option_bool_new( _( "Enable splash-screen popup" ), MXIT_CONFIG_SPLASHPOPUP, FALSE ); proto_info.protocol_options = g_list_append( proto_info.protocol_options, option ); }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountOption *option; #ifdef ENABLE_NLS bindtextdomain(GETTEXT_PACKAGE, PP_LOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); #endif /* ENABLE_NLS */ option = purple_account_option_string_new(_("Server"), "server", NAP_SERVER); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Port"), "port", 8888); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); my_protocol = plugin; info.description = _(info.description); info.summary = _(info.summary); }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountOption *option; option = purple_account_option_string_new(_("Pager server"), "server", YAHOO_PAGER_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Pager port"), "port", YAHOO_PAGER_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer server"), "xfer_host", YAHOO_XFER_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("File transfer port"), "xfer_port", YAHOO_XFER_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Chat room locale"), "room_list_locale", YAHOO_ROOMLIST_LOCALE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Encoding"), "local_charset", "UTF-8"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Ignore conference and chatroom invitations"), "ignore_invites", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Use account proxy for SSL connections"), "proxy_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #if 0 option = purple_account_option_string_new(_("Chat room list URL"), "room_list", YAHOO_ROOMLIST_URL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Yahoo Chat server"), "ycht-server", YAHOO_YCHT_HOST); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Yahoo Chat port"), "ycht-port", YAHOO_YCHT_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); #endif my_protocol = plugin; yahoo_register_commands(); yahoo_init_colorht(); purple_signal_connect(purple_get_core(), "uri-handler", plugin, PURPLE_CALLBACK(yahoo_uri_handler), NULL); }
static void plugin_init(G_GNUC_UNUSED PurplePlugin * plugin) { PurpleAccountUserSplit *split; PurpleAccountOption *option_token, *option_limit; split = purple_account_user_split_new(_("Hostname"), NULL, '@'); campfire_protocol_info.user_splits = g_list_append(campfire_protocol_info.user_splits, split); option_token = purple_account_option_string_new(_("API token"), "api_token", NULL); campfire_protocol_info.protocol_options = g_list_append(campfire_protocol_info.protocol_options, option_token); option_limit = purple_account_option_int_new(_("Retrieve # msgs on join"), "limit", 10); campfire_protocol_info.protocol_options = g_list_append(campfire_protocol_info.protocol_options, option_limit); }
static void init_plugin(PurplePlugin *plugin) { PurpleAccountUserSplit *split; PurpleAccountOption *option; GList *encryption_values = NULL; /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ split = purple_account_user_split_new(_("Domain"), NULL, '@'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); split = purple_account_user_split_new(_("Resource"), "", '/'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); #define ADD_VALUE(list, desc, v) { \ PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1); \ kvp->key = g_strdup((desc)); \ kvp->value = g_strdup((v)); \ list = g_list_prepend(list, kvp); \ } ADD_VALUE(encryption_values, _("Require encryption"), "require_tls"); ADD_VALUE(encryption_values, _("Use encryption if available"), "opportunistic_tls"); ADD_VALUE(encryption_values, _("Use old-style SSL"), "old_ssl"); #if 0 ADD_VALUE(encryption_values, "None", "none"); #endif encryption_values = g_list_reverse(encryption_values); #undef ADD_VALUE option = purple_account_option_list_new(_("Connection security"), "connection_security", encryption_values); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new( _("Allow plaintext auth over unencrypted streams"), "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Connect server"), "connect_server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer proxies"), "ft_proxies", /* TODO: Is this an acceptable default? * Also, keep this in sync as they add more servers */ JABBER_DEFAULT_FT_PROXIES); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("BOSH URL"), "bosh_url", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* this should probably be part of global smiley theme settings later on, shared with MSN */ option = purple_account_option_bool_new(_("Show Custom Smileys"), "custom_smileys", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); my_protocol = plugin; purple_prefs_remove("/plugins/prpl/jabber"); purple_signal_connect(purple_get_core(), "uri-handler", plugin, PURPLE_CALLBACK(xmpp_uri_handler), NULL); }
static GList *get_protocol_options(const char *protocol_id) { GList *options = NULL; PurpleAccountOption *option; option = purple_account_option_bool_new(_("Enable HTTPS"), /* text shown to user */ TWITTER_PREF_USE_HTTPS, /* pref name */ TWITTER_PREF_USE_HTTPS_DEFAULT); /* default value */ options = g_list_append(NULL, option); if (!strcmp(protocol_id, STATUSNET_PROTOCOL_ID)) { option = purple_account_option_bool_new(_("Enable OAuth (more secure, higher rate limit)"), TWITTER_PREF_USE_OAUTH, FALSE); options = g_list_append(options, option); option = purple_account_option_string_new(_("Custom Consumer Key"), TWITTER_PREF_CONSUMER_KEY, ""); options = g_list_append(options, option); option = purple_account_option_string_new(_("Custom Consumer Secret"), TWITTER_PREF_CONSUMER_SECRET, ""); options = g_list_append(options, option); } /* Default sending im to buddy is to dm */ option = purple_account_option_bool_new(_("Default IM to buddy is a DM"), TWITTER_PREF_DEFAULT_DM, TWITTER_PREF_DEFAULT_DM_DEFAULT); options = g_list_append(options, option); /* Retrieve tweets history after login */ option = purple_account_option_bool_new(_("Retrieve tweets history after login"), TWITTER_PREF_RETRIEVE_HISTORY, TWITTER_PREF_RETRIEVE_HISTORY_DEFAULT); options = g_list_append(options, option); /* Sync presence update to twitter */ option = purple_account_option_bool_new(_("Sync availability status message to Twitter"), TWITTER_PREF_SYNC_STATUS, TWITTER_PREF_SYNC_STATUS_DEFAULT); options = g_list_append(options, option); /* Automatically generate a buddylist based on followers */ option = purple_account_option_bool_new(_("Add following as friends (NOT recommended for large follower list)"), TWITTER_PREF_GET_FRIENDS, TWITTER_PREF_GET_FRIENDS_DEFAULT); options = g_list_append(options, option); /* If adding following as friends, what should be the default alias? */ { static const gchar *alias_keys[] = { N_("<nickname> | <full name>"), N_("<nickname> only"), N_("<full name> only"), NULL }; static const gchar *alias_values[] = { TWITTER_PREF_ALIAS_FORMAT_ALL, TWITTER_PREF_ALIAS_FORMAT_NICK, TWITTER_PREF_ALIAS_FORMAT_FULLNAME, NULL }; GList *alias_options = NULL; int i; for (i = 0; alias_keys[i]; i++) { PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1); kvp->key = g_strdup(_(alias_keys[i])); kvp->value = g_strdup(alias_values[i]); alias_options = g_list_append(alias_options, kvp); } option = purple_account_option_list_new(_("Set default alias to:"), TWITTER_PREF_ALIAS_FORMAT, alias_options); options = g_list_append(options, option); } /* Add URL link to each tweet */ option = purple_account_option_bool_new(_("Add URL link to each tweet"), TWITTER_PREF_ADD_URL_TO_TWEET, TWITTER_PREF_ADD_URL_TO_TWEET_DEFAULT); options = g_list_append(options, option); /* Idle cutoff time */ option = purple_account_option_int_new(_("Buddy last tweet hours before set offline (0: Always online)"), /* text shown to user */ TWITTER_ONLINE_CUTOFF_TIME_HOURS, /* pref name */ TWITTER_ONLINE_CUTOFF_TIME_HOURS_DEFAULT); /* default value */ options = g_list_append(options, option); /* Max tweets to retrieve when retrieving timeline data */ option = purple_account_option_int_new(_("Max historical timeline tweets to retrieve (0: infinite)"), /* text shown to user */ TWITTER_PREF_HOME_TIMELINE_MAX_TWEETS, /* pref name */ TWITTER_PREF_HOME_TIMELINE_MAX_TWEETS_DEFAULT); /* default value */ options = g_list_append(options, option); /* Timeline tweets refresh interval */ option = purple_account_option_int_new(_("Refresh timeline every (min)"), /* text shown to user */ TWITTER_PREF_TIMELINE_TIMEOUT, /* pref name */ TWITTER_PREF_TIMELINE_TIMEOUT_DEFAULT); /* default value */ options = g_list_append(options, option); /* Mentions/replies tweets refresh interval */ option = purple_account_option_int_new(_("Refresh replies every (min)"), /* text shown to user */ TWITTER_PREF_REPLIES_TIMEOUT, /* pref name */ TWITTER_PREF_REPLIES_TIMEOUT_DEFAULT); /* default value */ options = g_list_append(options, option); /* Dms refresh interval */ option = purple_account_option_int_new(_("Refresh direct messages every (min)"), /* text shown to user */ TWITTER_PREF_DMS_TIMEOUT, /* pref name */ TWITTER_PREF_DMS_TIMEOUT_DEFAULT); /* default value */ options = g_list_append(options, option); if (!strcmp(protocol_id, TWITTER_PROTOCOL_ID)) { /* Lists tweets refresh interval */ option = purple_account_option_int_new(_("Refresh lists every (min)"), /* text shown to user */ TWITTER_PREF_LIST_TIMEOUT, /* pref name */ TWITTER_PREF_LIST_TIMEOUT_DEFAULT); /* default value */ options = g_list_append(options, option); } /* Friendlist refresh interval */ option = purple_account_option_int_new(_("Refresh friendlist every (min)"), /* text shown to user */ TWITTER_PREF_USER_STATUS_TIMEOUT, /* pref name */ TWITTER_PREF_USER_STATUS_TIMEOUT_DEFAULT); /* default value */ options = g_list_append(options, option); /* Search results refresh interval */ option = purple_account_option_int_new(_("Default refresh search results every (min)"), /* text shown to user */ TWITTER_PREF_SEARCH_TIMEOUT, /* pref name */ TWITTER_PREF_SEARCH_TIMEOUT_DEFAULT); /* default value */ options = g_list_append(options, option); if (!strcmp(protocol_id, STATUSNET_PROTOCOL_ID)) { option = purple_account_option_string_new(_("API Base URL"), /* text shown to user */ TWITTER_PREF_API_BASE, /* pref name */ STATUSNET_PREF_API_BASE_DEFAULT); /* default value */ options = g_list_append(options, option); } return options; }
static void init_plugin(PurplePlugin *plugin) { #ifdef HAVE_CYRUS_SASL #ifdef _WIN32 UINT old_error_mode; gchar *sasldir; #endif int ret; #endif PurpleAccountUserSplit *split; PurpleAccountOption *option; /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ split = purple_account_user_split_new(_("Domain"), NULL, '@'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); split = purple_account_user_split_new(_("Resource"), NULL, '/'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Force old (port 5223) SSL"), "old_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new( _("Allow plaintext auth over unencrypted streams"), "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Connect server"), "connect_server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer proxies"), "ft_proxies", /* TODO: Is this an acceptable default? */ "proxy.jabber.org"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* this should probably be part of global smiley theme settings later on, shared with MSN */ option = purple_account_option_bool_new(_("Show Custom Smileys"), "custom_smileys", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); jabber_init_plugin(plugin); purple_prefs_remove("/plugins/prpl/jabber"); /* XXX - If any other plugin wants SASL this won't be good ... */ #ifdef HAVE_CYRUS_SASL #ifdef _WIN32 sasldir = g_build_filename(wpurple_install_dir(), "sasl2", NULL); sasl_set_path(SASL_PATH_TYPE_PLUGIN, sasldir); g_free(sasldir); /* Suppress error popups for failing to load sasl plugins */ old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS); #endif if ((ret = sasl_client_init(NULL)) != SASL_OK) { purple_debug_error("xmpp", "Error (%d) initializing SASL.\n", ret); } #ifdef _WIN32 /* Restore the original error mode */ SetErrorMode(old_error_mode); #endif #endif jabber_register_commands(); jabber_iq_init(); jabber_pep_init(); jabber_tune_init(); jabber_caps_init(); jabber_data_init(); jabber_add_feature("avatarmeta", AVATARNAMESPACEMETA, jabber_pep_namespace_only_when_pep_enabled_cb); jabber_add_feature("avatardata", AVATARNAMESPACEDATA, jabber_pep_namespace_only_when_pep_enabled_cb); jabber_add_feature("buzz", "http://www.xmpp.org/extensions/xep-0224.html#ns", jabber_buzz_isenabled); jabber_add_feature("bob", XEP_0231_NAMESPACE, jabber_custom_smileys_isenabled); jabber_pep_register_handler("avatar", AVATARNAMESPACEMETA, jabber_buddy_avatar_update_metadata); }
static void plugin_init(PurplePlugin *plugin) { PurpleAccountUserSplit *split; PurpleAccountOption *option; split = purple_account_user_split_new("Character", "", ':'); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); /* option = purple_account_option_bool_new("Sync Status", "sync_status", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new("Sync Status Message", "sync_status_message", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option);*/ option = purple_account_option_string_new("Server Address", "server_address", "chat.f-list.net"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new("Server Port", "server_port", FLIST_PORT); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new("Download Friends List", "sync_friends", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new("Download Bookmarks", "sync_bookmarks", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new("Debug Mode", "debug_mode", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); gender_list = NULL; gender_list = g_slist_prepend(gender_list, "Male"); gender_list = g_slist_prepend(gender_list, "Female"); gender_list = g_slist_prepend(gender_list, "Transgender"); gender_list = g_slist_prepend(gender_list, "Herm"); gender_list = g_slist_prepend(gender_list, "Shemale"); gender_list = g_slist_prepend(gender_list, "Male-Herm"); gender_list = g_slist_prepend(gender_list, "C**t-boy"); gender_list = g_slist_prepend(gender_list, "None"); gender_list = g_slist_reverse(gender_list); str_to_channel_mode = g_hash_table_new(g_str_hash, g_str_equal); g_hash_table_insert(str_to_channel_mode, "both", GINT_TO_POINTER(CHANNEL_MODE_BOTH)); g_hash_table_insert(str_to_channel_mode, "ads", GINT_TO_POINTER(CHANNEL_MODE_ADS_ONLY)); g_hash_table_insert(str_to_channel_mode, "chat", GINT_TO_POINTER(CHANNEL_MODE_CHAT_ONLY)); str_to_gender = g_hash_table_new(g_str_hash, g_str_equal); g_hash_table_insert(str_to_gender, "Male", GINT_TO_POINTER(FLIST_GENDER_MALE)); g_hash_table_insert(str_to_gender, "Female", GINT_TO_POINTER(FLIST_GENDER_FEMALE)); g_hash_table_insert(str_to_gender, "Transgender", GINT_TO_POINTER(FLIST_GENDER_TRANSGENDER)); g_hash_table_insert(str_to_gender, "Herm", GINT_TO_POINTER(FLIST_GENDER_HERM)); g_hash_table_insert(str_to_gender, "Shemale", GINT_TO_POINTER(FLIST_GENDER_SHEMALE)); g_hash_table_insert(str_to_gender, "Male-Herm", GINT_TO_POINTER(FLIST_GENDER_MALEHERM)); g_hash_table_insert(str_to_gender, "C**t-boy", GINT_TO_POINTER(FLIST_GENDER_CUNTBOY)); g_hash_table_insert(str_to_gender, "None", GINT_TO_POINTER(FLIST_GENDER_NONE)); gender_to_proper_str = g_hash_table_new(g_direct_hash, NULL); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_MALE), "Male"); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_FEMALE), "Female"); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_TRANSGENDER), "Transgender"); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_HERM), "Herm"); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_SHEMALE), "Shemale"); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_MALEHERM), "Male-Herm"); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_CUNTBOY), "C**t-boy"); g_hash_table_insert(gender_to_proper_str, GINT_TO_POINTER(FLIST_GENDER_NONE), "None"); status_list = NULL; status_list = g_slist_prepend(status_list, "online"); status_list = g_slist_prepend(status_list, "looking"); status_list = g_slist_prepend(status_list, "away"); status_list = g_slist_prepend(status_list, "busy"); status_list = g_slist_prepend(status_list, "dnd"); status_list = g_slist_reverse(status_list); str_to_status = g_hash_table_new(g_str_hash, g_str_equal); g_hash_table_insert(str_to_status, "online", GINT_TO_POINTER(FLIST_STATUS_AVAILABLE)); g_hash_table_insert(str_to_status, "looking", GINT_TO_POINTER(FLIST_STATUS_LOOKING)); g_hash_table_insert(str_to_status, "busy", GINT_TO_POINTER(FLIST_STATUS_BUSY)); g_hash_table_insert(str_to_status, "dnd", GINT_TO_POINTER(FLIST_STATUS_DND)); g_hash_table_insert(str_to_status, "crown", GINT_TO_POINTER(FLIST_STATUS_CROWN)); g_hash_table_insert(str_to_status, "idle", GINT_TO_POINTER(FLIST_STATUS_IDLE)); g_hash_table_insert(str_to_status, "away", GINT_TO_POINTER(FLIST_STATUS_AWAY)); g_hash_table_insert(str_to_status, "unknown", GINT_TO_POINTER(FLIST_STATUS_UNKNOWN)); status_to_str = g_hash_table_new(g_direct_hash, NULL); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_AVAILABLE), "online"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_LOOKING), "looking"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_BUSY), "busy"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_DND), "dnd"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_CROWN), "crown"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_AWAY), "away"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_IDLE), "idle"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_OFFLINE), "offline"); g_hash_table_insert(status_to_str, GINT_TO_POINTER(FLIST_STATUS_UNKNOWN), "unknown"); status_to_proper_str = g_hash_table_new(g_direct_hash, NULL); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_AVAILABLE), "Available"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_LOOKING), "Looking"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_BUSY), "Busy"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_DND), "Do Not Disturb"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_CROWN), "Crown"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_AWAY), "Away"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_IDLE), "Idle"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_OFFLINE), "Offline"); g_hash_table_insert(status_to_proper_str, GINT_TO_POINTER(FLIST_STATUS_UNKNOWN), "Unknown"); friend_status_to_proper_str = g_hash_table_new(g_direct_hash, NULL); g_hash_table_insert(friend_status_to_proper_str, GINT_TO_POINTER(FLIST_NOT_FRIEND), "No"); g_hash_table_insert(friend_status_to_proper_str, GINT_TO_POINTER(FLIST_MUTUAL_FRIEND), "Mutual"); g_hash_table_insert(friend_status_to_proper_str, GINT_TO_POINTER(FLIST_PENDING_IN_FRIEND), "Pending (You)"); g_hash_table_insert(friend_status_to_proper_str, GINT_TO_POINTER(FLIST_PENDING_OUT_FRIEND), "Pending (Buddy)"); string_to_account = g_hash_table_new((GHashFunc) flist_str_hash, (GEqualFunc) flist_str_equal); account_to_string = g_hash_table_new((GHashFunc) flist_str_hash, (GEqualFunc) flist_str_equal); flist_callback_init(); flist_init_commands(); flist_bbcode_init(); flist_web_requests_init(); flist_ticket_init(); }
static void init_plugin(PurplePlugin *plugin) { #ifdef HAVE_CYRUS_SASL #ifdef _WIN32 UINT old_error_mode; gchar *sasldir; #endif int ret; #endif PurpleAccountUserSplit *split; PurpleAccountOption *option; /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ split = purple_account_user_split_new(_("Domain"), NULL, '@'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); split = purple_account_user_split_new(_("Resource"), NULL, '/'); purple_account_user_split_set_reverse(split, FALSE); prpl_info.user_splits = g_list_append(prpl_info.user_splits, split); option = purple_account_option_bool_new(_("Require SSL/TLS"), "require_tls", JABBER_DEFAULT_REQUIRE_TLS); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new(_("Force old (port 5223) SSL"), "old_ssl", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_bool_new( _("Allow plaintext auth over unencrypted streams"), "auth_plain_in_clear", FALSE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_int_new(_("Connect port"), "port", 5222); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("Connect server"), "connect_server", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("File transfer proxies"), "ft_proxies", /* TODO: Is this an acceptable default? * Also, keep this in sync as they add more servers */ "proxy.eu.jabber.org"); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); option = purple_account_option_string_new(_("BOSH URL"), "bosh_url", NULL); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); /* this should probably be part of global smiley theme settings later on, shared with MSN */ option = purple_account_option_bool_new(_("Show Custom Smileys"), "custom_smileys", TRUE); prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, option); my_protocol = plugin; jabber_init_plugin(plugin); purple_prefs_remove("/plugins/prpl/jabber"); /* XXX - If any other plugin wants SASL this won't be good ... */ #ifdef HAVE_CYRUS_SASL #ifdef _WIN32 sasldir = g_build_filename(wpurple_install_dir(), "sasl2", NULL); sasl_set_path(SASL_PATH_TYPE_PLUGIN, sasldir); g_free(sasldir); /* Suppress error popups for failing to load sasl plugins */ old_error_mode = SetErrorMode(SEM_FAILCRITICALERRORS); #endif if ((ret = sasl_client_init(NULL)) != SASL_OK) { purple_debug_error("xmpp", "Error (%d) initializing SASL.\n", ret); } #ifdef _WIN32 /* Restore the original error mode */ SetErrorMode(old_error_mode); #endif #endif jabber_register_commands(); /* reverse order of unload_plugin */ jabber_iq_init(); jabber_caps_init(); /* PEP things should be init via jabber_pep_init, not here */ jabber_pep_init(); jabber_data_init(); jabber_bosh_init(); /* BEGIN SPICEBIRD CHANGES */ #if 0 #warning implement adding and retrieving own features via IPC API #endif /* END SPICEBIRD CHANGES */ jabber_ibb_init(); jabber_si_init(); purple_signal_connect(purple_get_core(), "uri-handler", plugin, PURPLE_CALLBACK(xmpp_uri_handler), NULL); }