summaryrefslogtreecommitdiffstats
path: root/pong.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 /pong.tcl
Initial commit
Diffstat (limited to 'pong.tcl')
-rw-r--r--pong.tcl34
1 files changed, 34 insertions, 0 deletions
diff --git a/pong.tcl b/pong.tcl
new file mode 100644
index 0000000..73eee2f
--- /dev/null
+++ b/pong.tcl
@@ -0,0 +1,34 @@
+# description: little funny ping-pong script, everyone knows this joke from irc, bot can kick you or just answer you
+
+# Author: Tomekk
+# e-mail: tomekk/@/oswiecim/./eu/./org
+# home page: http://tomekk.oswiecim.eu.org/
+#
+# Version 0.1
+#
+# This file is Copyrighted under the GNU Public License.
+# http://www.gnu.org/copyleft/gpl.html
+
+bind pub - !ping ping_fct
+
+# 0 - answer 'pong', 1 - kick with 'pong' ;-)
+set fun "0"
+
+proc ping_fct { nick uhost hand chan arg } {
+ global fun
+
+ set txt [split $arg]
+
+ set pongle [join [lrange $txt 0 end]]
+
+ if {$pongle == ""} {
+
+ if {$fun == "0"} {
+ putquick "PRIVMSG $chan :ping? pong!"
+ } {
+ putkick $chan Pong!
+ }
+ }
+}
+
+putlog "tkpingpong.tcl ver 0.1 by Tomekk loaded"