Przeglądaj źródła

Add script to let people check if bot knows them

Will Storey 9 lat temu
rodzic
commit
73db69ce8c
1 zmienionych plików z 18 dodań i 0 usunięć
  1. 18 0
      userrec.tcl

+ 18 - 0
userrec.tcl

@@ -0,0 +1,18 @@
+# This script provides minimal Eggdrop user record manipulation in a channel.
+#
+# Primarily I'm interested in letting people know if the bot recognizes them.
+
+namespace eval ::ur {}
+
+proc ::ur::whoami {nick uhost hand chan argv} {
+	if {$hand == "*"} {
+		putserv "PRIVMSG $chan :I don't know you!"
+		return
+	}
+	putserv "PRIVMSG $chan :You're $hand"
+}
+
+setudef flag userrec
+bind pub -|- .whoami ::ur::whoami
+
+putlog "userrec.tcl (https://github.com/horgh/eggdrop-scripts/userrec.tcl) loaded"