summaryrefslogtreecommitdiffstats
path: root/src/irc/core/servers-idle.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:18:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 20:18:39 +0000
commitfff5217f02d91268ce90c8c05665602c059faaef (patch)
tree2ba24d32dc96eafe7ed0a85269548e76796d849d /src/irc/core/servers-idle.h
parentInitial commit. (diff)
downloadirssi-upstream.tar.xz
irssi-upstream.zip
Adding upstream version 1.4.5.upstream/1.4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/irc/core/servers-idle.h')
-rw-r--r--src/irc/core/servers-idle.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/irc/core/servers-idle.h b/src/irc/core/servers-idle.h
new file mode 100644
index 0000000..b0aed72
--- /dev/null
+++ b/src/irc/core/servers-idle.h
@@ -0,0 +1,37 @@
+#ifndef IRSSI_IRC_CORE_SERVERS_IDLE_H
+#define IRSSI_IRC_CORE_SERVERS_IDLE_H
+
+/* Add new idle command to queue */
+int server_idle_add_redir(IRC_SERVER_REC *server, const char *cmd,
+ const char *redirect_cmd, int count,
+ const char *arg, int remote,
+ const char *failure_signal, ...);
+#define server_idle_add(server, cmd) \
+ server_idle_add_redir(server, cmd, NULL, 0, NULL, 0, NULL, NULL)
+
+/* Add new idle command to first of queue */
+int server_idle_add_first_redir(IRC_SERVER_REC *server, const char *cmd,
+ const char *redirect_cmd, int count,
+ const char *arg, int remote,
+ const char *failure_signal, ...);
+#define server_idle_add_first(server, cmd) \
+ server_idle_add_first_redir(server, cmd, NULL, 0, NULL, 0, NULL, NULL)
+
+/* Add new idle command to specified position of queue */
+int server_idle_insert_redir(IRC_SERVER_REC *server, const char *cmd, int tag,
+ const char *redirect_cmd, int count,
+ const char *arg, int remote,
+ const char *failure_signal, ...);
+#define server_idle_insert(server, cmd, tag) \
+ server_idle_insert_redir(server, cmd, tag, NULL, 0, NULL, 0, NULL, NULL)
+
+/* Check if record is still in queue */
+int server_idle_find(IRC_SERVER_REC *server, int tag);
+
+/* Remove record from idle queue */
+int server_idle_remove(IRC_SERVER_REC *server, int tag);
+
+void servers_idle_init(void);
+void servers_idle_deinit(void);
+
+#endif