decision.tcl adjusted to save answers for 60 minutes

lastseen.pl messages changed
This commit is contained in:
lookshe 2011-08-30 15:29:37 +02:00
parent b0d3b43a22
commit e5fcb734ac
2 changed files with 13 additions and 13 deletions

View file

@ -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"

View file

@ -43,16 +43,16 @@ while ($line=$log->readline()){
($reason=$by)=~s/.*: (.*)\n/$1/;
$by=~s/:.*\n//i;
print "$nick kicked by $by on $date at $time reason: $reason\n";
print "$nick was kicked by $by on $date at $time reason: $reason\n";
} elsif ($lastaction=~m/$nick \(.*\) left irc: /i){
($message=$lastaction)=~s/^.* $nick \(.*\) left irc: (.*)\n/$1/i;
print "$nick quits on $date at $time saying: $message\n";
print "$nick has quit on $date at $time saying: $message\n";
} else {
if ($lastaction=~m/\)\.$/) {
($message=$lastaction)=~s/^.* $nick \(.*\) left #[a-zA-Z0-9]* \((.*)\)\.\n/$1/i;
print "$nick parts on $date at $time saying: $message\n";
print "$nick has left on $date at $time saying: $message\n";
} else {
print "$nick parts on $date at $time\n";
print "$nick has left on $date at $time\n";
}
}
exit 0;