From cf45a5bb476f45e781f371251639707c587f4248 Mon Sep 17 00:00:00 2001 From: tilpner Date: Sun, 12 Aug 2018 21:08:17 +0200 Subject: Add ability to ignore users --- irc/command.rkt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/irc/command.rkt b/irc/command.rkt index 30f9830..6aa4b04 100644 --- a/irc/command.rkt +++ b/irc/command.rkt @@ -73,3 +73,16 @@ (reply (~s cr)))) (reply "There is no such command"))) (reply "You need to supply a command name, e.g. (help list)"))) + +(define-command (ignore-add nick) + #:power 2 + (hash-set! (network-storage "ignore") nick #t) + (persist-network "ignore")) + +(define-command (ignore-del nick) + #:power 2 + (hash-remove! (network-storage "ignore") nick) + (persist-network "ignore")) + +(define (ignored? nick) + (hash-has-key? (network-storage "ignore") nick)) -- cgit v1.2.3