pidgin/purple-plugin-pack

Remove the irssi new year easter egg

4 months ago, Gary Kramlich
321b85e19728
Parents 3fae9e3d6b55
Children 2574eca49bce
Remove the irssi new year easter egg

Testing Done:
Just a compile test.

Reviewed at https://reviews.imfreedom.org/r/31/
--- a/irssi/datechange.c Tue Jul 14 22:47:04 2020 -0500
+++ b/irssi/datechange.c Tue Jul 14 22:49:11 2020 -0500
@@ -67,7 +67,7 @@
GList *l = NULL;
gint day = 0, month = 0;
gchar buff[80];
- gchar *message = NULL, *new_year = NULL;
+ gchar *message = NULL;
if(!irssi_datechange_get_day_and_month(&t, &day, &month))
return TRUE;
@@ -81,9 +81,6 @@
if(!l)
return TRUE;
- if(day == 1 && month == 0 && purple_prefs_get_bool(SENDNEWYEAR_PREF))
- new_year = g_strdup(_("Happy New Year!"));
-
strftime(buff, sizeof(buff), "%d %b %Y", localtime(&t));
message = g_strdup_printf(_("Day changed to %s"), buff);
@@ -93,24 +90,9 @@
purple_conversation_write(conv, NULL, message,
PURPLE_MESSAGE_NO_LOG | PURPLE_MESSAGE_SYSTEM | PURPLE_MESSAGE_ACTIVE_ONLY,
t);
-
- if(new_year) {
- switch (purple_conversation_get_type(conv))
- {
- case PURPLE_CONV_TYPE_IM:
- purple_conv_im_send(PURPLE_CONV_IM(conv), new_year);
- break;
- case PURPLE_CONV_TYPE_CHAT:
- purple_conv_chat_send(PURPLE_CONV_CHAT(conv), new_year);
- break;
- default:
- break;
- }
- }
}
g_free(message);
- g_free(new_year);
return TRUE;
}
--- a/irssi/irssi.c Tue Jul 14 22:47:04 2020 -0500
+++ b/irssi/irssi.c Tue Jul 14 22:49:11 2020 -0500
@@ -67,9 +67,6 @@
pref = purple_plugin_pref_new_with_name_and_label(DATECHANGE_PREF, _("Date Change Notification"));
purple_plugin_pref_frame_add(frame, pref);
- pref = purple_plugin_pref_new_with_name_and_label(SENDNEWYEAR_PREF, _("Happy New Year Message"));
- purple_plugin_pref_frame_add(frame, pref);
-
return frame;
}
@@ -139,7 +136,6 @@
purple_prefs_add_none(PREFS_ROOT);
purple_prefs_add_bool(TEXTFMT_PREF, TRUE);
purple_prefs_add_bool(DATECHANGE_PREF, TRUE);
- purple_prefs_add_bool(SENDNEWYEAR_PREF, TRUE);
}
PURPLE_INIT_PLUGIN(PLUGIN_STATIC_NAME, irssi_init, irssi_info)
--- a/irssi/irssi.h Tue Jul 14 22:47:04 2020 -0500
+++ b/irssi/irssi.h Tue Jul 14 22:49:11 2020 -0500
@@ -31,7 +31,6 @@
#define PREFS_ROOT "/pidgin/plugins/" PLUGIN_ID
#define TEXTFMT_PREF PREFS_ROOT "/textfmt"
#define DATECHANGE_PREF PREFS_ROOT "/datechange"
-#define SENDNEWYEAR_PREF PREFS_ROOT "/happynewyear"
#include "datechange.h"
#include "lastlog.h"