+
+ if [[ $count -eq 0 ]]; then
+ send_privmsg $channel "There are currently no reminders set, use add to add one."
+ fi
+}
+
+del_reminder() {
+ channel="$1"
+ md5todelete="$2"
+ found=0
+ for tsmd5 in ${!reminders[@]}; do
+ md5sum=${tsmd5#*-}
+ if [[ "$md5sum" == "$md5todelete" ]]; then
+ ts=${tsmd5%-*}
+ date_stamp="$(date --date="@$ts" +"%Y-%m-%d %H:%M %Z")"
+ send_privmsg $channel "Removed reminder [$md5sum] $date_stamp ${reminders[$tsmd5]}"
+ unset "reminders[$tsmd5]"
+ found=1
+ fi
+ done
+ if [[ $found -eq 0 ]]; then
+ send_privmsg $channel "Couldn't find reminder $md5todelete"
+ fi