+def set_timer():
+ # Update timer hook with new interval. 0 means deactivated
+ global TIMER
+ if TIMER:
+ weechat.unhook(TIMER)
+ if int(weechat.config_get_plugin('interval')) >= 1:
+ TIMER = weechat.hook_timer(int(weechat.config_get_plugin('interval')) * 1000,0, 0, "timer_dummy_cb", '')
+
+def timer_dummy_cb(data, remaining_calls):
+ # hook_timer() has two arguments, hook_signal() needs three arguments
+ bar_item_update_cb("","","")
+ return weechat.WEECHAT_RC_OK
+