--- a/ChangeLog Sat Oct 20 16:03:41 2007 -0400
+++ b/ChangeLog Sat Oct 20 16:03:50 2007 -0400
@@ -8,7 +8,7 @@
* 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 support for initial setting/unsetting of user modes to irc-more * Added the abusive findip plugin
* Fixed autoreply so it doesn't reply with an empty message (rageboy04)
@@ -23,7 +23,7 @@
* 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.
+ builds. Pidgin will have persistent conversations soon. * Fixed lack of .build, .pidgin-plugin, and Makefile.mingw for convbadger
--- a/irc-more/irc-more.c Sat Oct 20 16:03:41 2007 -0400
+++ b/irc-more/irc-more.c Sat Oct 20 16:03:50 2007 -0400
@@ -32,7 +32,8 @@
#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 SET_UMODES purple_account_get_string(account, "umodes", "i") +#define UNSET_UMODES purple_account_get_string(account, "umodes", NULL) #define PLUGIN_ID "core-plugin_pack-irc-more"
@@ -95,8 +96,8 @@
/* should this be done on a timeout? */
PurpleAccount *account = NULL;
- const gchar *nick = NULL, *modes = NULL;
+ const gchar *nick = NULL, *setmodes = NULL, *unsetmodes = NULL; + gchar *msg = NULL, *msg2 = NULL; account = purple_connection_get_account(gc);
@@ -105,12 +106,18 @@
nick = purple_connection_get_display_name(gc);
- msg = g_strdup_printf("MODE %s +%s\r\n", nick, modes);
+ unsetmodes = UNSET_UMODES; + msg = g_strdup_printf("MODE %s +%s\r\n", nick, setmodes); irc_info->send_raw(gc, msg, strlen(msg));
+ if(unsetmodes && *unsetmodes) { + msg2 = g_strdup_printf("MODE %s -%s\r\n", nick, unsetmodes); + irc_info->send_raw(gc, msg2, strlen(msg2)); @@ -238,9 +245,11 @@
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(_("User Modes On Connect"), "umodes", "i");
+ option = purple_account_option_string_new(_("Set User Modes On Connect"), "setumodes", "i"); irc_info->protocol_options = g_list_append(irc_info->protocol_options, option);
+ option = purple_account_option_string_new(_("Unset User Modes On Connect"), "unsetumodes", ""); + irc_info->protocol_options = g_list_append(irc_info->protocol_options, option);