--- a/ChangeLog Tue Sep 04 20:57:32 2007 -0400
+++ b/ChangeLog Tue Sep 04 20:58:26 2007 -0400
@@ -2,6 +2,11 @@
* 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)
+ * Added support for initial user modes to irc-more + * Added the abusive findip plugin + * 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. * Fixed a crash in Slashexec that has only shown itself when using the
Offline Message Emulation plugin to emulate an offline message at the
same time as Slashexec is loaded.
--- a/ignore/ignore.c Tue Sep 04 20:57:32 2007 -0400
+++ b/ignore/ignore.c Tue Sep 04 20:58:26 2007 -0400
@@ -58,6 +58,7 @@
+ char *lower_case_username; string = g_string_new(PREF_ROOT);
string = g_string_append_c(string, '/');
@@ -66,8 +67,10 @@
purple_prefs_add_none(string->str);
string = g_string_append_c(string, '/');
string = g_string_append(string, purple_account_get_username(account));
- if (!purple_prefs_exists(string->str))
- purple_prefs_add_none(string->str);
+ lower_case_username = g_ascii_strdown(string->str, string->len); + if (!purple_prefs_exists(lower_case_username)) + purple_prefs_add_none(lower_case_username); + g_free(lower_case_username); string = g_string_append_c(string, '/');
string = g_string_append(string, name);
pref = g_ascii_strdown(string->str, string->len);
--- a/irc-more/irc-more.c Tue Sep 04 20:57:32 2007 -0400
+++ b/irc-more/irc-more.c Tue Sep 04 20:58:26 2007 -0400
@@ -32,6 +32,7 @@
#define CTCP_REPLY purple_account_get_string(account, "ctcp-message", "Purple IRC")
#define PART_MESSAGE purple_account_get_string(account, "part-message", "Leaving.")
#define QUIT_MESSAGE purple_account_get_string(account, "quit-message", "Leaving.")
+#define UMODES purple_account_get_string(account, "umodes", "i") #define PLUGIN_ID "core-plugin_pack-irc-more"
@@ -89,6 +90,25 @@
+signed_on_cb(PurpleConnection *gc) + /* should this be done on a timeout? */ + PurpleAccount *account = NULL; + gchar *nick = NULL, *modes = NULL, *msg = NULL; + account = purple_connection_get_account(gc) + nick = purple_connection_get_display_name(gc); + msg = g_strdup_printf("MODE %s +%s\r\n", nick, modes); + irc_info->send_raw(gc, msg, strlen(msg)); notice_cmd_cb(PurpleConversation *conv, const gchar *cmd, gchar **args,
gchar **error, void *data)
@@ -130,8 +150,11 @@
irc_info->send_raw(gc, msg, len);
+ /* avoid a possible double-free crash */
return PURPLE_CMD_RET_OK;
@@ -171,6 +194,7 @@
PurplePlugin *prpl = NULL;
PurpleAccountOption *option;
gchar *notice_help = NULL;
+ void *gc_handle = NULL; prpl = purple_find_prpl("prpl-irc");
@@ -185,21 +209,31 @@
PURPLE_CMD_FLAG_IM | PURPLE_CMD_FLAG_CHAT | PURPLE_CMD_FLAG_PRPL_ONLY,
"prpl-irc", notice_cmd_cb, notice_help, NULL);
+ /* 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(_("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(_("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(_("User Modes On Connect"), "umodes", "i"); + irc_info->protocol_options = g_list append(irc_info->protocol_options, option); --- a/listhandler/purple_blist_xml.c Tue Sep 04 20:57:32 2007 -0400
+++ b/listhandler/purple_blist_xml.c Tue Sep 04 20:58:26 2007 -0400
@@ -48,6 +48,11 @@
+/***************************************************************************** + ****************************************************************************/ +static GList *infolist = NULL; +static GList *accountlist = NULL; /*****************************************************************************
@@ -79,20 +84,19 @@
/*****************************************************************************
****************************************************************************/
-lh_pbx_import_target_request(GList *l)
+lh_pbx_find_accounts(void)
lh_pbx_import_file_parse(const char *file)
LhPbxInfo tmpinfo = NULL;
@@ -103,7 +107,7 @@
purple_debug_error("listhandler: import: blist.xml", "Error reading %s: %s\n",
file ? file : "(null)", error->message ? error->message : "(null)");
/* if we get here, we have the file's contents--parse into xmlnode tree */
@@ -157,12 +161,22 @@
- list = g_list_prepend(list, tmpinfo);
+ infolist = g_list_prepend(infolist, tmpinfo);
+/***************************************************************************** + ****************************************************************************/ +lh_pbx_import_target_request(void) @@ -172,7 +186,10 @@
purple_debug_info("listhandler: import", "In request callback\n");
- lh_pbx_import_target_request(lh_pbx_file_parse(file));
+ lh_pbx_file_parse(file); + lh_pbx_find_accounts(); + lh_pbx_import_target_request();