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.

!banlist times, from unix-time to normal?

Old posts that have not been replied to for several years.
Locked
C
CP-Geek
Voice
Posts: 3
Joined: Sun Sep 25, 2005 3:34 pm

!banlist times, from unix-time to normal?

Post by CP-Geek »

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 :)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Use the [ctime] command, example:

Code: Select all

ctime [unixtime]
will return the current date.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

[ctime]
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use

Code: Select all

 tag when posting logs, code
C
CP-Geek
Voice
Posts: 3
Joined: Sun Sep 25, 2005 3:34 pm

Post by CP-Geek »

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

Code: Select all

#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?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You'll have to convert the unixtime in each variable. i.e.

Code: Select all

[string map [list [lindex $a 3] [ctime [lindex $a 3]]] $a]
(this should be applied on $b, $c and $d as well)
C
CP-Geek
Voice
Posts: 3
Joined: Sun Sep 25, 2005 3:34 pm

Post by CP-Geek »

Humble hank You's, works like a charm!

CP-Geek :)
Locked