<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/17894" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2010-09-24T00:37:36-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/17894</id>

		<entry>
		<author><name><![CDATA[marvz]]></name></author>
		<updated>2010-09-24T00:37:36-04:00</updated>

		<published>2010-09-24T00:37:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94497#p94497</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94497#p94497"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94497#p94497"><![CDATA[
No prob! Glad I could help. <br><br>For future reference, it looks like the script has changed  again and this is what was causing the problem:<div class="codebox"><p>Code: </p><pre><code>{[string length [expr [lindex $t 3] -1]] == 1}</code></pre></div>Locate that in the script and replace it with this<div class="codebox"><p>Code: </p><pre><code>{[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1}</code></pre></div>This may not be a problem for all so I suppose it can be fixed on a case by case basis.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11259">marvz</a> — Fri Sep 24, 2010 12:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[storm6699]]></name></author>
		<updated>2010-09-23T17:58:17-04:00</updated>

		<published>2010-09-23T17:58:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94495#p94495</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94495#p94495"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94495#p94495"><![CDATA[
marvz:  you are a king, now is working perfectly thnx m8 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":-D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11359">storm6699</a> — Thu Sep 23, 2010 5:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[marvz]]></name></author>
		<updated>2010-09-23T12:32:27-04:00</updated>

		<published>2010-09-23T12:32:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94491#p94491</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94491#p94491"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94491#p94491"><![CDATA[
Try this<br><div class="codebox"><p>Code: </p><pre><code>#### mIRCStats Eggdrop Logger 2.0#### (c)1999-2004 Jules &lt;mel@angelbears.org&gt;#### Multiple Channel Support by SirSir &lt;sirsir@thuntek.net&gt;#### Unix/Linux Support by T_D &lt;todd6971@msn.com&gt; #cracks2000@EFNet######## This tcl creates mIRC-style channel logfiles for use with the popular#### mIRCStats &lt;http://www.mircstats.com&gt; program.#### This script is written for Tcl 8.1 or higher and Eggdrop 1.6.0 or higher.#### Running this script on any lower version of Tcl or Eggdrop will cause your#### eggdrop to die.######## For version history see history.txt#### Change your settings below ######## Check readme.txt for explanation of these settingsnamespace eval mel {      # Location of logfiles   variable statslogdir mel/logs   # Location of configuration files   variable statsdir mel   # Static logkeeper   variable staticlogkeeper storm6699   # Add datestamp in the log itself at regular intervals (0=never 1=daily 2=weekly 3=monthly)   variable stamplogs 1   # Adds datestamp in logfile name   variable dodatestamp 1   # Use year (yyyy) instead of date in filename (in case of adding a datestamp)   variable doyearstamp 1   # Strips '#' from logfile name   variable unixnames 1   # Enable/disable host blocking   variable bhosts 0   # Day of week (1 is monday) &lt;- for weekly rotation   variable weekly 1   # Notify static logkeeper on logfile rotation?   variable notify 1      # Ignore nicknames   variable ignorenicks {      botnick      bot2nick      bot3nick      ChanServ   }}   # # # # # # # # # # # # DO NOT CHANGE ANYTHING BELOW HERE # # # # # # # # # # #bind dcc * mel ::mel::dccbind pubm - * ::mel::chatterbind join - * ::mel::enterbind sign - * ::mel::signoffbind topc - * ::mel::ctopicbind kick - * ::mel::kickedbind nick - * ::mel::nickchangebind mode - * ::mel::cmodebind part - * ::mel::partingbind ctcp - "ACTION" ::mel::actionnamespace eval mel {variable settings settings.melvariable enabled 0variable version "mEL 2.0"variable channelsvariable macmode 1variable rotate weekvariable keepersvariable deadchanfile deadchans.melvariable nextswitchvariable weekdaysvariable skipmac 0array set weekdays {1monday2tuesday3wednesday4thursday5friday6saturday7sunday}variable actives [list statslogdir statsdir settings staticlogkeeper stamplogs dodatestamp doyearstamp skipmac macmode rotate weekdays weekly nextswitch unixnames enabled version channels keepers deadchanfile bhosts notify ignorenicks]proc starttests {} {variable activesvariable starterrorforeach v $actives {variable $v}if {$::tcl_version &gt;= "8.1"} {putlog "$version - Tcl version $::tcl_version detected... OK."} else {variable starterror "Tcl version $::tcl_version detected... FAILED! I need at least Tcl 8.1 to function properly."return 1}if {[string range $::numversion 0 2] &gt;= 106} {putlog "$version - Eggdrop version [lindex $::version 0] detected... OK."} else {variable starterror "Eggdrop version [lindex $::version 0] detected... FAILED! I need at least Eggdrop 1.6.0 to function properly."return 1}if {![file exists $statsdir] || ![file isdirectory $statsdir]} {variable starterror "Directory $statsdir is not found!"return 1} else {putlog "$version - $statsdir exists and is a directory... OK."}if {![file exists $statslogdir] || ![file isdirectory $statslogdir]} {variable starterror "Directory $statslogdir is not found!"return 1} else {putlog "$version - $statslogdir exists and is a directory... OK."}if {[validuser $staticlogkeeper]} {variable starterror "$staticlogkeeper is not a user on this bot (handle not found)"return 1}if {[lsearch [string tolower [userlist b]] [string tolower $staticlogkeeper]] != -1} {variable starterror "$staticlogkeeper is registered as a bot!"return 1}putlog "$version - $staticlogkeeper is a valid user on this bot... OK."return 0}proc dcc {handle idx args} {set args [split [lindex $args 0]]variable activesforeach v $actives {variable $v}if {![item find keep $handle]} {putlog "#$handle# mel $args"putidx $idx "$version - You are not allowed to perform maintenance."putidx $idx "$version - Contact $staticlogkeeper for more information."return 0}switch -- [lindex [split $args] 0] {on {putlog "#$handle# mel on"if {![array exists channels]} {putidx $idx "$version - You should add channels before turning mEL on!"return 0}if {$enabled == 1} {putidx $idx "$version - mEL already is on. Try \'.mel status\' for a status overview"return 0}variable enabled 1putidx $idx "$version - mEL is now turned on!"return 0}off {putlog "#$handle# mel off"if {$enabled == 0} {putidx $idx "$version - mEL already is off!"return 0}variable enabled 0putidx $idx "$version - mEL is now turned off!"return 0}rotation {putlog "#$handle# mel rotation"if {$enabled == 0} {putidx $idx "$version - mEL is disabled. Unable to change rotation settings."return 0}switch -- [lindex $args 1] {mac {if {$macmode == 0} {putlog "$version - Switching to mAC mode..."foreach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}putlog "$version - Event timers removed..."switchlogsputlog "$version - Created new logfiles for all channels..."variable macmode 1variable rotate macarraywriteputidx $idx "$version - Now running in mAC mode"} else {putidx $idx "$version - Already running in mAC mode"return 0}}week {if {$rotate == "week"} {putidx $idx "$version - Already rotating every week"return 0}if {$macmode == 0} {variable rotate weekset t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every week"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate weekvariable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}month {if {$rotate == "month"} {putidx $idx "$version - Already rotating every month"return 0}if {$macmode == 0} {variable rotate monthset t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every month"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate monthvariable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}year {if {$rotate == "year"} {putidx $idx "$version - Already rotating every year"return 0}if {$macmode == 0} {variable rotate yearset t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every year"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate yearvariable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}default {if {$macmode == 0} {if {[string is integer -strict [lindex $args 1]]} {if {[expr [lindex $args 1] &lt; 1]} {putidx $idx "$version - Invalid argument, expecting integer greater than zero"return 0}variable rotate [lindex $args 1]set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every [lindex $args 1] days"return 0}putidx $idx "$version - Invalid argument, expecting integer"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate [lindex $args 1]variable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}}}status {putlog "#$handle# mel status"if {[lindex $args 1] == "all"} {showstatus [::hand2idx $handle] all} else {showstatus [::hand2idx $handle] norm}}+chan {set whatchan [lindex $args 1]if {$whatchan != ""} {putlog "#$handle# mel +chan"if {[string index $whatchan 0] != "#"} {set whatchan "#$whatchan"}if {[item find chan $whatchan]} {putidx $idx "$version - $whatchan is already being logged"return 0}set cflag 0foreach c [::channels] {if {[string compare -nocase $whatchan $c] == 0} {set cflag 1}}if {$cflag == 0} {putidx $idx "$version - Can't add $whatchan - I am not on that channel"return 0}variable enabled 1if {![info exists nextswitch]} {variable nextswitch 0}variable skipmac 1item add chan $whatchanvariable skipmac 0putidx $idx "$version - Now logging channel $whatchan"return 0}putidx $idx "$version - You forgot to include a channel!"return 0}-chan {set whatchan [lindex [split $args] 1]if {$whatchan != ""} {putlog "#$handle# mel -chan"if {[string index $whatchan 0] != "#"} {set whatchan "#$whatchan"}if {![array exists channels]} {putidx $idx "$version - Can't remove any channel because no channels have been added yet!"return 0}if {![item find chan $whatchan]} {putidx $idx "$version - Can't remove channel $whatchan because channel hasn't been added yet!"return 0}item del chan $whatchanputidx $idx "$version - No longer logging channel $whatchan"putidx $idx "$version - Use \'.mel erase\' to remove the logfiles for channel $whatchan"return 0}putidx $idx "$version - You forgot to include a channel!"return 0}+keep {set who [lindex [split $args] 1]if {$who != ""} {putlog "#$handle# mel +keep"if {[string compare -nocase $handle $staticlogkeeper] != 0} {putidx $idx "$version - You can't add or remove logkeepers"return 0}if {![::validuser $who]} {putidx $idx "$version - $who is not a valid user on this bot"return 0}if {[item find keep $who]} {putidx $idx "$version - $who already is a logkeeper"return 0}item add keep $whoputidx $idx "$version - $who has been added as a logkeeper"return 0}putidx $idx "$version - You forgot to specify a username!"return 0}-keep {set who [lindex [split $args] 1]if {$who != ""} {putlog "#$handle# mel -keep"if {[string compare -nocase $handle $staticlogkeeper] != 0} {putidx $idx "$version - You can't add or remove logkeepers"return 0}if {[string compare -nocase $who $staticlogkeeper] == 0} {putidx $idx "$version - You can't remove the static logkeeper from the partyline"return 0}if {![item find keep $who]} {putidx $idx "$version - $who is not registeren as a logkeeper"return 0}item del keep $whoputidx $idx "$version - $who has been removed as a logkeeper"return 0}putidx $idx "$version - You forgot to specify a username!"return 0}erase {putlog "#$handle# mel erase"logfile kill [::hand2idx $handle]return 0}default {putidx $idx "\002Usage:\002 .mel &lt;on/off/rotation/status/+chan/-chan/+keep/-keep/erase&gt;"putidx $idx "For more details refer to the helpfile or type \'.help mel\'"return 0}}}proc justify {args} {if {![info exists ::spacer]} {set spc " "} else {set spc [string index $::spacer 0]}set msg [lindex $args 1]set width [lindex $args end]switch -- [lindex $args 0] {l {if {$width &lt;= [string length $msg]} {return $msg}return [string replace [string repeat $spc $width] 0 [expr [string length $msg] -1] $msg]}r {if {$width &lt;= [string length $msg]} {return $msg}return [string replace [string repeat $spc $width] [expr $width - [string length $msg]] end $msg]}c {set startat [expr [expr $width/2] - [expr [string length $msg]/2]]set lastchar [expr $startat + [expr [string length $msg] -1]]if {$startat&lt;=0} {return $msg}return [string replace [string repeat $spc $width] $startat $lastchar $msg]}lr {set msg1 $msgset msg2 [lindex $args 2]if {$width &lt;= [expr [string length $msg1] + [string length $msg2]]} {return "$msg1$msg2"}return [string replace [string replace [string repeat $spc $width] 0 [expr [string length $msg1] -1] $msg1] [expr $width - [string length $msg2]] end $msg2]}}}proc showstatus {idx mode} {variable activesforeach v $actives {variable $v}set fline "+[string repeat - 58]+"putidx $idx $flineputidx $idx "|[justify c "$version Status Overview" 58]|"putidx $idx $flineputidx $idx "|[justify l " Today is \002[clock format [clock scan now] -format %c]\002" 60]|"if {$mode == "all"} {if {$enabled == 1} {set st "\002enabled\002"} else {set st "\002disabled\002"}putidx $idx "|[justify l " mEL is currently $st" 60]|"if {$bhosts == 1} {set st "\002enabled\002"} else {set st "\002disabled\002"}putidx $idx "|[justify l " Host blocking is $st" 60]|"if {$macmode == 1} {set st "\002enabled\002"} else {set st "\002disabled\002"}putidx $idx "|[justify l " mAC mode is currently $st" 60]|"}putidx $idx $flineif {[array size channels] &gt; 0} {putidx $idx "|[justify l " Currently logging the following channels:" 58]|"foreach c [lsort [array names channels]] {putidx $idx "|[justify l "  \002$channels($c)\002" 60]|"}putidx $idx $fline} else {putidx $idx "|[justify l " Currently no channels are being logged" 58]|"putidx $idx $fline}if {$mode == "all"} {putidx $idx "|[justify l " Current logkeepers:" 58]|"putidx $idx "|[justify l "  \002$staticlogkeeper\002 (static)" 60]|"if {[array size keepers] &gt; 0} {foreach k [lsort [array names keepers]] {putidx $idx "|[justify l "  \002$keepers($k)\002" 60]|"}}putidx $idx $fline}if {$macmode == 0} {if {[string is integer $rotate]} {putidx $idx "|[justify l " Logfiles will rotate every \002$rotate day(s)\002" 60]|"} else {putidx $idx "|[justify l " Logfiles will rotate every \002$rotate\002" 60]|"}putidx $idx $flineputidx $idx "|[justify l " Next logfile rotation will be at:" 58]|"putidx $idx "|[justify l " \002[clock format $nextswitch -format %c]\002" 60]|"putidx $idx $fline}if {$mode == "all"} {if {[file pathtype $statsdir] == "relative" } {putidx $idx "|[justify l " Storing settings in:" 58]|"putidx $idx "|[justify l " \002[file nativename [pwd]/$statsdir]\002" 60]|"} else {putidx $idx "|[justify l " Storing settings in:" 58]|"putidx $idx "|[justify l " \002[file nativename $statsdir]\002" 60]|"}if {[file pathtype $statslogdir] == "relative" } {putidx $idx "|[justify l " Storing logfiles in:" 58]|"putidx $idx "|[justify l " \002[file nativename [pwd]/$statslogdir]\002" 60]|"} else {putidx $idx "|[justify l " Storing logfiles in:" 58]|"putidx $idx "|[justify l " \002[file nativename $statslogdir]\002" 60]|"}putidx $idx $fline}}proc logfile {action chan} {variable activesforeach v $actives {variable $v}switch -- $action {create {set starttime [clock format [clock scan now] -format "%a %b %d %T %Y"]set time_current [clock format [clock scan now] -format "%H:%M"]if {[expr $unixnames &lt; 1]} {set curFilename [string tolower ${chan}.log]} else {set curFilename [string tolower [string range $chan 1 end].log]}if {![item find chan $chan]} {putlog "$version - Unable to create logfile for channel not in array! Channel: $chan"return 0}if {![file exists [file join $statslogdir $curFilename]]} {variable skipmac 1writelog sesdata 0 1 2 $chan "Session Start: $starttime"writelog sesdata 0 1 2 $chan "\[$time_current\] *** Now talking in $chan"variable skipmac 0putlog "$version - Created logfile for $chan"} else {putlog "$version - Can't create logfile for channel $chan - Appending to existing logfile"return 0}return 0}close {set stoptime [clock format [clock scan now] -format "%a %b %d %T %Y"]if {[expr $unixnames &lt; 1]} {set curFilename [string tolower ${chan}.log]} else {set curFilename [string tolower [string range $chan 1 end].log]}if {![item find chan $chan]} {putlog "$version - Cannot close logfile for $chan. Channel not in array!"return 0}putlog "$version - Channel $chan has logfile [file join $statslogdir $curFilename]"if {![file exists [file join $statslogdir $curFilename]]} {putlog "$version - Cannot close logfile for $chan. File does not exist!"return 0}writelog sesdata 0 1 2 $chan "Session Close: $stoptime"putlog "$version - Closed logfile for $chan"return 0}kill {set handle $chanset dffile [file join $statsdir $deadchanfile]if {![file exists $dffile]} {putidx $handle "All redundant logfiles already removed!"return 0}putidx $handle "Deleting redundant logfiles..."set read_dead [open $dffile r]while {![eof $read_dead]} {set data [gets $read_dead]if {[eof $read_dead]} {break}if {[expr $unixnames &lt; 1]} {set curFilename [string tolower $data].log"} else {set curFilename [string tolower [string range $data 1 end]]}foreach dead_chan [glob -nocomplain [file join $statslogdir $curFilename]*] {file delete -force $dead_chanif {[file pathtype $dead_chan] == "relative"} {putidx $handle "Deleted [pwd]/$dead_chan..."} else {putidx $handle "Deleted $dead_chan..."}}}close $read_deadfile delete -force $dffileputidx $handle "\nFinished deleting redundant logfiles..."return 0}datestamp {set starttime [clock format [clock scan now] -format "%a %b %d %T %Y"]if {![array exists channels] || [array size channels] &lt; 1} {putlog "$version - No channels defined. Use +chan first. Unable to add datestamp in logfile."variable enabled 0return 0}foreach c [lsort [array names channels]] {writelog sesdata 0 1 2 $channels($c) "Session Time: $starttime"}return 0}}}proc switchlogs {} {variable activesforeach v $actives {variable $v}if {$enabled == 0} {return 0}foreach c [lsort [array names channels]] {set curChan $channels($c)logfile close $curChanif {[expr $unixnames &lt; 1]} {set curFilename [string tolower $curChan]} else {set curFilename [string tolower [string range $curChan 1 end]]}if {$dodatestamp == 1} {if {$doyearstamp == 0} {set date [clock format [clock scan "now yesterday"] -format %m.%d.%Y]} else {set date [clock format [clock scan "now yesterday"] -format %Y]}file rename -force [file join $statslogdir $curFilename].log [file join $statslogdir $curFilename].${date}.log} else {file rename -force [file join $statslogdir $curFilename].log [file join $statslogdir $curFilename].bak}logfile create $curChan}if {$notify == 1} {sendnote mEL $staticlogkeeper "$version - Logfiles have rotated at [clock format [clock scan now] -format %c]"}}proc checktimer {} {variable activesforeach v $actives {variable $v}if {$nextswitch == ""} {putlog "$version - No rotation date found - Binding new timer (logfile switcher)"switch -- $rotate {week {set t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}month {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}year {set t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]}default {set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}}if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::timerarraywritereturn 0}if {[expr [clock scan now] &gt; $nextswitch]} {putlog "$version - Missed a switch at [clock format $nextswitch -format %c]... switching now"switchlogsswitch -- $rotate {week {set t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}month {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}year {set t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]}default {set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}}arraywrite}set t [clock format $nextswitch -format "00 00 %d %m %Y"]if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::timerreturn 0}proc checkstamptimer {} {variable activesforeach v $actives {variable $v}switch -- $stamplogs {0 { foreach search [binds time] {if {[string compare [lindex $search 4] "::mel::stamptimer"] == 0} {unbind time - "[lindex $search 2]" ::mel::stamptimer}}return 0}1 {set t [clock format [clock scan "now next day"] -format "00 00 %d %m %Y"]variable stampat [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}2 {set t [clock format [clock scan "now next monday"] -format "00 00 %d %m %Y"]variable stampat [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}3 {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable stampat [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}}set t [clock format $stampat -format "00 00 %d %m %Y"]if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::stamptimerreturn 0}proc stamptimer {min hour day month year} {variable activesforeach v $actives {variable $v}logfile datestamp allforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::stamptimer"] == 0} {unbind time - "[lindex $search 2]" ::mel::stamptimer}}if {$enabled == 0} {putlog "$version - mEL is disabled - Not binding timed event (log datestamping)"return 0}checkstamptimerreturn 0}proc timer {min hour day month year} {variable activesforeach v $actives {variable $v}if {$enabled == 0} {return 0}switchlogsforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {$enabled == 0} {putlog "$version - mEL is disabled - Not binding timed event (logfile switching)"return 0}switch -- $rotate {week {set t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}month {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}year {set t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]}default {set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}}arraywriteset t [clock format $nextswitch -format "00 00 %d %m %Y"]if {[string length [expr [string trimleft [lindex $t 3] 0] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [string trimleft [lindex $t 3] 0] -1]]} else {set tt [lreplace $t 3 3 [expr [string trimleft [lindex $t 3] 0] -1]]}bind time - $tt ::mel::timerputlog "$version - Next switch will occur at [clock format $nextswitch -format %c]"return 0}proc arrayinit {} {variable activesforeach v $actives {variable $v}if {![file exists [file join $statsdir $settings]]} {variable enabled 0return 1}set readsettings [open [file join $statsdir $settings] r]set datatype 0while {![eof $readsettings]} {set data [gets $readsettings]if {[eof $readsettings]} {break}if {[string index [lindex $data 0] 0] == "\["} {regsub -all {[\[\]]} $data {} typeswitch -- $type {channels { set datatype 1 }keepers { set datatype 2 }rotation { set datatype 3 }switch { set datatype 4 }EOF { break }}continue}switch -- $datatype {0 { continue }1 { lappend allchans $data ; continue }2 { lappend allkeeps $data ; continue }3 { set tmac $data ; continue }4 { set swdate $data ; continue }}}close $readsettingsarray unset channelsif {[info exists allchans]} {set cnt 0foreach c $allchans {set channels($cnt) $cincr cnt}variable enabled 1} else {variable enabled 0return 0}array unset keepersif {[info exists allkeeps]} {set cnt 0foreach k $allkeeps {set keepers($cnt) $kincr cnt}}switch -- $tmac {mac {variable macmode 1}week {variable macmode 0variable rotate week}month {variable macmode 0variable rotate month}year {variable macmode 0variable rotate year}default {variable macmode 0variable rotate $tmac}}variable nextswitch $swdatereturn 0}proc arraywrite {} {variable activesforeach v $actives {variable $v}if {[file exists [file join $statsdir $settings]]} {file rename -force [file join $statsdir $settings] [file join $statsdir $settings].old}set writesettings [open [file join $statsdir $settings] w]puts $writesettings "\[channels\]"foreach c [lsort [array names channels]] {puts $writesettings $channels($c)}puts $writesettings "\[keepers\]"foreach k [lsort [array names keepers]] {puts $writesettings $keepers($k)}puts $writesettings "\[rotation\]"puts $writesettings $rotateputs $writesettings "\[switch\]"puts $writesettings $nextswitchputs $writesettings "\[EOF\]"close $writesettings}proc item {action type item} {variable activesforeach v $actives {variable $v}switch -- $action {find {switch -- $type {chan {if {[array exists channels]} {foreach c [array names channels] {if {[string compare -nocase $channels($c) $item] == 0} {return 1}}}return 0}keep {if {[string compare -nocase $item $staticlogkeeper] == 0} {return 1}if {[array exists keepers]} {foreach k [array names keepers] {if {[string compare -nocase $keepers($k) $item] == 0} {return 1}}}return 0}}}add {switch -- $type {chan {if {![array exists channels]} {set channels(0) $item} else {set channels([expr [array size channels] + 1]) $item}logfile create $itemif {[file exists [file join $statsdir $deadchanfile]]} {set read [open [file join $statsdir $deadchanfile] r]while {![eof $read]} {set data [gets $read]if {[eof $read]} {break}if {[string compare -nocase $item $data] != 0} {set write [open [file join $statsdir $deadchanfile].tmp a]puts $write $dataclose $write}}close $readif {[file exists [file join $statsdir $deadchanfile].tmp]} {file rename -force [file join $statsdir $deadchanfile].tmp [file join $statsdir $deadchanfile]} else {file delete -force [file join $statsdir $deadchanfile]}}arraywrite}keep {if {![array exists keepers]} {set keepers(0) $item} else {set keepers([expr [array size keepers] + 1]) $item}arraywrite}}}del {switch -- $type {chan {foreach c [array names channels] {if {[string compare -nocase $channels($c) $item] == 0} {logfile close $itemunset channels($c)set add_dead [open [file join $statsdir $deadchanfile] a]puts $add_dead $itemclose $add_deadif {[array names channels] == ""} {variable enabled 0foreach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}putlog "$version - No channels are being logged. mEL turned off, existing time bindings removed."}arraywrite}}}keep {foreach k [array names keepers] {if {[string compare -nocase $keepers($k) $item] == 0} {unset keepers($k)arraywrite}}}}}}}proc strip {args} {regsub -all -- {((\002|\026|\037|\017|\022)|(\003([0-9]{1,2}(,[0-9]{1,2})?)?))} $args "" argsforeach char [split $args {}] {if {[string is graph $char] || $char == " "} {append printable $char}}return $printable}proc writelog {args} {variable activesforeach v $actives {variable $v}if {$enabled == 0} {return 0}if {$bhosts == 1 &amp;&amp; [isignore [lindex $args 2]]} {return 0}set curTime [clock format [clock scan now] -format "%H:%M"]set curChannel [string tolower [lindex $args 4]]if {![item find chan $curChannel]} { return 0 }if {[expr $unixnames &lt; 1]} {set curFilename ${curChannel}.log} else {set curFilename [string range $curChannel 1 end].log}if {$skipmac == 0} {if {$macmode == 1 &amp;&amp; ![file exists [file join $statslogdir $curFilename]]} {logfile create $curChannel}}switch -- [lindex $args 0] {chat {if {[lsearch -exact [string tolower $ignorenicks] [string tolower [lindex $args 1]]] == -1} {set addline "\[$curTime\] &lt;[lindex $args 1]&gt; [join [strip [lindex $args 5]]]"} else {return 0}}join {set addline "\[$curTime\] *** [lindex $args 1] ([lindex $args 2]) has joined $curChannel"}quit {set addline "\[$curTime\] *** [lindex $args 1] has quit IRC ([join [strip [lindex $args 5]]])"}topic {if {[lindex $args 1] == "*"} {return}set addline "\[$curTime\] *** [lindex $args 1] changes topic to '[join [strip [lindex $args 5]]]'"}kick {set addline "\[$curTime\] *** [lindex $args 5] was kicked by [lindex $args 1] ([lindex $args 6])"}nick {set addline "\[$curTime\] *** [lindex $args 1] is now known as [lindex $args 5]"}mode {set addline "\[$curTime\] *** [lindex $args 1] sets mode: [lindex $args 5] [lindex $args 6]"}part {set addline "\[$curTime\] *** [lindex $args 1] ([lindex $args 2]) has left [lindex $args 4] ([lindex $args 5])"}action {if {[lsearch -exact [string tolower $ignorenicks] [string tolower [lindex $args 1]]] == -1} {set addline "\[$curTime\] * [lindex $args 1] [join [strip [lindex $args 5]]]"} else {return 0}}sesdata {set addline [lindex $args 5]}}set writeout [open [file join $statslogdir $curFilename] a]puts $writeout $addlineclose $writeout}proc chatter {nick host handle channel text} {writelog chat $nick $host $handle $channel $text}proc enter {nick host handle channel} {writelog join $nick $host $handle $channel}proc signoff {nick host handle channel partmsg} {writelog quit $nick $host $handle $channel $partmsg}proc ctopic {nick host handle channel topic} {writelog topic $nick $host $handle $channel $topic}proc kicked {nick host handle channel target reason} {writelog kick $nick $host $handle $channel $target $reason}proc nickchange {nick host handle channel newnick} {writelog nick $nick $host $handle $channel $newnick}proc cmode {nick host handle channel change victim} {writelog mode $nick $host $handle $channel $change $victim}proc parting {nick host handle channel partmsg} {writelog part $nick $host $handle $channel $partmsg}proc action {nick host handle destination keyword arg} {writelog action $nick $host $handle $destination $arg}}putlog "Initializing $::mel::version...."putlog "$::mel::version - Running startup tests..."if {[::mel::starttests]} {putlog $::mel::starterrordie "Fatal error - Can not continue"} else {::mel::arrayinit::mel::logfile datestamp allif {$::mel::macmode == 0 &amp;&amp; $::mel::enabled == 1} {::mel::checktimer}::mel::checkstamptimerloadhelp mel.helpputlog "$::mel::version successfully initialized..."}### http://mel.sourceforge.net### Feel free to alter this tcl to your personal flavour... just don't forget who wrote the### original code... Also, if you find bugs, or even fix some.. then please let me know!</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11259">marvz</a> — Thu Sep 23, 2010 12:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[storm6699]]></name></author>
		<updated>2010-09-23T05:59:07-04:00</updated>

		<published>2010-09-23T05:59:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94487#p94487</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94487#p94487"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94487#p94487"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>#### mIRCStats Eggdrop Logger 2.0#### (c)1999-2004 Jules &lt;mel@angelbears.org&gt;#### Multiple Channel Support by SirSir &lt;sirsir@thuntek.net&gt;#### Unix/Linux Support by T_D &lt;todd6971@msn.com&gt; #cracks2000@EFNet######## This tcl creates mIRC-style channel logfiles for use with the popular#### mIRCStats &lt;http://www.mircstats.com&gt; program.#### This script is written for Tcl 8.1 or higher and Eggdrop 1.6.0 or higher.#### Running this script on any lower version of Tcl or Eggdrop will cause your#### eggdrop to die.######## For version history see history.txt#### Change your settings below ######## Check readme.txt for explanation of these settingsnamespace eval mel {# Location of logfilesvariable statslogdir mel/logs# Location of configuration filesvariable statsdir mel# Static logkeepervariable staticlogkeeper storm6699# Add datestamp in the log itself at regular intervals (0=never 1=daily 2=weekly 3=monthly)variable stamplogs 1# Adds datestamp in logfile namevariable dodatestamp 1# Use year (yyyy) instead of date in filename (in case of adding a datestamp)variable doyearstamp 1# Strips '#' from logfile namevariable unixnames 1# Enable/disable host blockingvariable bhosts 0# Day of week (1 is monday) &lt;- for weekly rotationvariable weekly 1# Notify static logkeeper on logfile rotation?variable notify 1# Ignore nicknamesvariable ignorenicks {botnickbot2nickbot3nickChanServ}}# # # # # # # # # # # # DO NOT CHANGE ANYTHING BELOW HERE # # # # # # # # # # #bind dcc * mel ::mel::dccbind pubm - * ::mel::chatterbind join - * ::mel::enterbind sign - * ::mel::signoffbind topc - * ::mel::ctopicbind kick - * ::mel::kickedbind nick - * ::mel::nickchangebind mode - * ::mel::cmodebind part - * ::mel::partingbind ctcp - "ACTION" ::mel::actionnamespace eval mel {variable settings settings.melvariable enabled 0variable version "mEL 2.0"variable channelsvariable macmode 1variable rotate weekvariable keepersvariable deadchanfile deadchans.melvariable nextswitchvariable weekdaysvariable skipmac 0array set weekdays {1monday2tuesday3wednesday4thursday5friday6saturday7sunday}variable actives [list statslogdir statsdir settings staticlogkeeper stamplogs dodatestamp doyearstamp skipmac macmode rotate weekdays weekly nextswitch unixnames enabled version channels keepers deadchanfile bhosts notify ignorenicks]proc starttests {} {variable activesvariable starterrorforeach v $actives {variable $v}if {$::tcl_version &gt;= "8.1"} {putlog "$version - Tcl version $::tcl_version detected... OK."} else {variable starterror "Tcl version $::tcl_version detected... FAILED! I need at least Tcl 8.1 to function properly."return 1}if {[string range $::numversion 0 2] &gt;= 106} {putlog "$version - Eggdrop version [lindex $::version 0] detected... OK."} else {variable starterror "Eggdrop version [lindex $::version 0] detected... FAILED! I need at least Eggdrop 1.6.0 to function properly."return 1}if {![file exists $statsdir] || ![file isdirectory $statsdir]} {variable starterror "Directory $statsdir is not found!"return 1} else {putlog "$version - $statsdir exists and is a directory... OK."}if {![file exists $statslogdir] || ![file isdirectory $statslogdir]} {variable starterror "Directory $statslogdir is not found!"return 1} else {putlog "$version - $statslogdir exists and is a directory... OK."}if {[validuser $staticlogkeeper]} {variable starterror "$staticlogkeeper is not a user on this bot (handle not found)"return 1}if {[lsearch [string tolower [userlist b]] [string tolower $staticlogkeeper]] != -1} {variable starterror "$staticlogkeeper is registered as a bot!"return 1}putlog "$version - $staticlogkeeper is a valid user on this bot... OK."return 0}proc dcc {handle idx args} {set args [split [lindex $args 0]]variable activesforeach v $actives {variable $v}if {![item find keep $handle]} {putlog "#$handle# mel $args"putidx $idx "$version - You are not allowed to perform maintenance."putidx $idx "$version - Contact $staticlogkeeper for more information."return 0}switch -- [lindex [split $args] 0] {on {putlog "#$handle# mel on"if {![array exists channels]} {putidx $idx "$version - You should add channels before turning mEL on!"return 0}if {$enabled == 1} {putidx $idx "$version - mEL already is on. Try \'.mel status\' for a status overview"return 0}variable enabled 1putidx $idx "$version - mEL is now turned on!"return 0}off {putlog "#$handle# mel off"if {$enabled == 0} {putidx $idx "$version - mEL already is off!"return 0}variable enabled 0putidx $idx "$version - mEL is now turned off!"return 0}rotation {putlog "#$handle# mel rotation"if {$enabled == 0} {putidx $idx "$version - mEL is disabled. Unable to change rotation settings."return 0}switch -- [lindex $args 1] {mac {if {$macmode == 0} {putlog "$version - Switching to mAC mode..."foreach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}putlog "$version - Event timers removed..."switchlogsputlog "$version - Created new logfiles for all channels..."variable macmode 1variable rotate macarraywriteputidx $idx "$version - Now running in mAC mode"} else {putidx $idx "$version - Already running in mAC mode"return 0}}week {if {$rotate == "week"} {putidx $idx "$version - Already rotating every week"return 0}if {$macmode == 0} {variable rotate weekset t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every week"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate weekvariable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}month {if {$rotate == "month"} {putidx $idx "$version - Already rotating every month"return 0}if {$macmode == 0} {variable rotate monthset t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every month"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate monthvariable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}year {if {$rotate == "year"} {putidx $idx "$version - Already rotating every year"return 0}if {$macmode == 0} {variable rotate yearset t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every year"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate yearvariable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}default {if {$macmode == 0} {if {[string is integer -strict [lindex $args 1]]} {if {[expr [lindex $args 1] &lt; 1]} {putidx $idx "$version - Invalid argument, expecting integer greater than zero"return 0}variable rotate [lindex $args 1]set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]arraywriteforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::timerputidx $idx "$version - Now rotating logfiles every [lindex $args 1] days"return 0}putidx $idx "$version - Invalid argument, expecting integer"return 0}putlog "$version - Disabling mAC mode..."variable macmode 0variable rotate [lindex $args 1]variable nextswitch {}checktimerswitchlogsputlog "$version - mAC mode disabled"return 0}}}status {putlog "#$handle# mel status"if {[lindex $args 1] == "all"} {showstatus [::hand2idx $handle] all} else {showstatus [::hand2idx $handle] norm}}+chan {set whatchan [lindex $args 1]if {$whatchan != ""} {putlog "#$handle# mel +chan"if {[string index $whatchan 0] != "#"} {set whatchan "#$whatchan"}if {[item find chan $whatchan]} {putidx $idx "$version - $whatchan is already being logged"return 0}set cflag 0foreach c [::channels] {if {[string compare -nocase $whatchan $c] == 0} {set cflag 1}}if {$cflag == 0} {putidx $idx "$version - Can't add $whatchan - I am not on that channel"return 0}variable enabled 1if {![info exists nextswitch]} {variable nextswitch 0}variable skipmac 1item add chan $whatchanvariable skipmac 0putidx $idx "$version - Now logging channel $whatchan"return 0}putidx $idx "$version - You forgot to include a channel!"return 0}-chan {set whatchan [lindex [split $args] 1]if {$whatchan != ""} {putlog "#$handle# mel -chan"if {[string index $whatchan 0] != "#"} {set whatchan "#$whatchan"}if {![array exists channels]} {putidx $idx "$version - Can't remove any channel because no channels have been added yet!"return 0}if {![item find chan $whatchan]} {putidx $idx "$version - Can't remove channel $whatchan because channel hasn't been added yet!"return 0}item del chan $whatchanputidx $idx "$version - No longer logging channel $whatchan"putidx $idx "$version - Use \'.mel erase\' to remove the logfiles for channel $whatchan"return 0}putidx $idx "$version - You forgot to include a channel!"return 0}+keep {set who [lindex [split $args] 1]if {$who != ""} {putlog "#$handle# mel +keep"if {[string compare -nocase $handle $staticlogkeeper] != 0} {putidx $idx "$version - You can't add or remove logkeepers"return 0}if {![::validuser $who]} {putidx $idx "$version - $who is not a valid user on this bot"return 0}if {[item find keep $who]} {putidx $idx "$version - $who already is a logkeeper"return 0}item add keep $whoputidx $idx "$version - $who has been added as a logkeeper"return 0}putidx $idx "$version - You forgot to specify a username!"return 0}-keep {set who [lindex [split $args] 1]if {$who != ""} {putlog "#$handle# mel -keep"if {[string compare -nocase $handle $staticlogkeeper] != 0} {putidx $idx "$version - You can't add or remove logkeepers"return 0}if {[string compare -nocase $who $staticlogkeeper] == 0} {putidx $idx "$version - You can't remove the static logkeeper from the partyline"return 0}if {![item find keep $who]} {putidx $idx "$version - $who is not registeren as a logkeeper"return 0}item del keep $whoputidx $idx "$version - $who has been removed as a logkeeper"return 0}putidx $idx "$version - You forgot to specify a username!"return 0}erase {putlog "#$handle# mel erase"logfile kill [::hand2idx $handle]return 0}default {putidx $idx "\002Usage:\002 .mel &lt;on/off/rotation/status/+chan/-chan/+keep/-keep/erase&gt;"putidx $idx "For more details refer to the helpfile or type \'.help mel\'"return 0}}}proc justify {args} {if {![info exists ::spacer]} {set spc " "} else {set spc [string index $::spacer 0]}set msg [lindex $args 1]set width [lindex $args end]switch -- [lindex $args 0] {l {if {$width &lt;= [string length $msg]} {return $msg}return [string replace [string repeat $spc $width] 0 [expr [string length $msg] -1] $msg]}r {if {$width &lt;= [string length $msg]} {return $msg}return [string replace [string repeat $spc $width] [expr $width - [string length $msg]] end $msg]}c {set startat [expr [expr $width/2] - [expr [string length $msg]/2]]set lastchar [expr $startat + [expr [string length $msg] -1]]if {$startat&lt;=0} {return $msg}return [string replace [string repeat $spc $width] $startat $lastchar $msg]}lr {set msg1 $msgset msg2 [lindex $args 2]if {$width &lt;= [expr [string length $msg1] + [string length $msg2]]} {return "$msg1$msg2"}return [string replace [string replace [string repeat $spc $width] 0 [expr [string length $msg1] -1] $msg1] [expr $width - [string length $msg2]] end $msg2]}}}proc showstatus {idx mode} {variable activesforeach v $actives {variable $v}set fline "+[string repeat - 58]+"putidx $idx $flineputidx $idx "|[justify c "$version Status Overview" 58]|"putidx $idx $flineputidx $idx "|[justify l " Today is \002[clock format [clock scan now] -format %c]\002" 60]|"if {$mode == "all"} {if {$enabled == 1} {set st "\002enabled\002"} else {set st "\002disabled\002"}putidx $idx "|[justify l " mEL is currently $st" 60]|"if {$bhosts == 1} {set st "\002enabled\002"} else {set st "\002disabled\002"}putidx $idx "|[justify l " Host blocking is $st" 60]|"if {$macmode == 1} {set st "\002enabled\002"} else {set st "\002disabled\002"}putidx $idx "|[justify l " mAC mode is currently $st" 60]|"}putidx $idx $flineif {[array size channels] &gt; 0} {putidx $idx "|[justify l " Currently logging the following channels:" 58]|"foreach c [lsort [array names channels]] {putidx $idx "|[justify l "  \002$channels($c)\002" 60]|"}putidx $idx $fline} else {putidx $idx "|[justify l " Currently no channels are being logged" 58]|"putidx $idx $fline}if {$mode == "all"} {putidx $idx "|[justify l " Current logkeepers:" 58]|"putidx $idx "|[justify l "  \002$staticlogkeeper\002 (static)" 60]|"if {[array size keepers] &gt; 0} {foreach k [lsort [array names keepers]] {putidx $idx "|[justify l "  \002$keepers($k)\002" 60]|"}}putidx $idx $fline}if {$macmode == 0} {if {[string is integer $rotate]} {putidx $idx "|[justify l " Logfiles will rotate every \002$rotate day(s)\002" 60]|"} else {putidx $idx "|[justify l " Logfiles will rotate every \002$rotate\002" 60]|"}putidx $idx $flineputidx $idx "|[justify l " Next logfile rotation will be at:" 58]|"putidx $idx "|[justify l " \002[clock format $nextswitch -format %c]\002" 60]|"putidx $idx $fline}if {$mode == "all"} {if {[file pathtype $statsdir] == "relative" } {putidx $idx "|[justify l " Storing settings in:" 58]|"putidx $idx "|[justify l " \002[file nativename [pwd]/$statsdir]\002" 60]|"} else {putidx $idx "|[justify l " Storing settings in:" 58]|"putidx $idx "|[justify l " \002[file nativename $statsdir]\002" 60]|"}if {[file pathtype $statslogdir] == "relative" } {putidx $idx "|[justify l " Storing logfiles in:" 58]|"putidx $idx "|[justify l " \002[file nativename [pwd]/$statslogdir]\002" 60]|"} else {putidx $idx "|[justify l " Storing logfiles in:" 58]|"putidx $idx "|[justify l " \002[file nativename $statslogdir]\002" 60]|"}putidx $idx $fline}}proc logfile {action chan} {variable activesforeach v $actives {variable $v}switch -- $action {create {set starttime [clock format [clock scan now] -format "%a %b %d %T %Y"]set time_current [clock format [clock scan now] -format "%H:%M"]if {[expr $unixnames &lt; 1]} {set curFilename [string tolower ${chan}.log]} else {set curFilename [string tolower [string range $chan 1 end].log]}if {![item find chan $chan]} {putlog "$version - Unable to create logfile for channel not in array! Channel: $chan"return 0}if {![file exists [file join $statslogdir $curFilename]]} {variable skipmac 1writelog sesdata 0 1 2 $chan "Session Start: $starttime"writelog sesdata 0 1 2 $chan "\[$time_current\] *** Now talking in $chan"variable skipmac 0putlog "$version - Created logfile for $chan"} else {putlog "$version - Can't create logfile for channel $chan - Appending to existing logfile"return 0}return 0}close {set stoptime [clock format [clock scan now] -format "%a %b %d %T %Y"]if {[expr $unixnames &lt; 1]} {set curFilename [string tolower ${chan}.log]} else {set curFilename [string tolower [string range $chan 1 end].log]}if {![item find chan $chan]} {putlog "$version - Cannot close logfile for $chan. Channel not in array!"return 0}putlog "$version - Channel $chan has logfile [file join $statslogdir $curFilename]"if {![file exists [file join $statslogdir $curFilename]]} {putlog "$version - Cannot close logfile for $chan. File does not exist!"return 0}writelog sesdata 0 1 2 $chan "Session Close: $stoptime"putlog "$version - Closed logfile for $chan"return 0}kill {set handle $chanset dffile [file join $statsdir $deadchanfile]if {![file exists $dffile]} {putidx $handle "All redundant logfiles already removed!"return 0}putidx $handle "Deleting redundant logfiles..."set read_dead [open $dffile r]while {![eof $read_dead]} {set data [gets $read_dead]if {[eof $read_dead]} {break}if {[expr $unixnames &lt; 1]} {set curFilename [string tolower $data].log"} else {set curFilename [string tolower [string range $data 1 end]]}foreach dead_chan [glob -nocomplain [file join $statslogdir $curFilename]*] {file delete -force $dead_chanif {[file pathtype $dead_chan] == "relative"} {putidx $handle "Deleted [pwd]/$dead_chan..."} else {putidx $handle "Deleted $dead_chan..."}}}close $read_deadfile delete -force $dffileputidx $handle "\nFinished deleting redundant logfiles..."return 0}datestamp {set starttime [clock format [clock scan now] -format "%a %b %d %T %Y"]if {![array exists channels] || [array size channels] &lt; 1} {putlog "$version - No channels defined. Use +chan first. Unable to add datestamp in logfile."variable enabled 0return 0}foreach c [lsort [array names channels]] {writelog sesdata 0 1 2 $channels($c) "Session Time: $starttime"}return 0}}}proc switchlogs {} {variable activesforeach v $actives {variable $v}if {$enabled == 0} {return 0}foreach c [lsort [array names channels]] {set curChan $channels($c)logfile close $curChanif {[expr $unixnames &lt; 1]} {set curFilename [string tolower $curChan]} else {set curFilename [string tolower [string range $curChan 1 end]]}if {$dodatestamp == 1} {if {$doyearstamp == 0} {set date [clock format [clock scan "now yesterday"] -format %m.%d.%Y]} else {set date [clock format [clock scan "now yesterday"] -format %Y]}file rename -force [file join $statslogdir $curFilename].log [file join $statslogdir $curFilename].${date}.log} else {file rename -force [file join $statslogdir $curFilename].log [file join $statslogdir $curFilename].bak}logfile create $curChan}if {$notify == 1} {sendnote mEL $staticlogkeeper "$version - Logfiles have rotated at [clock format [clock scan now] -format %c]"}}proc checktimer {} {variable activesforeach v $actives {variable $v}if {$nextswitch == ""} {putlog "$version - No rotation date found - Binding new timer (logfile switcher)"switch -- $rotate {week {set t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}month {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}year {set t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]}default {set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}}if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::timerarraywritereturn 0}if {[expr [clock scan now] &gt; $nextswitch]} {putlog "$version - Missed a switch at [clock format $nextswitch -format %c]... switching now"switchlogsswitch -- $rotate {week {set t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}month {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}year {set t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]}default {set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}}arraywrite}set t [clock format $nextswitch -format "00 00 %d %m %Y"]if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::timerreturn 0}proc checkstamptimer {} {variable activesforeach v $actives {variable $v}switch -- $stamplogs {0 { foreach search [binds time] {if {[string compare [lindex $search 4] "::mel::stamptimer"] == 0} {unbind time - "[lindex $search 2]" ::mel::stamptimer}}return 0}1 {set t [clock format [clock scan "now next day"] -format "00 00 %d %m %Y"]variable stampat [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}2 {set t [clock format [clock scan "now next monday"] -format "00 00 %d %m %Y"]variable stampat [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}3 {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable stampat [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}}set t [clock format $stampat -format "00 00 %d %m %Y"]if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::stamptimerreturn 0}proc stamptimer {min hour day month year} {variable activesforeach v $actives {variable $v}logfile datestamp allforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::stamptimer"] == 0} {unbind time - "[lindex $search 2]" ::mel::stamptimer}}if {$enabled == 0} {putlog "$version - mEL is disabled - Not binding timed event (log datestamping)"return 0}checkstamptimerreturn 0}proc timer {min hour day month year} {variable activesforeach v $actives {variable $v}if {$enabled == 0} {return 0}switchlogsforeach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}if {$enabled == 0} {putlog "$version - mEL is disabled - Not binding timed event (logfile switching)"return 0}switch -- $rotate {week {set t [clock format [clock scan "now next $weekdays($weekly)"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}month {set t [clock format [clock scan "now next month"] -format "00 00 01 %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3]01T000000"]}year {set t [clock format [clock scan "now next year"] -format "00 00 01 01 %Y"]variable nextswitch [clock scan "[lindex $t 4]0101T000000"]}default {set t [clock format [clock scan "now next $rotate days"] -format "00 00 %d %m %Y"]variable nextswitch [clock scan "[lindex $t 4][lindex $t 3][lindex $t 2]T000000"]}}arraywriteset t [clock format $nextswitch -format "00 00 %d %m %Y"]if {[string length [expr [lindex $t 3] -1]] == 1} {set tt [lreplace $t 3 3 0[expr [lindex $t 3] -1]]} else {set tt [lreplace $t 3 3 [expr [lindex $t 3] -1]]}bind time - $tt ::mel::timerputlog "$version - Next switch will occur at [clock format $nextswitch -format %c]"return 0}proc arrayinit {} {variable activesforeach v $actives {variable $v}if {![file exists [file join $statsdir $settings]]} {variable enabled 0return 1}set readsettings [open [file join $statsdir $settings] r]set datatype 0while {![eof $readsettings]} {set data [gets $readsettings]if {[eof $readsettings]} {break}if {[string index [lindex $data 0] 0] == "\["} {regsub -all {[\[\]]} $data {} typeswitch -- $type {channels { set datatype 1 }keepers { set datatype 2 }rotation { set datatype 3 }switch { set datatype 4 }EOF { break }}continue}switch -- $datatype {0 { continue }1 { lappend allchans $data ; continue }2 { lappend allkeeps $data ; continue }3 { set tmac $data ; continue }4 { set swdate $data ; continue }}}close $readsettingsarray unset channelsif {[info exists allchans]} {set cnt 0foreach c $allchans {set channels($cnt) $cincr cnt}variable enabled 1} else {variable enabled 0return 0}array unset keepersif {[info exists allkeeps]} {set cnt 0foreach k $allkeeps {set keepers($cnt) $kincr cnt}}switch -- $tmac {mac {variable macmode 1}week {variable macmode 0variable rotate week}month {variable macmode 0variable rotate month}year {variable macmode 0variable rotate year}default {variable macmode 0variable rotate $tmac}}variable nextswitch $swdatereturn 0}proc arraywrite {} {variable activesforeach v $actives {variable $v}if {[file exists [file join $statsdir $settings]]} {file rename -force [file join $statsdir $settings] [file join $statsdir $settings].old}set writesettings [open [file join $statsdir $settings] w]puts $writesettings "\[channels\]"foreach c [lsort [array names channels]] {puts $writesettings $channels($c)}puts $writesettings "\[keepers\]"foreach k [lsort [array names keepers]] {puts $writesettings $keepers($k)}puts $writesettings "\[rotation\]"puts $writesettings $rotateputs $writesettings "\[switch\]"puts $writesettings $nextswitchputs $writesettings "\[EOF\]"close $writesettings}proc item {action type item} {variable activesforeach v $actives {variable $v}switch -- $action {find {switch -- $type {chan {if {[array exists channels]} {foreach c [array names channels] {if {[string compare -nocase $channels($c) $item] == 0} {return 1}}}return 0}keep {if {[string compare -nocase $item $staticlogkeeper] == 0} {return 1}if {[array exists keepers]} {foreach k [array names keepers] {if {[string compare -nocase $keepers($k) $item] == 0} {return 1}}}return 0}}}add {switch -- $type {chan {if {![array exists channels]} {set channels(0) $item} else {set channels([expr [array size channels] + 1]) $item}logfile create $itemif {[file exists [file join $statsdir $deadchanfile]]} {set read [open [file join $statsdir $deadchanfile] r]while {![eof $read]} {set data [gets $read]if {[eof $read]} {break}if {[string compare -nocase $item $data] != 0} {set write [open [file join $statsdir $deadchanfile].tmp a]puts $write $dataclose $write}}close $readif {[file exists [file join $statsdir $deadchanfile].tmp]} {file rename -force [file join $statsdir $deadchanfile].tmp [file join $statsdir $deadchanfile]} else {file delete -force [file join $statsdir $deadchanfile]}}arraywrite}keep {if {![array exists keepers]} {set keepers(0) $item} else {set keepers([expr [array size keepers] + 1]) $item}arraywrite}}}del {switch -- $type {chan {foreach c [array names channels] {if {[string compare -nocase $channels($c) $item] == 0} {logfile close $itemunset channels($c)set add_dead [open [file join $statsdir $deadchanfile] a]puts $add_dead $itemclose $add_deadif {[array names channels] == ""} {variable enabled 0foreach search [binds time] {if {[string compare [lindex $search 4] "::mel::timer"] == 0} {unbind time - "[lindex $search 2]" ::mel::timer}}putlog "$version - No channels are being logged. mEL turned off, existing time bindings removed."}arraywrite}}}keep {foreach k [array names keepers] {if {[string compare -nocase $keepers($k) $item] == 0} {unset keepers($k)arraywrite}}}}}}}proc strip {args} {regsub -all -- {((\002|\026|\037|\017|\022)|(\003([0-9]{1,2}(,[0-9]{1,2})?)?))} $args "" argsforeach char [split $args {}] {if {[string is graph $char] || $char == " "} {append printable $char}}return $printable}proc writelog {args} {variable activesforeach v $actives {variable $v}if {$enabled == 0} {return 0}if {$bhosts == 1 &amp;&amp; [isignore [lindex $args 2]]} {return 0}set curTime [clock format [clock scan now] -format "%H:%M"]set curChannel [string tolower [lindex $args 4]]if {![item find chan $curChannel]} { return 0 }if {[expr $unixnames &lt; 1]} {set curFilename ${curChannel}.log} else {set curFilename [string range $curChannel 1 end].log}if {$skipmac == 0} {if {$macmode == 1 &amp;&amp; ![file exists [file join $statslogdir $curFilename]]} {logfile create $curChannel}}switch -- [lindex $args 0] {chat {if {[lsearch -exact [string tolower $ignorenicks] [string tolower [lindex $args 1]]] == -1} {set addline "\[$curTime\] &lt;[lindex $args 1]&gt; [join [strip [lindex $args 5]]]"} else {return 0}}join {set addline "\[$curTime\] *** [lindex $args 1] ([lindex $args 2]) has joined $curChannel"}quit {set addline "\[$curTime\] *** [lindex $args 1] has quit IRC ([join [strip [lindex $args 5]]])"}topic {if {[lindex $args 1] == "*"} {return}set addline "\[$curTime\] *** [lindex $args 1] changes topic to '[join [strip [lindex $args 5]]]'"}kick {set addline "\[$curTime\] *** [lindex $args 5] was kicked by [lindex $args 1] ([lindex $args 6])"}nick {set addline "\[$curTime\] *** [lindex $args 1] is now known as [lindex $args 5]"}mode {set addline "\[$curTime\] *** [lindex $args 1] sets mode: [lindex $args 5] [lindex $args 6]"}part {set addline "\[$curTime\] *** [lindex $args 1] ([lindex $args 2]) has left [lindex $args 4] ([lindex $args 5])"}action {if {[lsearch -exact [string tolower $ignorenicks] [string tolower [lindex $args 1]]] == -1} {set addline "\[$curTime\] * [lindex $args 1] [join [strip [lindex $args 5]]]"} else {return 0}}sesdata {set addline [lindex $args 5]}}set writeout [open [file join $statslogdir $curFilename] a]puts $writeout $addlineclose $writeout}proc chatter {nick host handle channel text} {writelog chat $nick $host $handle $channel $text}proc enter {nick host handle channel} {writelog join $nick $host $handle $channel}proc signoff {nick host handle channel partmsg} {writelog quit $nick $host $handle $channel $partmsg}proc ctopic {nick host handle channel topic} {writelog topic $nick $host $handle $channel $topic}proc kicked {nick host handle channel target reason} {writelog kick $nick $host $handle $channel $target $reason}proc nickchange {nick host handle channel newnick} {writelog nick $nick $host $handle $channel $newnick}proc cmode {nick host handle channel change victim} {writelog mode $nick $host $handle $channel $change $victim}proc parting {nick host handle channel partmsg} {writelog part $nick $host $handle $channel $partmsg}proc action {nick host handle destination keyword arg} {writelog action $nick $host $handle $destination $arg}}putlog "Initializing $::mel::version...."putlog "$::mel::version - Running startup tests..."if {[::mel::starttests]} {putlog $::mel::starterrordie "Fatal error - Can not continue"} else {::mel::arrayinit::mel::logfile datestamp allif {$::mel::macmode == 0 &amp;&amp; $::mel::enabled == 1} {::mel::checktimer}::mel::checkstamptimerloadhelp mel.helpputlog "$::mel::version successfully initialized..."}### http://mel.sourceforge.net### Feel free to alter this tcl to your personal flavour... just don't forget who wrote the### original code... Also, if you find bugs, or even fix some.. then please let me know!</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11359">storm6699</a> — Thu Sep 23, 2010 5:59 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[marvz]]></name></author>
		<updated>2010-09-22T16:45:23-04:00</updated>

		<published>2010-09-22T16:45:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94477#p94477</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94477#p94477"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94477#p94477"><![CDATA[
Can you please post your script so I can take a look at it?<br><br>I had the same exact problem when I was using it. I did a .rehash and it started acting up.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11259">marvz</a> — Wed Sep 22, 2010 4:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[storm6699]]></name></author>
		<updated>2010-09-21T15:58:03-04:00</updated>

		<published>2010-09-21T15:58:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94471#p94471</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94471#p94471"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94471#p94471"><![CDATA[
I am using the version from a <a href="http://mel.sourceforge.net/" class="postlink">http://mel.sourceforge.net/</a>  and the script worked well until I made one occasion . / rehash and since then crashes eggdrp and prints error  <br><div class="codebox"><p>Code: </p><pre><code>[15:20] Tcl error in file 'eggdrop.conf':[15:20] expected integer but got "09" (looks like invalid octal number)while executing"expr [lindex $t 3] -1"(procedure "::mel::checkstamptimer" line 27)invoked from within"::mel::checkstamptimer"invoked from within"if {[::mel::starttests]} {putlog $::mel::starterrordie "Fatal error - Can not continue"} else {::mel::arrayinit::mel::logfile datestamp all..."(file "scripts/mel2.tcl" line 1105)invoked from within"source scripts/mel2.tcl"(file "eggdrop.conf" line 1360)[15:20] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)Connection closed by foreign host.</code></pre></div><br>In the meantime, I have not changed anything or added to the script to eggdrop<br><br>eggdrop1.6.19<br>TCL 8.4<br><br>sorry on my english<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11359">storm6699</a> — Tue Sep 21, 2010 3:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[marvz]]></name></author>
		<updated>2010-09-21T01:40:47-04:00</updated>

		<published>2010-09-21T01:40:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94458#p94458</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94458#p94458"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94458#p94458"><![CDATA[
Download it from here: <a href="http://mel.sourceforge.net/" class="postlink">http://mel.sourceforge.net/</a><br><br>I ended up removing the mel2 script and started using pisg. Not because I didn't like it but because my shell provider isn't compatible with the mel2 script.<br><br>If you still have a problem let me know and I can try looking for the old copy I had here with the fix.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11259">marvz</a> — Tue Sep 21, 2010 1:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[storm6699]]></name></author>
		<updated>2010-09-20T09:26:56-04:00</updated>

		<published>2010-09-20T09:26:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94452#p94452</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94452#p94452"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94452#p94452"><![CDATA[
there are no such lines in my mel2.tcl<blockquote class="uncited"><div>[15:20] Tcl error in file 'eggdrop.conf':<br>[15:20] expected integer but got "09" (looks like invalid octal number)<br>    while executing<br>"expr [lindex $t 3] -1"<br>    (procedure "::mel::checkstamptimer" line 27)<br>    invoked from within<br>"::mel::checkstamptimer"<br>    invoked from within<br>"if {[::mel::starttests]} {<br>        putlog $::mel::starterror<br>        die "Fatal error - Can not continue"<br>} else {<br>        ::mel::arrayinit<br>        ::mel::logfile datestamp all<br>        ..."<br>    (file "scripts/mel2.tcl" line 1105)<br>    invoked from within<br>"source scripts/mel2.tcl"<br>    (file "eggdrop.conf" line 1360)<br>[15:20] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)<br>Connection closed by foreign host.</div></blockquote>Is it possible that someone upload the correct mel2.tcl pls<br><br>thnx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11359">storm6699</a> — Mon Sep 20, 2010 9:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[marvz]]></name></author>
		<updated>2010-08-03T12:32:56-04:00</updated>

		<published>2010-08-03T12:32:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93736#p93736</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93736#p93736"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93736#p93736"><![CDATA[
Got it fixed thanks to simple on the undernet servers #tcl.<br><br>For those that may encounter the problem, here's the fix:<br><br>Locate this in the script<div class="codebox"><p>Code: </p><pre><code>expr [lindex [string trimleft $t 0] 3] -1</code></pre></div>Change it to this:<div class="codebox"><p>Code: </p><pre><code>expr [string trimleft [lindex $t 3] 0] -1</code></pre></div>Again, all credit goes to simple on IRC. Thanks!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11259">marvz</a> — Tue Aug 03, 2010 12:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[marvz]]></name></author>
		<updated>2010-08-03T12:33:19-04:00</updated>

		<published>2010-08-02T23:26:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93726#p93726</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93726#p93726"/>
		<title type="html"><![CDATA[Mel2 Error [SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93726#p93726"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>Eggdrop v1.6.19+ctcpfix (C) 1997 Robey Pointer (C) 2008 Eggheads[20:20] --- Loading eggdrop v1.6.19+ctcpfix (Mon Aug  2 2010)[20:20] Listening at telnet port 5555 (all).[20:20] Module loaded: blowfish        [20:20] Module loaded: dns             [20:20] Module loaded: channels        [20:20] Module loaded: server          [20:20] Module loaded: ctcp            [20:20] Module loaded: irc             [20:20] Module loaded: notes            (with lang support)[20:20] Module loaded: console          (with lang support)[20:20] Module loaded: uptime          [20:20] gseen.mod v1.1.1 dev3 loaded.[20:20] Module loaded: gseen           [20:20] LegoMan's Quote Database Script: Loading quote database...[20:20] LegoMan's Quote Database Script: for help on commands, type .helpqs[20:20] LegoMan's Quote Database Script [script_load]: Loaded 5 quotes from beersnob.quote_database[20:20] Loaded LegoMan's Quote Database Script v1.2.0 successfully.[20:20] Loading language "en" from language/gseen.en.lang...[20:20] Initializing mEL 2.0....[20:20] mEL 2.0 - Running startup tests...[20:20] mEL 2.0 - Tcl version 8.5 detected... OK.[20:20] mEL 2.0 - Eggdrop version 1.6.19+ctcpfix detected... OK.[20:20] mEL 2.0 - mel exists and is a directory... OK.[20:20] mEL 2.0 - mel/logs exists and is a directory... OK.[20:20] mEL 2.0 - Marvz is a valid user on this bot... OK.[20:20] mEL 2.0 - No channels defined. Use +chan first. Unable to add datestamp in logfile.[20:20] Tcl error in file 'beersnob.conf':[20:20] missing operator at _@_in expression "0_@_9 -1";looks like invalid octal number    (parsing expression "09 -1")    invoked from within"expr [lindex $t 3] -1"    (procedure "::mel::checkstamptimer" line 27)    invoked from within"::mel::checkstamptimer"    invoked from within"if {[::mel::starttests]} {putlog $::mel::starterrordie "Fatal error - Can not continue"} else {::mel::arrayinit::mel::logfile datestamp all..."    (file "scripts/mel2.tcl" line 1105)    invoked from within"source scripts/mel2.tcl"    (file "beersnob.conf" line 1362)[20:20] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)Marvin-Gomezs-MacBook:Eggdrop marvingomez$ </code></pre></div>I looked around for similar errors and couldn't find anything. The funny thing is that it worked before and now its not. I didn't do anything different or install anything new on the bot. It worked for a few days then one day I did a rehash and boom, I got this error. I'm trying to install ircstats now and they suggested that I use this to convert the log files into something that could be used by ircstats. Any help would be appreciated. thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11259">marvz</a> — Mon Aug 02, 2010 11:26 pm</p><hr />
]]></content>
	</entry>
	</feed>
