--- a/ChangeLog Wed Dec 09 00:08:47 2009 -0500
+++ b/ChangeLog Wed Dec 09 00:10:28 2009 -0500
@@ -1,3 +1,8 @@
+ * Fix IRC More plugin not properly rejoining channels. + * IRC More no longer has a preference for auto rejoin delay--default to * Add support for limiting the number of bytes of history displayed by
the Enhanced History plugin.
--- a/irc-more/irc-more.c Wed Dec 09 00:08:47 2009 -0500
+++ b/irc-more/irc-more.c Wed Dec 09 00:10:28 2009 -0500
@@ -38,9 +38,6 @@
#define PLUGIN_ID "core-plugin_pack-irc-more"
-#define PREF_PREFIX "/plugins/core/" PLUGIN_ID
-#define PREF_DELAY PREF_PREFIX "/delay"
#define MATCHES(string) !strncmp(*msg, string, sizeof(string) - 1)
static PurpleCmdId notice_cmd_id = 0;
@@ -51,7 +48,11 @@
/* So you think you can kick me? I'll show you! */
PurpleConversation *conv = data;
- char *conv_name = NULL, *command = NULL, *markup = NULL, *error = NULL;
+ const char *conv_name = NULL; + char *command = NULL, *markup = NULL, *error = NULL; + conv_name = purple_conversation_get_name(conv); command = g_strdup_printf("join %s", conv_name);
@@ -75,25 +76,29 @@
splits = g_strsplit(*incoming, " ", -1);
- PurpleAccount *account = purple_connection_get_account(gc);
- char *str = g_ascii_strdown(splits[1], -1);
+ /* if there's not at least 5 elements in the string array, this isn't a kick; ignore */ + if(g_strv_length(splits) < 5) + PurpleAccount *account = purple_connection_get_account(gc); + char *str = g_ascii_strdown(splits[1], -1); - if (strcmp(str, "kick") == 0 && splits[2] && splits[3]) {
- char *name = splits[2];
- GList *chats = purple_get_chats();
- PurpleConversation *conv = chats->data;
- if (purple_conversation_get_account(conv) == account
- && strcmp(purple_conversation_get_name(conv), name) == 0) {
- g_timeout_add(1000 * MAX(10, purple_prefs_get_int(PREF_DELAY)), show_them, conv);
+ if (strcmp(str, "kick") == 0 && splits[2] && splits[3]) { + char *name = splits[2]; + GList *chats = purple_get_chats(); + PurpleConversation *conv = chats->data; + if (purple_conversation_get_account(conv) == account + && strcmp(purple_conversation_get_name(conv), name) == 0) { + purple_timeout_add(100, show_them, conv);
@@ -271,34 +276,6 @@
-static PurplePluginPrefFrame *
-get_plugin_pref_frame(PurplePlugin *plugin)
- PurplePluginPrefFrame *frame;
- PurplePluginPref *pref;
- frame = purple_plugin_pref_frame_new();
- pref = purple_plugin_pref_new_with_name_and_label(PREF_DELAY,
- _("Seconds to wait before rejoining"));
- purple_plugin_pref_set_bounds(pref, 3, 3600);
- purple_plugin_pref_frame_add(frame, pref);
-static PurplePluginUiInfo prefs_info = {
static PurplePluginInfo info =
@@ -324,7 +301,7 @@
@@ -346,9 +323,6 @@
info.description = _("Adds additional IRC features, including a "
"customizable quit message, a customizable CTCP VERSION reply, "
"and the /notice command for notices.");
- purple_prefs_add_none(PREF_PREFIX);
- purple_prefs_add_int(PREF_DELAY, 30);
PURPLE_INIT_PLUGIN(irc_more, init_plugin, info)