• Publicity: Public Only All

includelet-procs.tcl

Definition of includelets for xolirc Integration for displaying eggdrop ( log2thml ) logs

Location:
packages/xolirc/tcl/includelet-procs.tcl
Created:
2009-10-05
Author:
Victor Guerra <vguerra@vguerra.net>
CVS Identification:
$Id$

Procedures in this file

Detailed information

[ hide source ] | [ make this the default ]

Content File Source

# packages/xolirc/tcl/includelet-procs.tcl

ad_library {
    
    Definition of includelets for xolirc 
    Integration for displaying eggdrop ( log2thml ) logs
    
    @author Victor Guerra (vguerra@vguerra.net)
    @creation-date 2009-10-05
    @cvs-id $Id$
}

::xo::library require -package xowiki form-field-procs

namespace eval ::xowiki::includelet {
    
    ::xowiki::IncludeletClass create current-irc-log \
    -superclass ::xowiki::Includelet \
    -parameter {
        {__decoration plain}
        {parameter_declaration {
        {-date ""}
        }}
    }
     
    current-irc-log instproc render {} {
    set now [clock format [clock seconds] -format "%Y%m%d"]
    set content [[my package_id] get-html-from-log -date $now]
    if { $content eq "" } {
        return "Nothing has been logged yet for the date [clock format [clock seconds] -format %d-%b-%Y]"
    }    
    return "<p>Current conversation - [clock format [clock seconds] -format %d-%b-%Y]</p>$content"
    }
}