egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

!banlist times, from unix-time to normal?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
CP-Geek
Voice


Joined: 25 Sep 2005
Posts: 3

PostPosted: Sun Sep 25, 2005 3:40 pm    Post subject: !banlist times, from unix-time to normal? Reply with quote

I'm running 1.16.17 botnet with two bots, all working like a charm. Well, almost. When I do !banlist I get the list of bans (ftom channel.user) with unix-time when they were set, how could this be altered to "normal" time?

CP-Geek Smile
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 25, 2005 3:50 pm    Post subject: Reply with quote

Use the [ctime] command, example:
Code:
ctime [unixtime]

will return the current date.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Sun Sep 25, 2005 3:50 pm    Post subject: Reply with quote

[ctime]
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
CP-Geek
Voice


Joined: 25 Sep 2005
Posts: 3

PostPosted: Mon Sep 26, 2005 7:17 am    Post subject: Reply with quote

I'm having some trouble to figure out where ctime should me put, this is the !banlist-section of chan.tcl:

Code:
#banlist
proc pub_do_bans {nick uhost hand chan text} { 
     puthelp "NOTICE $nick : Ban List for $chan." 
foreach {a b c d} [banlist $chan] { 
     puthelp "NOTICE $nick :- [format %-12s%-12s%-12s%-12s $a $b $c $d]"
     }
     puthelp "NOTICE $nick : Ban List for $chan Completed."
}
#end of banlist


Ideas?
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Sep 26, 2005 8:54 pm    Post subject: Reply with quote

You'll have to convert the unixtime in each variable. i.e.
Code:
[string map [list [lindex $a 3] [ctime [lindex $a 3]]] $a]

(this should be applied on $b, $c and $d as well)
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
CP-Geek
Voice


Joined: 25 Sep 2005
Posts: 3

PostPosted: Mon Sep 26, 2005 10:58 pm    Post subject: Reply with quote

Humble hank You's, works like a charm!

CP-Geek Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber