summaryrefslogtreecommitdiff
path: root/irc
diff options
context:
space:
mode:
authortilpner2018-08-12 21:08:17 +0200
committertilpner2018-08-12 21:08:17 +0200
commitcf45a5bb476f45e781f371251639707c587f4248 (patch)
tree5bfe55297f08e09264283e44e9c7b36ea4ef6fb5 /irc
parentfe319cfcad097dd382e4c3b7d6a6b08777eb2721 (diff)
downloadmeep-cf45a5bb476f45e781f371251639707c587f4248.tar.gz
meep-cf45a5bb476f45e781f371251639707c587f4248.tar.xz
meep-cf45a5bb476f45e781f371251639707c587f4248.zip
Add ability to ignore users
Diffstat (limited to 'irc')
-rw-r--r--irc/command.rkt13
1 files changed, 13 insertions, 0 deletions
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))