This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Uptime

Old posts that have not been replied to for several years.
Locked
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Uptime

Post by ]Kami[ »

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.

Greetings :D
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

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
Elen sila lúmenn' omentielvo
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

TNX ! :D , but i dont get it i rejoin chan then i wrote !uptime ]Kami[ look what heappend :

Code: Select all

[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
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

Just little add:

Code: Select all

[16:07:18] * Joins: AiRV|aT1 (goran@my.host.is.afraid.org)
[16:07:34] <]Kami[> !uptime AiRV|aT1
[16:07:35] <M4teja> AiRV|aT1 is on chan 01:00:18
bot said like he will be on chan one hour, but he just came.And for another man who was on chan 18 hours:

Code: Select all

[16:08:31] <]Kami[> !uptime vesoljcek
[16:08:33] <M4teja> vesoljcek is on chan 04:01:14
What could be wrong .... :roll:

Greeting
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

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.
Elen sila lúmenn' omentielvo
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

TNX
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

I GOT IT !

This script show time of the day, not uptime of users on chan :lol: , Somebody know such script which will show user uptime on chan ?

TNX anyway Papillon :wink:
Locked