pidgin/purple-plugin-pack

merge of '6c5c4715628871c167ac5030cee9f7e3aef58c9b'
org.guifications.plugins
2007-10-15, grim
3970d0f39550
merge of '6c5c4715628871c167ac5030cee9f7e3aef58c9b'
and 'c76926b30d2cb7417e6c8335f4e8fbae9036e9c3'
--- a/ChangeLog Mon Oct 15 00:15:54 2007 -0400
+++ b/ChangeLog Mon Oct 15 00:16:02 2007 -0400
@@ -1,11 +1,15 @@
Version 2.2.0mtn:
* Merged autorejoin into irc-more. No prefs migration will take place.
- You will need to reconfigure the delay yourself.
- * Slashexec's '/exec command' and '!command' are now optional (QuLogic)
+ You will need to reconfigure the delay yourself. Autorejoin no longer
+ exists.
+ * Autoreply now can be disabled per-account (rageboy04)
* Listhandler now supports restoring a buddy list from a backed-up
blist.xml file created by backing up ~/.purple.
+ * Slashexec's '/exec command' and '!command' are now optional (QuLogic)
* Added support for initial user modes to irc-more
* Added the abusive findip plugin
+ * Added infopane plugin
+ * Fixed autoreply so it doesn't reply with an empty message (rageboy04)
* Fixed a crash in ignore where a nickname that is not all lowercase
causes unintended behavior resulting in a crash (rageboy04, qwert)
* Fixed a possible double-free crash in /notice support in irc-more.
@@ -15,6 +19,7 @@
* Fixed the version number for highlight and ignore so they show the
correct Plugin Pack version instead of the version of Pidgin they were
built against.
+ * Fixed building with ancient glib. (Bodo Bellut)
* Removed the .build file from hideconv to remove it from default
builds. Pidgin 2.2.1 will have persistent conversations.
--- a/autoreply/autoreply.c Mon Oct 15 00:15:54 2007 -0400
+++ b/autoreply/autoreply.c Mon Oct 15 00:16:02 2007 -0400
@@ -56,6 +56,7 @@
struct _AutoReplyProtocolOptions {
PurpleAccountOption *message;
+ PurpleAccountOption *off;
};
typedef enum
@@ -87,31 +88,31 @@
reply = purple_savedstatus_get_message(purple_savedstatus_get_current());
}
- if (!reply && buddy)
+ if ((!reply || !*reply) && buddy)
{
/* Is there any special auto-reply for this buddy? */
reply = purple_blist_node_get_string((PurpleBlistNode*)buddy, "autoreply");
- if (!reply && PURPLE_BLIST_NODE_IS_BUDDY((PurpleBlistNode*)buddy))
+ if ((!reply || !*reply) && PURPLE_BLIST_NODE_IS_BUDDY((PurpleBlistNode*)buddy))
{
/* Anything for the contact, then? */
reply = purple_blist_node_get_string(((PurpleBlistNode*)buddy)->parent, "autoreply");
}
}
- if (!reply)
+ if (!reply || !*reply)
{
/* Is there any specific auto-reply for this account? */
reply = purple_account_get_string(account, "autoreply", NULL);
}
- if (!reply)
+ if (!reply || !*reply)
{
/* Get the global auto-reply message */
reply = purple_prefs_get_string(PREFS_GLOBAL);
}
- if (*reply == ' ')
+ if (*reply == ' ' || *reply == '\0')
reply = NULL;
if (!reply && use_status == STATUS_FALLBACK)
@@ -139,6 +140,10 @@
if (flags & PURPLE_MESSAGE_AUTO_RESP)
return;
+ if(purple_account_get_bool(account, "ar_off", FALSE))
+ return;
+
+
g_return_if_fail(purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_IM);
presence = purple_account_get_presence(account);
@@ -149,7 +154,7 @@
trigger = TRUE;
if (!trigger)
- return;
+ return;
buddy = purple_find_buddy(account, who);
reply = get_autoreply_message(buddy, account);
@@ -226,7 +231,7 @@
get_autoreply_message(buddy, account), TRUE, FALSE,
(gc->flags & PURPLE_CONNECTION_HTML) ? "html" : NULL,
_("_Save"), G_CALLBACK(set_auto_reply_cb),
- _("_Cancel"), NULL,
+ _("_Cancel"), NULL,
account, purple_buddy_get_name(buddy), NULL, node);
g_free(message);
}
@@ -252,13 +257,16 @@
{
AutoReplyProtocolOptions *arpo;
PurplePluginProtocolInfo *info = PURPLE_PLUGIN_PROTOCOL_INFO(plg);
-
+
arpo = g_new(AutoReplyProtocolOptions, 1);
arpo->message = purple_account_option_string_new(_("Autoreply message"),
"autoreply", NULL);
+ arpo->off = purple_account_option_bool_new(_("Turn off autoreply"),
+ "ar_off", FALSE);
info->protocol_options = g_list_append(info->protocol_options,
arpo->message);
+ info->protocol_options = g_list_append(info->protocol_options, arpo->off);
if (!g_hash_table_lookup(options, plg))
g_hash_table_insert(options, plg, arpo);
@@ -273,7 +281,7 @@
if(!arpo)
return;
-
+
/*
* 22:55 < sadrul> grim: the check when removing is required, iirc, when
* pidgin quits, and a prpl is unloaded before the plugin
@@ -282,9 +290,14 @@
{
info->protocol_options = g_list_remove_link(info->protocol_options, l);
purple_account_option_destroy(arpo->message);
- g_hash_table_remove(options, plg);
+ }
+ if ((l = g_list_find(info->protocol_options, arpo->off)))
+ {
+ info->protocol_options = g_list_remove_link(info->protocol_options, l);
+ purple_account_option_destroy(arpo->off);
}
+ g_hash_table_remove(options, plg);
g_free(arpo);
}
@@ -322,7 +335,7 @@
add_options_for_protocol(list->data);
list = list->next;
}
-
+
return TRUE;
}
@@ -382,7 +395,7 @@
pref = purple_plugin_pref_new_with_name_and_label(PREFS_USESTATUS,
_("Autoreply with status message"));
purple_plugin_pref_set_type(pref, PURPLE_PLUGIN_PREF_CHOICE);
- purple_plugin_pref_add_choice(pref, _("Never"),
+ purple_plugin_pref_add_choice(pref, _("Never"),
GINT_TO_POINTER(STATUS_NEVER));
purple_plugin_pref_add_choice(pref, _("Always when there is a status message"),
GINT_TO_POINTER(STATUS_ALWAYS));
--- a/configure.ac Mon Oct 15 00:15:54 2007 -0400
+++ b/configure.ac Mon Oct 15 00:16:02 2007 -0400
@@ -1,4 +1,4 @@
-AC_INIT([purple-plugin_pack], [2.2.0mtn], [guifications-devel@lists.sourceforge.net])
+AC_INIT([purple-plugin_pack], [2.2.0mtn], [plugins-devel@lists.guifications.org])
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(pre_config.h)
--- a/eight_ball/eight_ball.c Mon Oct 15 00:15:54 2007 -0400
+++ b/eight_ball/eight_ball.c Mon Oct 15 00:16:02 2007 -0400
@@ -62,7 +62,8 @@
"thats nots really nice",
"Oh I at all do not understand a pancake about what you here talk.",
"it shall be visible will be?",
- "it becomes a complex rainbow of confusion."
+ "it becomes a complex rainbow of confusion.",
+ "dont sent any message any more stupit n idiot"
};
static PurpleCmdId eight_ball_cmd_id = 0,
--- a/infopane/Makefile.am Mon Oct 15 00:15:54 2007 -0400
+++ b/infopane/Makefile.am Mon Oct 15 00:16:02 2007 -0400
@@ -1,4 +1,7 @@
-EXTRA_DIST = .pidgin-plugin Makefile.mingw .build
+EXTRA_DIST = \
+ .pidgin-plugin \
+ Makefile.mingw \
+ .build
infopanedir = $(PIDGIN_LIBDIR)