Example #1
0
void
gaim_pounces_init(void)
{
	void *blist_handle = gaim_blist_get_handle();
	void *conv_handle  = gaim_conversations_get_handle();
	void *handle       = gaim_pounces_get_handle();

	pounce_handlers = g_hash_table_new_full(g_str_hash, g_str_equal,
											g_free, free_pounce_handler);

	gaim_signal_connect(blist_handle, "buddy-idle",
						handle, GAIM_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(GAIM_POUNCE_IDLE));
	gaim_signal_connect(blist_handle, "buddy-unidle",
						handle, GAIM_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(GAIM_POUNCE_IDLE_RETURN));
	gaim_signal_connect(blist_handle, "buddy-away",
						handle, GAIM_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(GAIM_POUNCE_AWAY));
	gaim_signal_connect(blist_handle, "buddy-back",
						handle, GAIM_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(GAIM_POUNCE_AWAY_RETURN));
	gaim_signal_connect(blist_handle, "buddy-signed-on",
						handle, GAIM_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(GAIM_POUNCE_SIGNON));
	gaim_signal_connect(blist_handle, "buddy-signed-off",
						handle, GAIM_CALLBACK(buddy_state_cb),
						GINT_TO_POINTER(GAIM_POUNCE_SIGNOFF));

	gaim_signal_connect(conv_handle, "buddy-typing",
						handle, GAIM_CALLBACK(buddy_typing_cb), NULL);
	gaim_signal_connect(conv_handle, "buddy-typing-stopped",
						handle, GAIM_CALLBACK(buddy_typing_cb), NULL);
}
Example #2
0
static gboolean plugin_load(GaimPlugin * plugin)
{
    init_chat_icons();
    init_popups();

    gaim_signal_connect(gaim_conversations_get_handle(), "chat-joined",
                        plugin, GAIM_CALLBACK(redochatwindow), NULL);

    gaim_signal_connect(gaim_conversations_get_handle(),
                        "conversation-created", plugin,
                        GAIM_CALLBACK(redo_im_window), NULL);

    gaim_signal_connect(gaim_accounts_get_handle(), "info-updated", plugin,
                        GAIM_CALLBACK(update_info_cb), NULL);

    gaim_signal_connect(gaim_conversations_get_handle(),
                        "deleting-conversation", plugin,
                        GAIM_CALLBACK(clean_popup_stuff), NULL);

    return TRUE;
}
Example #3
0
static gboolean plugin_load(GaimPlugin * plugin)
{
    init_chat_icons(plugin);
    init_popups();
    init_roombrowse(plugin);
    gaim_signal_connect(gaim_conversations_get_handle(),
                        "conversation-created", plugin,
                        GAIM_CALLBACK(redo_im_window), NULL);

    gaim_signal_connect(gaim_accounts_get_handle(), "info-updated", plugin,
                        GAIM_CALLBACK(update_info_cb), NULL);

    gaim_signal_connect(gaim_conversations_get_handle(),
                        "deleting-conversation", plugin,
                        GAIM_CALLBACK(clean_popup_stuff), NULL);
    gaim_prefs_add_none("/plugins/gaym-extras");
    gaim_prefs_add_none("/plugins/gaym-extras/silly");

    extras_register_stock();

    return TRUE;
}
static gboolean plugin_load(GaimPlugin * plugin)
{
    void *conv_handle = gaim_conversations_get_handle();

    gaim_prefs_add_none("/plugins");
    gaim_prefs_add_none("/plugins/core");
    gaim_prefs_add_none("/plugins/core/bot");
    gaim_prefs_add_none("/plugins/core/bot/challenger");

    gaim_prefs_add_string("/plugins/core/bot/challenger/question",
                          _("How do you spell the number 10?"));
    gaim_prefs_add_string("/plugins/core/bot/challenger/answer", _("ten"));

    gaim_prefs_add_bool("/plugins/core/bot/challenger/auto_add_permit",
                        FALSE);

    gaim_signal_connect(conv_handle, "receiving-im-msg",
                        plugin, GAIM_CALLBACK(receiving_im_msg_cb), NULL);

    return TRUE;
}
Example #5
0
void init_chat_event()
{
	void *handle = gaim_wg_get_handle();

	gaim_signal_connect(gaim_conversations_get_handle(), "buddy-typing",
		handle, GAIM_CALLBACK(update_buddy_typing_cb), NULL);
	
	gaim_signal_connect(gaim_conversations_get_handle(), "buddy-typing-stopped",
		handle, GAIM_CALLBACK(update_buddy_typing_cb), NULL);

	gaim_signal_connect(gaim_conversations_get_handle(), "chat-invited",
		handle, GAIM_CALLBACK(chat_invite_request_cb), NULL);

	gaim_signal_connect(gaim_conversations_get_handle(), "chat-joined",
		handle, GAIM_CALLBACK(chat_joined_cb), NULL);

	gaim_signal_connect(gaim_conversations_get_handle(), "chat-left",
		handle, GAIM_CALLBACK(chat_joined_cb), NULL);

	gaim_signal_connect(gaim_conversations_get_handle(), "received-im-msg",
		handle, GAIM_CALLBACK(received_im_msg_cb), NULL);
}
/**************************************************************************
 * Plugin stuff
 **************************************************************************/
static gboolean
plugin_load(GaimPlugin *plugin)
{
	void *core_handle = gaim_get_core();
	void *blist_handle = gaim_blist_get_handle();
	void *conn_handle = gaim_connections_get_handle();
	void *conv_handle = gaim_conversations_get_handle();
	void *accounts_handle = gaim_accounts_get_handle();
 	void *buddy_icons_handle = gaim_buddy_icons_get_handle();

	/* Accounts subsystem signals */
	gaim_signal_connect(accounts_handle, "account-connecting",
						plugin, GAIM_CALLBACK(account_connecting_cb), NULL);
	gaim_signal_connect(accounts_handle, "account-away",
						plugin, GAIM_CALLBACK(account_away_cb), NULL);
	gaim_signal_connect(accounts_handle, "account-setting-info",
						plugin, GAIM_CALLBACK(account_setting_info_cb), NULL);
	gaim_signal_connect(accounts_handle, "account-set-info",
						plugin, GAIM_CALLBACK(account_set_info_cb), NULL);
	gaim_signal_connect(accounts_handle, "account-warned",
						plugin, GAIM_CALLBACK(account_warned_cb), NULL);

	/* Buddy Icon subsystem signals */
	gaim_signal_connect(buddy_icons_handle, "buddy-icon-cached",
						plugin, GAIM_CALLBACK(buddy_icon_cached_cb), NULL);

	/* Buddy List subsystem signals */
	gaim_signal_connect(blist_handle, "buddy-away",
						plugin, GAIM_CALLBACK(buddy_away_cb), NULL);
	gaim_signal_connect(blist_handle, "buddy-back",
						plugin, GAIM_CALLBACK(buddy_back_cb), NULL);
	gaim_signal_connect(blist_handle, "buddy-idle",
						plugin, GAIM_CALLBACK(buddy_idle_cb), NULL);
	gaim_signal_connect(blist_handle, "buddy-unidle",
						plugin, GAIM_CALLBACK(buddy_unidle_cb), NULL);
	gaim_signal_connect(blist_handle, "buddy-signed-on",
						plugin, GAIM_CALLBACK(buddy_signed_on_cb), NULL);
	gaim_signal_connect(blist_handle, "buddy-signed-off",
						plugin, GAIM_CALLBACK(buddy_signed_off_cb), NULL);
	gaim_signal_connect(blist_handle, "blist-node-extended-menu",
						plugin, GAIM_CALLBACK(blist_node_extended_menu_cb), NULL);

	/* Connection subsystem signals */
	gaim_signal_connect(conn_handle, "signing-on",
						plugin, GAIM_CALLBACK(signing_on_cb), NULL);
	gaim_signal_connect(conn_handle, "signed-on",
						plugin, GAIM_CALLBACK(signed_on_cb), NULL);
	gaim_signal_connect(conn_handle, "signing-off",
						plugin, GAIM_CALLBACK(signing_off_cb), NULL);
	gaim_signal_connect(conn_handle, "signed-off",
						plugin, GAIM_CALLBACK(signed_off_cb), NULL);

	/* Conversations subsystem signals */
	gaim_signal_connect(conv_handle, "displaying-im-msg",
						plugin, GAIM_CALLBACK(displaying_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "displayed-im-msg",
						plugin, GAIM_CALLBACK(displayed_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "writing-im-msg",
						plugin, GAIM_CALLBACK(writing_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "wrote-im-msg",
						plugin, GAIM_CALLBACK(wrote_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "sending-im-msg",
						plugin, GAIM_CALLBACK(sending_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "sent-im-msg",
						plugin, GAIM_CALLBACK(sent_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "receiving-im-msg",
						plugin, GAIM_CALLBACK(receiving_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "received-im-msg",
						plugin, GAIM_CALLBACK(received_im_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "displaying-chat-msg",
						plugin, GAIM_CALLBACK(displaying_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "displayed-chat-msg",
						plugin, GAIM_CALLBACK(displayed_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "writing-chat-msg",
						plugin, GAIM_CALLBACK(writing_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "wrote-chat-msg",
						plugin, GAIM_CALLBACK(wrote_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "sending-chat-msg",
						plugin, GAIM_CALLBACK(sending_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "sent-chat-msg",
						plugin, GAIM_CALLBACK(sent_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "receiving-chat-msg",
						plugin, GAIM_CALLBACK(receiving_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "received-chat-msg",
						plugin, GAIM_CALLBACK(received_chat_msg_cb), NULL);
	gaim_signal_connect(conv_handle, "conversation-switching",
						plugin, GAIM_CALLBACK(conversation_switching_cb), NULL);
	gaim_signal_connect(conv_handle, "conversation-switched",
						plugin, GAIM_CALLBACK(conversation_switched_cb), NULL);
	gaim_signal_connect(conv_handle, "conversation-created",
						plugin, GAIM_CALLBACK(conversation_created_cb), NULL);
	gaim_signal_connect(conv_handle, "deleting-conversation",
						plugin, GAIM_CALLBACK(deleting_conversation_cb), NULL);
	gaim_signal_connect(conv_handle, "buddy-typing",
						plugin, GAIM_CALLBACK(buddy_typing_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-buddy-joining",
						plugin, GAIM_CALLBACK(chat_buddy_joining_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-buddy-joined",
						plugin, GAIM_CALLBACK(chat_buddy_joined_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-buddy-flags",
						plugin, GAIM_CALLBACK(chat_buddy_flags_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-buddy-leaving",
						plugin, GAIM_CALLBACK(chat_buddy_leaving_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-buddy-left",
						plugin, GAIM_CALLBACK(chat_buddy_left_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-inviting-user",
						plugin, GAIM_CALLBACK(chat_inviting_user_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-invited-user",
						plugin, GAIM_CALLBACK(chat_invited_user_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-invited",
						plugin, GAIM_CALLBACK(chat_invited_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-joined",
						plugin, GAIM_CALLBACK(chat_joined_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-left",
						plugin, GAIM_CALLBACK(chat_left_cb), NULL);
	gaim_signal_connect(conv_handle, "chat-topic-changed",
						plugin, GAIM_CALLBACK(chat_topic_changed_cb), NULL);

	/* Core signals */
	gaim_signal_connect(core_handle, "quitting",
						plugin, GAIM_CALLBACK(quitting_cb), NULL);

	return TRUE;
}
Example #7
0
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();
}