# Time elapsed to expire each entry, in seconds. If the nick left more than
# $dun_rejoin(time) it is assumed he/she is not going back and forth
set dun_rejoin(time) 1200
# This will hold the info : host time_of_parting old_nick channel_parted
set dun_rejoin(nicks) ""
bind join - * dun:rejoin:check
proc dun:rejoin:check {nick uhost hand channel} {
global dun_rejoin
# Check if the nick joined a channel of interest
set found ""
set chans [string tolower $dun_rejoin(chans)]
if {$chans == "*"} {set chans [string tolower [channels]]}
foreach j $chans {
if {[string tolower $channel] == $j} {
set found $j
break
}
}
if {$found == ""} {return 0}
# Check if the host has been seen already
set found -1
set host [lindex [split $uhost "@"] 1]
for {set j 0} {$j < [llength $dun_rejoin(nicks)]} {incr j 4} {
if {$host == [lindex $dun_rejoin(nicks) $j] && [string tolower $channel] == [lindex $dun_rejoin(nicks) [expr $j+3]]} {set found $j}
}
if {$found == -1} {
dun:rejoin:clean
return 0
} else {
set previous [lindex $dun_rejoin(nicks) [expr $found+1]]
set poopie [incr [expr $dun_rejoin(time)+[unixtime]] -$previous]
if {$previous > [expr $dun_rejoin(time)+[unixtime]] || $nick == [lindex $dun_rejoin(nicks) [expr $found+2]]} {
dun:rejoin:clean
return 0
} else {
puthelp "WALLCHOPS #darth :\00304$nick\003 ($uhost) rejoined $channel $poopie seconds ago Old Nick was: \00303[lindex $dun_rejoin(nicks) [expr $found+2]]"
dun:rejoin:clean
return 0
}
}
}
i'm trying to get the elapsed time to display in the msg that my eggdrop sends to the ops (wallchops). i know i'm doing sumt wrong but cant figure out what --> current error i'm getting when trying to put in the $poopie variable --> [Beholder]: [19:45] Tcl error [dun:rejoin:check]: can't read "1103072701": no such variable.
In DCC and check which line is causing the problem. Probobaly your conversion of unixtime number into the gmt, est format. Try using clock, seconds along with format.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
In DCC and check which line is causing the problem. Probobaly your conversion of unixtime number into the gmt, est format. Try using clock, seconds along with format.
Nope. He already located the line causing the problem and it's not even remotely related to what you just said. The error message is pretty unambigous.