summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authortilpner2018-08-12 21:17:04 +0200
committertilpner2018-08-12 21:17:04 +0200
commitc92f41c9edb8546da266923b22182346d9526e75 (patch)
treed4bdb6278a2b9dbc1b13a3880d5738e80a34f3df /modules
parentd68749e6d31beffe45b6230f6b1428e79ceadb57 (diff)
downloadmeep-c92f41c9edb8546da266923b22182346d9526e75.tar.gz
meep-c92f41c9edb8546da266923b22182346d9526e75.tar.xz
meep-c92f41c9edb8546da266923b22182346d9526e75.zip
Add (power) and (user-get) commands
Diffstat (limited to 'modules')
-rw-r--r--modules/3-store.rkt11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/3-store.rkt b/modules/3-store.rkt
new file mode 100644
index 0000000..aa44169
--- /dev/null
+++ b/modules/3-store.rkt
@@ -0,0 +1,11 @@
+#lang racket/base
+(require irc/bot irc/command irc/storage irc/users
+ racket/format)
+
+(define-command (power)
+ #:help "Displays your registered power level"
+ (reply (~a (user-power (source)))))
+
+(define-command (user-get path)
+ #:power 2
+ (reply (~s (apply ref (user-storage (source)) path))))