From 850f96b986f5f12926608b2d797733422e539deb Mon Sep 17 00:00:00 2001
From: Alienmario <daniel321321@gmail.com>
Date: Fri, 3 Mar 2023 06:28:42 +0100
Subject: [PATCH] Allow void return type in timer callbacks (#1916)

---
 plugins/include/timers.inc | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/plugins/include/timers.inc b/plugins/include/timers.inc
index c5fbf9d7..e74d9beb 100644
--- a/plugins/include/timers.inc
+++ b/plugins/include/timers.inc
@@ -54,17 +54,36 @@ typeset Timer
 	 * @param data          Handle or value passed to CreateTimer() when timer was created.
 	 * @return              Plugin_Stop to stop a repeating timer, any other value for
 	 *                      default behavior.
+	 *                      Ignored for non-repeating timers (use void return type).
 	 */
 	function Action(Handle timer, any data);
 
+	/**
+	 * Called when the timer interval has elapsed.
+	 * For repeating timers, use the callback with return value.
+	 *
+	 * @param timer         Handle to the timer object.
+	 * @param data          Handle or value passed to CreateTimer() when timer was created.
+	 */
+	function void(Handle timer, any data);
+
 	/**
 	 * Called when the timer interval has elapsed.
 	 *
 	 * @param timer         Handle to the timer object.
 	 * @return              Plugin_Stop to stop a repeating timer, any other value for
 	 *                      default behavior.
+	 *                      Ignored for non-repeating timers (use void return type).
 	 */
 	function Action(Handle timer);
+	
+	/**
+	 * Called when the timer interval has elapsed.
+	 * For repeating timers, use the callback with return value.
+	 *
+	 * @param timer         Handle to the timer object.
+	 */
+	function void(Handle timer);
 };
 
 /**