summaryrefslogtreecommitdiffstats
path: root/decision.tcl
diff options
context:
space:
mode:
authorlookshe <mail@lookshe.org>2011-08-30 15:29:37 +0200
committerlookshe <mail@lookshe.org>2011-08-30 15:29:37 +0200
commite5fcb734ac2f85e5ff4928ee0dd0672783829ad9 (patch)
tree2a8765130eecf7861e246df1cbf9fb9f24153a54 /decision.tcl
parentb0d3b43a22fdfed5b34cc539a407318138348e68 (diff)
decision.tcl adjusted to save answers for 60 minutes
lastseen.pl messages changed
Diffstat (limited to 'decision.tcl')
-rw-r--r--decision.tcl18
1 files changed, 9 insertions, 9 deletions
diff --git a/decision.tcl b/decision.tcl
index 8b7ad94..b10abc1 100644
--- a/decision.tcl
+++ b/decision.tcl
@@ -8,8 +8,7 @@
# - first working version
#
# 1.1
-# - remember answers for 60 minutes (doesn't work atm)
-# mask arguments!
+# - remember answers for 60 minutes
bind pub - \[ proc_decision
@@ -37,7 +36,7 @@ if {[info exists do_dec($nick:$chan)]} {
}
}
- set allargs $arguments
+ set allargs [string map {" " _} $arguments]
set arguments [split $arguments]
set count 1
set klammer_count 0
@@ -61,12 +60,13 @@ if {[info exists do_dec($nick:$chan)]} {
}
set count 0
set myrand [rand $klammer_count]
- # if {[info exists do_dec($allargs)]} {
- # set myrand $do_dec($allargs)
- # } else {
- # set do_dec($allargs) $myrand
- # timer 60 "unset do_dec($allargs)"
- # }
+ if {[info exists do_dec($allargs)]} {
+ set myrand $do_dec($allargs)
+ timer 60 "unset do_dec($allargs)"
+ } else {
+ set do_dec($allargs) $myrand
+ timer 60 "unset do_dec($allargs)"
+ }
set klammer_count 0
if {$myrand == 0} {
set output "\[X"