summaryrefslogtreecommitdiff
path: root/src/core/wee-config.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-01-26 16:36:55 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-01-26 16:36:55 +0100
commit99bfdfd2ff8701126c0254c838d35c20be1af652 (patch)
tree671b0c25c275728f007d19d268388beb17e6668d /src/core/wee-config.c
parentaa41942ac19a6dd6f7f337c7b547626fb8d0d614 (diff)
downloadweechat-99bfdfd2ff8701126c0254c838d35c20be1af652.zip
Add signal "day_changed", allow date format in logger options path and mask (task #9430)
Diffstat (limited to 'src/core/wee-config.c')
-rw-r--r--src/core/wee-config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index f63fac17c..384e42e69 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -344,7 +344,7 @@ config_day_change_timer_cb (void *data, int remaining_calls)
{
struct timeval tv_time;
struct tm *local_time;
- char text_time[1024], *text_time2;
+ char text_time[256], *text_time2;
struct t_gui_buffer *ptr_buffer;
/* make C compiler happy */
@@ -374,6 +374,10 @@ config_day_change_timer_cb (void *data, int remaining_calls)
if (text_time2)
free (text_time2);
gui_add_hotlist = 1;
+
+ /* send signal "day_changed" */
+ strftime (text_time, sizeof (text_time), "%Y-%m-%d", local_time);
+ hook_signal_send ("day_changed", WEECHAT_HOOK_SIGNAL_STRING, text_time);
}
config_day_change_old_day = local_time->tm_mday;