소스 검색

Add script to let people check if bot knows them

Will Storey 9 년 전
부모
커밋
73db69ce8c
1개의 변경된 파일18개의 추가작업 그리고 0개의 파일을 삭제
  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"