summaryrefslogtreecommitdiffstats
path: root/name.tcl
diff options
context:
space:
mode:
authorStefan Ritter <xeno@thehappy.de>2011-08-16 10:51:41 +0200
committerStefan Ritter <xeno@thehappy.de>2011-08-16 10:51:41 +0200
commitba46c304bdffdce0b6019a47f6759ce6abbeef90 (patch)
tree40a5b204637cb65c5bb91bd4f26a248ea498e019 /name.tcl
Initial commit
Diffstat (limited to 'name.tcl')
-rw-r--r--name.tcl20
1 files changed, 20 insertions, 0 deletions
diff --git a/name.tcl b/name.tcl
new file mode 100644
index 0000000..2d36333
--- /dev/null
+++ b/name.tcl
@@ -0,0 +1,20 @@
+# slap by lookshe
+
+bind pub - !name proc_name
+
+proc proc_name {nick host hand chan arg} {
+ #putserv "PRIVMSG $chan :[clock format [NetTime ntp.nasa.gov]]"
+ set arg [string trim $arg]
+ if {$arg == ""} {
+ set output [split "[exec cat /home/eggdrop/eggdrop/scripts/names.txt]" "\n"]
+ foreach out $output {
+ putserv "PRIVMSG $nick :$out"
+ }
+ } else {
+ exec echo $arg >> /home/eggdrop/eggdrop/scripts/names.txt
+ exec echo $arg by $nick >> /home/eggdrop/eggdrop/scripts/names_nick.txt
+ putserv "NOTICE $nick :$arg added to list"
+ }
+}
+
+putlog "name by lookshe loaded"