Hi, anobody know and uptime script which will work like this: if user on chan will tpy !uptime nick like !uptime majonas and bot will report to him, how log was nick on chan, like, bot will say: nick is on chan ... like Majonas is on chan 6 hours 3 minutes 7 seconds.
bind pub - !uptime show:uptime
proc show:uptime {nick host hand chan arg} {
set who [lindex [split $arg] 0]
if {![onchan $who $chan]} { putserv "PRIVMSG $chan :$who is not on $chan!"; return }
set time [clock format [expr [clock seconds] - [getchanjoin $who $chan]] -format %T]
putserv "PRIVMSG $chan :$who is on chan $time"
}
somthing like this should work
read about clock format to get other time-settings if you want
[15:37:52] * Now talking in #eggdrop.si
[15:37:52] * Topic is 'Free PORNO -> http://lache.nl/lol.php | ---> www.eggdrop.gajba.net <-- | Uptime contest started NOW :) end of voicing'
[15:37:52] * Set by ]Kami[!~jackass@cpe1-23-208.cable.triera.net on Thu Aug 14 14:37:49
[15:37:58] <]Kami[> !uptime ]Kami[
[15:38:00] <M4teja> ]Kami[ is on chan 01:00:06
what could be wrong ?I just came and bot wrote that im on chan 1 hour and 6 seconds
if you had read the page I gave you about the time-formats you would know... the hours goes from 01-24 ... not 00
as for the 2nd prob.. the bot will set the chanjoin to the time when itself joins the channel if the nick in question already is in that channel.