From 985dcb2901d2527b79976df787035425294200b9 Mon Sep 17 00:00:00 2001 From: fireonlive Date: Fri, 9 Aug 2024 19:04:10 +0000 Subject: init --- atme.tcl | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 atme.tcl (limited to 'atme.tcl') diff --git a/atme.tcl b/atme.tcl new file mode 100644 index 0000000..e63ed54 --- /dev/null +++ b/atme.tcl @@ -0,0 +1,37 @@ +setudef flag nohelp + +bind pubm * "% *" atme + +proc atme {nick uhost hand chan text} { + global botnick + set target [string trim [lindex [split $text] 0] ':,'] + if {$text == ",help"} { + set target $botnick + } + if {([isbotnick $target]) || ($target == "🥚") || ($target == "🥚💧")} { + set atcmd [lindex [split $text] 1] + if {$text == ",help"} { + set atcmd "help" + } + set args [join [lrange [split $text] 2 end] " "] + switch -- $atcmd { + "hi" { + putserv "PRIVMSG $chan :hi, $nick!" + } + "help" { + puthelp "NOTICE $nick :\[help\] !tell " + puthelp "NOTICE $nick :\[help\] !seen \[-exact/-glob/-regex\] " + puthelp "NOTICE $nick :\[help\] !remind \"