summaryrefslogtreecommitdiff
path: root/lib/send.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/send.sh')
-rw-r--r--lib/send.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/send.sh b/lib/send.sh
index 2b3d488..accdc5f 100644
--- a/lib/send.sh
+++ b/lib/send.sh
@@ -176,3 +176,13 @@ send_quit() {
[[ -n "$1" ]] && reason=" :$1"
send_raw_flood "QUIT${reason}"
}
+
+send_ipc_msg()
+{
+ local delay_secs=$1 ; shift ;
+ local delivery_time=$(( $(date +%s) + ${delay_secs} ))
+ local message=$*
+
+ echo "${delivery_time},${IPC_NOTICE_CHANNEL},${message}" >> "${IPC_STORE_FILE}"
+ sort -o "${IPC_STORE_FILE}" "${IPC_STORE_FILE}"
+}