Reminder module added.
This commit is contained in:
parent
eaab1500c4
commit
63f1aa1b30
17
modules/reminder/reminder.sh
Executable file
17
modules/reminder/reminder.sh
Executable file
@ -0,0 +1,17 @@
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
userNick="$1"
|
||||
shift
|
||||
chan="$1"
|
||||
shift
|
||||
time="$1"
|
||||
shift
|
||||
|
||||
if ! [[ "$time" =~ ^[0-9]+$ ]]; then
|
||||
reminderMessage="Times must be numeric (seconds)."
|
||||
msg "$chan" "$userNick: $reminderMessage"
|
||||
else
|
||||
msg "$chan" "ok, $userNick, reminder in $time seconds."
|
||||
reminderMessage="$@"
|
||||
sleep $time && msg "$chan" "$userNick $reminderMessage"&
|
||||
fi
|
Loading…
Reference in New Issue
Block a user