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 

WebBanList.tcl by Wcc

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Sun Feb 10, 2008 7:09 pm    Post subject: can helpe with this tcl webbanlist Reply with quote

i used this tcl weBbanlist.tcl

Code:

##################################
### WebBanList.tcl             ###
### Version 1.1                ###
### By Wcc                     ###
### wcc@techmonkeys.org        ###
### http://www.dawgtcl.com:81/ ###
### EFnet #|DAWG|Tcl           ###
##################################

############################################################################
### Copyright © 2000 - 2002 |DAWG| Scripting Group. All rights reserved. ###
############################################################################

##############################################################################
## This script generates a web page listing all global and channel bans in  ##
## the bot's banlist.                                                       ##
##############################################################################

##########################################################
## Just load the script, edit the settings, and rehash. ##
##########################################################

######################################################################
# Set here the path to the DAWG template file you would like to use. #
# You can obtain templates by visiting http://dawg.oc255.net:81/ and #
# clicking the templates link.                                       #
######################################################################

set webbanlist_setting(tpl) "./scripts/WebBanList_DAWG.tpl"

##########################################
# Set the filename of the web page here. #
##########################################

set webbanlist_setting(page) "../web/banlist.html"

####################
# Code begins here #
####################

if {![string match 1.6.* $version]} { putlog "\002WEBBANLIST:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." }
if {[info tclversion] < 8.2} { putlog "\002WEBBANLIST:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." }

bind time - "*0 * * * *" webbanlist_createhtml
bind time - "*5 * * * *" webbanlist_createhtml

set webbanlist_setting(version) "1.1"
set webbanlist_notpl 0

if {![info exists webbanlist_setting(tpl)] || [catch {source $webbanlist_setting(tpl)}]} {
   putlog "\002WEBBANLIST:\002 The template file could not be opened; using default."
   set webbanlist_notpl 1
}
foreach {s v} [list Page_CC #000000 Page_HC #000000 Page_LinkC #0000FF Page_TTextC #000000 Page_TextC #000000 Page_BGC \
   #FFFFFF Page_TCC_2 #E0E0E0 Page_TCC_1 #C0C0C0 Page_THC_2 #8080E0 Page_THC_1 #8080C0 Page_TCS 4 Page_THS 5 Page_TitleS 6 \
   Page_Title {Ban List} Page_TitleTag {Ban List} Page_Img {}] {
   if {$webbanlist_notpl || ![info exists webbanlist_setting($s)]} { set webbanlist_setting($s) $v  }
}
proc webbanlist_format_td {type line center text} {
   switch -- $type {
      "title" { return "<font size=\"$::webbanlist_setting(Page_THS)\" color=\"$::webbanlist_setting(Page_TextC)\">[expr ($center)?{<center>}:{}]$text[expr ($center)?{</center>}:{}]</font>" }
      "header" { return "<td align=\"left\" bgcolor=\"$::webbanlist_setting(Page_THC_${line})\"><font size=\"$::webbanlist_setting(Page_THS)\" color=\"$::webbanlist_setting(Page_HC)\">[expr ($center)?{<center>}:{}]$text[expr ($center)?{</center>}:{}]</font></td>" }
      "cell" { return "<td align=\"left\" bgcolor=\"$::webbanlist_setting(Page_TCC_${line})\"><font size=\"$::webbanlist_setting(Page_TCS)\" color=\"$::webbanlist_setting(Page_CC)\">[expr ($center)?{<center>}:{}]$text[expr ($center)?{</center>}:{}]</font></td>" }
   }
}
proc webbanlist_timedate {unixtime} {
   if {$unixtime == 0} { return "Never" }
   return [clock format $unixtime -format {%I:%M %p %D}]
}
proc webbanlist_createhtml {args} {
   set dt [clock format [clock seconds] -format {%I:%M %p %D}]
   set page [open $::webbanlist_setting(page) w]
   puts $page "<html>\n  <head>\n    <title>$::webbanlist_setting(Page_TitleTag)</title>\n    <META NAME=\"description\" CONTENT=\"Ban List\">\n    <META NAME=\"keywords\" CONTENT=\"bans, irc, eggdrop, tcl, link\">\n  </head>\n\n  <body bgcolor=\"$::webbanlist_setting(Page_BGC)\" link=\"$::webbanlist_setting(Page_LinkC)\" alink=\"$::webbanlist_setting(Page_LinkC)\" vlink=\"$::webbanlist_setting(Page_LinkC)\">"
   if {[string compare $::webbanlist_setting(Page_Img) ""] != 0} { puts $page "    <center><img src=\"$::webbanlist_setting(Page_Img)\"></img></center>" }
   puts $page "    <center><font size=\"$::webbanlist_setting(Page_TitleS)\" color=\"$::webbanlist_setting(Page_TTextC)\">$::webbanlist_setting(Page_Title)</font></center>\n    <br>"
   puts $page "    <br>\n    <br>\n    [webbanlist_format_td title 0 1 {Global Bans}]\n    <br>\n    <table align=\"center\">\n      <tr>"
   foreach {a b} [list 1 Number 2 Ban 1 Comment 2 Expires 1 Added 2 {Last Used} 1 Creator] { puts $page "        [webbanlist_format_td header $a 1 $b]" }
   puts $page "      </tr>"
   if {[string compare [banlist] ""] == 0} {
      puts $page "      <tr>"
      foreach {a b} [list 1 - 2 - 1 - 2 - 1 - 2 - 1 -] { puts $page "        [webbanlist_format_td cell $a 1 $b]" }
      puts $page "      </tr>"
   } {
      set bnum 0
      foreach b [banlist] {
         incr bnum
         puts $page "      <tr>"
         foreach {a b} [list 1 $bnum 2 [lindex $b 0] 1 [lindex $b 1] 2 [webbanlist_timedate [lindex $b 2]] 1 [webbanlist_timedate [lindex $b 3]] 2 [webbanlist_timedate [lindex $b 4]] 1 [lindex $b 5]] { puts $page "        [webbanlist_format_td cell $a 1 $b]" }
         puts $page "      </tr>"
      }
   }
   puts $page "    </table>\n    <br>\n    <br>"
   foreach chan [channels] {
      if {[string compare [banlist $chan] ""] == 0} { continue }
      set servernum 0
      puts $page "    [webbanlist_format_td title 0 1 "$chan Bans"]\n    <br>\n    <table align=\"center\">\n      <tr>"
      foreach {a b} [list 1 Number 2 Ban 1 Comment 2 Expires 1 Added 2 {Last Used} 1 Creator] { puts $page "        [webbanlist_format_td header $a 1 $b]" }
      puts $page "      </tr>"
      set bnum 0
      foreach b [banlist $chan] {
         incr bnum
         puts $page "      <tr>"
         foreach {a b} [list 1 $bnum 2 [lindex $b 0] 1 [lindex $b 1] 2 [webbanlist_timedate [lindex $b 2]] 1 [webbanlist_timedate [lindex $b 3]] 2 [webbanlist_timedate [lindex $b 4]] 1 [lindex $b 5]] { puts $page "        [webbanlist_format_td cell $a 1 $b]" }
         puts $page "      </tr>"
      }
      puts $page "    </table>\n    <br>\n    <br>"
   }
   puts $page "    <center><font color=\"$::webbanlist_setting(Page_TextC)\">Last Updated: $dt</font></center>\n    <center><font color=\"$::webbanlist_setting(Page_TextC)\">Generated By: $::botnick</font></center>\n  </body>\n</html>\n<!--<DAWGID>WebBanList $::webbanlist_setting(version)</DAWGID>-->"
   close $page
}

putlog "\002WEBBANLIST:\002 WebBanList Version $webbanlist_setting(version) by Wcc is loaded."


How erase all the line "CREATOR" ?
when create the html, the site "global ban" is perfect, the wide.
but the site "$chan Bans" is very wide ;/ i like how the "global ban" the wide.

look here: http://www.nor7on.org/madrid/banlist.html
i want delete all the line "Creador". and modif the wide in "#Madrid bans"

Can someone helpme ?

Thanks. Rolling Eyes
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sun Feb 10, 2008 10:43 pm    Post subject: Reply with quote

it would be inappropriate for anyone to just modify this, or any, script without first attempting to contact the author. Give wcc an email, ask him to do it
wcc@techmonkeys.org <--
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Mon Feb 11, 2008 9:32 am    Post subject: Reply with quote

hi.

i send and re send an email. but no response my emails.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Feb 11, 2008 8:38 pm    Post subject: Reply with quote

Nor7on wrote:
hi.

i send and re send an email. but no response my emails.

http://www.eggheads.org/

Try the Mailing List to contact Wcc (he's the lead developer of eggdrop). Wink
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM


Last edited by Alchera on Tue Feb 12, 2008 6:58 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Mon Feb 11, 2008 8:43 pm    Post subject: uh? Reply with quote

What u say Alchera?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Feb 12, 2008 6:57 am    Post subject: Re: uh? Reply with quote

Nor7on wrote:
What u say Alchera?

errrr... sorry, I've edited my post .. left bits off. Very Happy
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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