void gaim_connections_init(void) { void *handle = gaim_connections_get_handle(); gaim_signal_register(handle, "signing-on", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONNECTION)); gaim_signal_register(handle, "signed-on", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONNECTION)); gaim_signal_register(handle, "signing-off", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONNECTION)); gaim_signal_register(handle, "signed-off", gaim_marshal_VOID__POINTER, NULL, 1, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONNECTION)); }
static gboolean load_plugin (GaimPlugin *plugin) { gaim_signal_register(plugin, "irc-sending-text", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONNECTION), gaim_value_new_outgoing(GAIM_TYPE_STRING)); gaim_signal_register(plugin, "irc-receiving-text", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_CONNECTION), gaim_value_new_outgoing(GAIM_TYPE_STRING)); return TRUE; }
void gaim_notify_init(void) { gpointer handle = gaim_notify_get_handle(); gaim_signal_register(handle, "displaying-userinfo", gaim_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), gaim_value_new(GAIM_TYPE_STRING), gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_USERINFO)); }
static GList *irc_status_types(GaimAccount *account) { GaimStatusType *type; GList *types = NULL; type = gaim_status_type_new(GAIM_STATUS_AVAILABLE, NULL, NULL, TRUE); types = g_list_append(types, type); type = gaim_status_type_new_with_attrs( GAIM_STATUS_AWAY, NULL, NULL, TRUE, TRUE, FALSE, "message", _("Message"), gaim_value_new(GAIM_TYPE_STRING), NULL); types = g_list_append(types, type); type = gaim_status_type_new(GAIM_STATUS_OFFLINE, NULL, NULL, TRUE); types = g_list_append(types, type); return types; }
static void _init_plugin(GaimPlugin * plugin) { GaimAccountOption *option; option = gaim_account_option_string_new(_("Bio Line"), "bioline", ""); prpl_info.protocol_options = g_list_prepend(prpl_info.protocol_options, option); option = gaim_account_option_int_new(_("Port"), "port", IRC_DEFAULT_PORT); prpl_info.protocol_options = g_list_prepend(prpl_info.protocol_options, option); option = gaim_account_option_string_new(_("Server"), "server", IRC_DEFAULT_SERVER); prpl_info.protocol_options = g_list_prepend(prpl_info.protocol_options, option); /** * We have to pull thumbnails, since they aren't pushed like with * other protocols. */ gaim_signal_connect(gaim_conversations_get_handle(), "conversation-created", plugin, GAIM_CALLBACK(gaym_get_photo_info), NULL); gaim_signal_connect(gaim_conversations_get_handle(), "deleting-conversation", plugin, GAIM_CALLBACK(gaym_clean_channel_members), NULL); gaim_signal_register(gaim_accounts_get_handle(), "info-updated", gaim_marshal_VOID__POINTER_POINTER, NULL, 2, gaim_value_new(GAIM_TYPE_SUBTYPE, GAIM_SUBTYPE_ACCOUNT), gaim_value_new(GAIM_TYPE_POINTER, GAIM_TYPE_CHAR)); gaim_prefs_add_none("/plugins/prpl/gaym"); gaim_prefs_add_int("/plugins/prpl/gaym/chat_room_instances", 4); gaim_prefs_add_bool("/plugins/prpl/gaym/show_join", TRUE); gaim_prefs_add_bool("/plugins/prpl/gaym/show_part", TRUE); gaim_prefs_add_bool("/plugins/prpl/gaym/show_bio_with_join", TRUE); gaim_prefs_add_bool("/plugins/prpl/gaym/botfilter_enable", FALSE); gaim_prefs_add_bool("/plugins/prpl/gaym/botfilter_ignore_null", FALSE); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_sep", "|"); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_patterns", "NULL|MODE * -i|*dantcamboy*|*Free preview*|*epowerchat*|*Live gay sex cam show*|*camboiz*"); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_url", GAYBOI_SPAM_URL); gaim_prefs_connect_callback("/plugins/prpl/gaym/botfilter_url", botfilter_url_changed_cb, NULL); gaim_prefs_add_string("/plugins/prpl/gaym/botfilter_url_result", ""); gaim_prefs_add_int("/plugins/prpl/gaym/botfilter_url_last_check", 0); _gaym_plugin = plugin; gaym_register_commands(); }