<?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/9926" />

	<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>2005-07-02T08:54:03-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-07-02T08:54:03-04:00</updated>

		<published>2005-07-02T08:54:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51655#p51655</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51655#p51655"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51655#p51655"><![CDATA[
lol, this is not a constant patience though <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> it depends on the mood <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Sat Jul 02, 2005 8:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-01T21:25:09-04:00</updated>

		<published>2005-07-01T21:25:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51629#p51629</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51629#p51629"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51629#p51629"><![CDATA[
Sir_Fz, I admire your patience reviewing messy, not formatted code <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 01, 2005 9:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-06-30T12:02:17-04:00</updated>

		<published>2005-06-30T12:02:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51567#p51567</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51567#p51567"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51567#p51567"><![CDATA[
Try replacing <div class="codebox"><p>Code: </p><pre><code>proc save_history {} {  global todo_history  set wfile [open scripts/todo_history.lst w]  foreach entry [array names todo_history] {  catch {unset temp}   array set temp $todo_history($channel)   foreach entry [array names temp] {    puts $wfile "$channel $entry $temp($entry)"   }  }  close $wfile }</code></pre></div>with <div class="codebox"><p>Code: </p><pre><code>proc save_history {} {  global todo_history  set wfile [open scripts/todo_history.lst w]  foreach channel [array names todo_history] {   catch {unset temp}   array set temp $todo_history($channel)   foreach entry [array names temp] {   puts $wfile "$channel $entry $temp($entry)"   }  }  close $wfile }</code></pre></div> <br>I don't know how the author haven't fixed this error since it's too obvious <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> <br><br>PS: next time use <div class="codebox"><p>Code: </p><pre><code> tags when posting a script.</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Jun 30, 2005 12:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dvibe]]></name></author>
		<updated>2005-06-30T07:26:15-04:00</updated>

		<published>2005-06-30T07:26:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51558#p51558</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51558#p51558"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51558#p51558"><![CDATA[
Currently: can't read "channel": no such variable<br>Currently:     while executing<br>Currently: "array set temp $todo_history($channel)"<br>Currently:     (procedure "save_history" line 6)<br>Currently:     invoked from within<br>Currently: "save_history"<br>Currently:     ("complete" arm line 73)<br>Currently:     invoked from within<br>Currently: "switch $option {<br>Currently:      add             {<br>Currently:                        if {[string equal {} $args]} {<br>Currently:                          putnot $nick "Usage: !todo \[#channel\] add &lt;message&gt;"<br>Currently:                          return 0<br>Currently:                        }<br>Currently:                       ..."<br>Currently:     (procedure "pub_todo" line 22)<br>Currently:     invoked from within<br>Currently: "pub_todo $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6417">dvibe</a> — Thu Jun 30, 2005 7:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dvibe]]></name></author>
		<updated>2005-06-30T07:23:59-04:00</updated>

		<published>2005-06-30T07:23:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51557#p51557</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51557#p51557"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51557#p51557"><![CDATA[
[11:27] Tcl error [pub_todo]: can't read "channel": no such variable<br>.set errorinfo<br>[11:27] #EBiV-D# set errorinfo<br>Error: can't read "errorinfo": no such variable<br>.set errorInfo<br>[11:27] #EBiV-D# set errorInfo<br>Currently: can't read "errorinfo": no such variable<br>Currently:     while executing<br>Currently: "set errorinfo"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6417">dvibe</a> — Thu Jun 30, 2005 7:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-06-30T07:18:45-04:00</updated>

		<published>2005-06-30T07:18:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51555#p51555</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51555#p51555"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51555#p51555"><![CDATA[
In the eggdrop's conf file you have:<blockquote class="uncited"><div># Comment these two lines if you wish to enable the .tcl and .set commands.<br># If you select your owners wisely, you should be okay enabling these.<br>#unbind dcc n tcl *dcc:tcl<br>#unbind dcc n set *dcc:set</div></blockquote>where there's no # behind the unbinds, add them and rehash. And if you have must-be-owner set to 1, make sure your handle is added in the 'set owner'.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Jun 30, 2005 7:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dvibe]]></name></author>
		<updated>2005-06-30T06:58:09-04:00</updated>

		<published>2005-06-30T06:58:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51553#p51553</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51553#p51553"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51553#p51553"><![CDATA[
on dcc chat on bot<br><br>.set errorInfo<br><br>get<br><br>what? You need ´.help´<br><br>sorry newbie<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6417">dvibe</a> — Thu Jun 30, 2005 6:58 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2005-06-30T06:26:01-04:00</updated>

		<published>2005-06-30T06:26:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51551#p51551</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51551#p51551"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51551#p51551"><![CDATA[
type '.set errorInfo' in the partyline so we can know more about the error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Thu Jun 30, 2005 6:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dvibe]]></name></author>
		<updated>2005-06-30T06:21:26-04:00</updated>

		<published>2005-06-30T06:21:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=51550#p51550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=51550#p51550"/>
		<title type="html"><![CDATA[TODO.TCL get some Error]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=51550#p51550"><![CDATA[
<strong class="text-strong">Hi !<br><br>Need Help please:<br><br>on Irc channel command<br><br>!todo #testchannel complete 1 <br><br>get this error on bot<br><br>Tcl error [pub_todo]: cant read "channel": no such varaible<br><br>what can i do ?  SOME TCL NEWBIE !</strong><br><br># Todo list<br>#<br># Description: Todo list to track work and accomplished work.<br>#        keeps history and what not.<br>#<br># Features: History Storing. Startup and Completion tracking. <br>#<br># Usage: !todo (It'll display commands and options)<br>#<br># Author: eRUPT(<a href="mailto:erupt@ruptbot.com">erupt@ruptbot.com</a>)<br><br>##################<br># Version History<br>#<br># - v0.1 -<br># First Release<br># - v0.1a -<br># Fixed missing shortcut proc(putnot).<br># - v0.2 -<br># Added channel specific lists.<br># Added move command to help support new channel specific lists.<br># - v0.3 -<br># Added channel allow lists.<br>#<br>############<br><br>#Channels allowed to use ToDo list.<br>#*TIP* If you have eggdrop1.5 or above use the channel set method *TIP*<br>#[Alternatively you can use "channel set #channel +todo" to turn on and "-todo" to turn off]<br>#[If you have the .tcl prompt on in dcc chat you can use .tcl channel set #channel +todo]<br>set todo_channels {<br>  #testchannel<br>}<br><br><br>set todo_ver "v0.3"<br><br>if {![file exists scripts/todo.lst]} {<br>  set wfile [open scripts/todo.lst w]<br>  puts $wfile ""<br>  close $wfile<br>}<br>if {![file exists scripts/todo_history.lst]} {<br>  set wfile [open scripts/todo_history.lst w]<br>  puts $wfile ""<br>  close $wfile<br>}<br><br>if {[lindex $version 1]&gt;=1050000} { setudef flag todo }<br><br>proc putnot {nick msg} { putserv "NOTICE $nick :$msg" }<br><br><br><br>proc load_todo {} {<br>  global todo<br>  set rfile [open scripts/todo.lst r]<br>  set upgrade 0<br>  while {![eof $rfile]} {<br>    set line [gets $rfile]<br>    if {$line==""} { continue }<br>    set err ""<br>    if {![string equal {g} [string index $line 0]] &amp;&amp; ![string equal {#} [string index $line 0]]} {<br>      set line [linsert $line 0 global]<br>      set upgrade 1<br>    }<br>    set channel [lindex $line 0]<br>    if {[info exists temp($channel)]} {<br>      append temp($channel) " " [list [lindex $line 1] [lrange $line 2 end]]<br>    } else {<br>        set temp($channel) [list [lindex $line 1] [lrange $line 2 end]]<br>      }<br>  }<br>  close $rfile<br>  array set todo [array get temp]<br>  if {$upgrade} { putlog "Upgraded Todo list files." ; save_todo }<br>}<br><br>proc load_history {} {<br>  global todo_history<br>  set rfile [open scripts/todo_history.lst r]<br>  set upgrade 0<br>  while {![eof $rfile]} {<br>    set line [gets $rfile]<br>    if {$line==""} { continue }<br>    set err ""<br>    if {![string equal {g} [string index $line 0]] &amp;&amp; ![string equal {#} [string index $line 0]]} {<br>      set line [linsert $line 0 global]<br>      set upgrade 1<br>    }<br>    set channel [lindex $line 0]<br>    if {[info exists temp($channel)]} {<br>      append temp($channel) " " [list [lindex $line 1] [lrange $line 2 end]]<br>    } else {<br>        set temp($channel) [list [lindex $line 1] [lrange $line 2 end]]<br>      }<br>  }<br>  close $rfile<br>  array set todo_history [array get temp]<br>  if {$upgrade} { putlog "Upgraded Todo_History list files." ; save_todo }<br>}<br><br>proc save_todo {} {<br>  global todo<br>  set wfile [open scripts/todo.lst w]<br>  foreach channel [array names todo] {<br>    catch {unset temp}<br>    array set temp $todo($channel)<br>    foreach entry [array names temp] {<br>      puts $wfile "$channel $entry $temp($entry)"<br>    }<br>  }<br>  close $wfile<br>}<br><br>proc save_history {} {<br>  global todo_history<br>  set wfile [open scripts/todo_history.lst w]<br>  foreach entry [array names todo_history] {<br>    catch {unset temp}<br>    array set temp $todo_history($channel)<br>    foreach entry [array names temp] {<br>      puts $wfile "$channel $entry $temp($entry)"<br>    }<br>  }<br>  close $wfile<br>}<br><br>bind pub m|o !todo pub_todo<br><br>proc pub_todo {nick uhost hand chan arg} {<br>  global todo todo_history todo_channels version<br>  if {[lindex $version 1]&gt;1050000} {<br>    if {![channel get $chan todo]} { if {[lsearch $todo_channels [string tolower $chan]] == -1} { return 0 } }<br>  } else { if {[lsearch $todo_channels [string tolower $chan]] == -1} { return 0 } }<br>  if {$arg==""} {<br>    putnot $nick "  Usage: !todo \[#channel\] &lt;option&gt; \[arguments\]"<br>    putnot $nick "Options: add delete move list complete history"<br>    return 0<br>  }<br>  set channel "global"<br>  if {[string equal [string index $arg 0] #]} {<br>    set channel [lindex $arg 0]<br>    set arg [lrange $arg 1 end]<br>    if {[lsearch [string tolower [channels]] $channel] == -1} {<br>      putnot $nick "Invalid channel requested!"<br>      return 0<br>    }<br>  }<br>  set option [lindex $arg 0]<br>  set args [lrange $arg 1 end]<br>  switch $option {<br>add{<br>  if {[string equal {} $args]} {<br>    putnot $nick "Usage: !todo \[#channel\] add &lt;message&gt;"<br>    return 0<br>  }<br>  if {[string equal {*} $hand]} { set who $nick } else { set who $hand }<br>  if {[info exists todo($channel)]} { array set local_todo $todo($channel) }<br>  set local_todo([clock seconds]) "$who $args"<br>  set todo($channel) [array get local_todo]<br>  save_todo<br>  putnot $nick "Added new Todo item \002$args\002"<br>  return 0<br>}<br>delete{<br>  if {[string equal {} $args]} {<br>    putnot $nick "Usage: !todo \[#channel\] delete &lt;number&gt; \[history\]"<br>    putnot $nick "*TIP* Use !todo list to view numbers *TIP*"<br>    putnot $nick "Valid Number Formats: #-#(Number Range) , #,#,#(Set of Numbers) , #(Single Number)"<br>    return 0<br>  }<br>  if {[info exists todo($channel)]} {<br>    array set local_todo $todo($channel)<br>  }<br>  if {[info exists todo_history($channel)]} {<br>    array set local_todo_history $todo_history($channel)<br>  }<br>  if {[string equal -nocase {history} [lindex $args end]]} {<br>    set arraylist [lsort -increasing [array names local_todo_history]]<br>  } else { set arraylist [lsort -increasing [array names local_todo]] }<br>  if {[string match *-* [lindex $args 0]]} {<br>    set start [lindex [split [lindex $args 0] -] 0]<br>    set end [lindex [split [lindex $args 0] -] 1]<br>    if {$start&gt;$end} {<br>      putnot $nick "\002$start\002 can't be larger then \002$end\002 retard. Use a correct range."<br>      return 0<br>    }<br>    if {[string equal {} [lindex $arraylist [expr $end - 1]]]} {<br>      putnot $nick "Illegal range specified"<br>      return 0<br>    }<br>    foreach stamp [lrange $arraylist [expr $start - 1] [expr $end - 1]] {<br>      if {[string equal -nocase {history} [lindex $args end]]} {<br>unset local_todo_history($stamp)<br>      } else { unset local_todo($stamp) }<br>    }<br>    if {[string equal -nocase {history} [lindex $args end]]} {<br>set todo_history($channel) [array get local_todo_history]<br>    } else {<br>        set todo($channel) [array get local_todo]<br>      }<br>    putnot $nick "Entries $start -&gt; $end deleted"<br>    save_todo ; save_history<br>    return 1<br>  }<br>  if {[string match *,* [lindex $args 0]]} {<br>    set unable ""<br>    set usable ""<br>    set list [split [lindex $args 0] ,]<br>    foreach num $list {<br>      if {[regexp {[^0-9]} $num]} { lappend unable $num } else { if {$num&gt;[llength $arraylist]} { lappend unable $num } else { lappend usable $num } }<br>    }<br>    if {[string equal {} $usable]} {<br>      putnot $nick "Nothing valid to delete."<br>      putnot $nick "Invalid Entries: \002$unable\002"<br>      return 0<br>    }<br>    putnot $nick "Deleting entries \002$usable\002"<br>    foreach num $usable {<br>      set key [lindex $arraylist [expr $num - 1]]<br>      if {[string equal -nocase {history} [string tolower [lindex $args end]]]} {<br>        unset local_todo_history($key)<br>      } else {<br>  unset local_todo($key)<br>}<br>    }<br>    if {[string equal -nocase {history} [lindex $args end]]} {<br>set todo_history($channel) [array get local_todo_history]<br>    } else {<br>        set todo($channel) [array get local_todo]<br>      }<br>    if {$unable!=""} {<br>      putnot $nick "Invalid Entries: \002$unable\002"<br>    }<br>    save_todo ; save_history<br>    return 1<br>  }<br>  set num [lindex $args 0]<br>  if {$num&gt;[llength $arraylist]} {<br>    putnot $nick "Invalid Entry: \002$num\002"<br><br>  }<br>  set key [lindex $arraylist [expr $num - 1]]<br>  if {[string equal -nocase {history} [lindex $args end]]} {<br>    unset local_todo_history($key)<br>  } else { unset local_todo($key) }<br>    if {[string equal -nocase {history} [lindex $args end]]} {<br>set todo_history($channel) [array get local_todo_history]<br>    } else {<br>        set todo($channel) [array get local_todo]<br>      }<br>  putnot $nick "Deleted $num"<br>  save_todo ; save_history<br>}<br>move{<br>  if {[string equal {} $args]} {<br>    putnot $nick "Usage: !todo move &lt;entry number&gt; &lt;from_channel_list&gt; &lt;to_channel_list&gt;"<br>    putnot $nick "*NOTE* Use global as channel name to move from and to global area *NOTE*"<br>    putnot $nick "Valid Number Formats: #-#(Number Range) , #,#,#(Set of Numbers) , #(Single Number)"<br>    return 0<br>  }<br>  set from_channel [lindex $args 1]<br>  set to_channel [lindex $args 2]<br>  if {[string equal -nocase $from_channel $to_channel]} {<br>    putnot $nick "Won't move to the same channel, waste of my brain power."<br>    return 0<br>  }<br>  if {(![string equal {#} [string index $from_channel 0]] &amp;&amp; ![string equal -nocase {global} $from_channel]) || (![string equal {#} [string index $to_channel 0]] &amp;&amp; ![string equal -nocase {global} $to_channel])} {<br>    putnot $nick "You need to specify channels, or otherwise the global area."<br>    return 0<br>  }<br>  if {[string equal -nocase {global} $to_channel]} {<br>    set to_channel "global"<br>  } else {<br>    if {[lsearch [string tolower [channels]] $to_channel] == -1} {<br>      putnot $nick "Invalid channel requested!"<br>      return 0<br>    }<br>  }<br>  if {[string equal -nocase {global} $from_channel]} {<br>    set from_channel "global"<br>  } else {<br>    if {[lsearch [string tolower [channels]] $from_channel] == -1} {<br>      putnot $nick "Invalid channel requested!"<br>      return 0<br>    }<br>  }<br>  if {[info exists todo($to_channel)]} {<br>    array set local_to_todo $todo($to_channel)<br>  }<br>  if {![info exists todo($from_channel)]} {<br>    putnot $nick "No items in current todo list."<br>  } else {<br>    array set local_from_todo $todo($from_channel)<br>    set from_arraylist [lsort -increasing [array names local_from_todo]]<br>  }<br>  if {[string match *-* [lindex $args 0]]} {<br>    set start [lindex [split [lindex $args 0] -] 0]<br>    set end [lindex [split [lindex $args 0] -] 1]<br>    if {$start&gt;$end} {<br>      putnot $nick "\002$start\002 can't be larger then \002$end\002 retard. Use a correct range."<br>      return 0<br>    }<br>    if {[string equal {} [lindex $from_arraylist [expr $end - 1]]]} {<br>      putnot $nick "Illegal range specified"<br>      return 0<br>    }<br>    foreach stamp [lrange $from_arraylist [expr $start - 1] [expr $end - 1]] {<br>      set local_to_todo($stamp) $local_from_todo($stamp)<br>      unset local_from_todo($stamp)<br>    }<br>    set todo($from_channel) [array get local_from_todo]<br>    set todo($to_channel) [array get local_to_todo]<br>    putnot $nick "Entries $start -&gt; $end moved from $from_channel -&gt; $to_channel" <br>    save_todo ; save_history<br>    return 1<br>  }<br>  if {[string match *,* [lindex $args 0]]} {<br>    set unable ""<br>    set usable ""<br>    set list [split [lindex $args 0] ,]<br>    foreach num $list {<br>      if {[regexp {[^0-9]} $num]} { lappend unable $num } else { if {$num&gt;[llength $from_arraylist]} { lappend unable $num } else { lappend usable $num } }<br>    }<br>    if {[string equal {} $usable]} {<br>      putnot $nick "Nothing valid to move."<br>      putnot $nick "Invalid Entries: \002$unable\002"<br>      return 0<br>    }<br>    putnot $nick "Moving entries \002$usable\002"<br>    foreach num [lsort -decreasing $usable] {<br>      set key [lindex $from_arraylist [expr $num - 1]]<br>      set local_to_todo($key) $local_from_todo($key)<br>      unset local_from_todo($key)<br>    }<br>    set todo($from_channel) [array get local_from_todo]<br>    set todo($to_channel) [array get local_to_todo]<br>    if {$unable!=""} {<br>      putnot $nick "Invalid Entries: \002$unable\002"<br>    }<br>    save_todo ; save_history<br>    return 1<br>  }<br>  set num [lindex $args 0]<br>  if {$num&gt;[llength $from_arraylist]} {<br>    putnot $nick "Invalid Entry: \002$num\002"<br><br>  }<br>  set key [lindex $from_arraylist [expr $num - 1]]<br>  set local_to_todo($key) $local_from_todo($key)<br>  unset local_from_todo($key)<br>  set todo($from_channel) [array get local_from_todo]<br>  set todo($to_channel) [array get local_to_todo]<br>  putnot $nick "Moved $num from $from_channel -&gt; $to_channel"<br>  save_todo ; save_history<br>}<br>list{<br>  if {![info exists todo($channel)]} {<br>    putnot $nick "No items in current todo list."<br>    return 0<br>  }<br>  array set local_todo $todo($channel)<br>  set keys [array names local_todo]<br>  if {[llength $keys]==0} {<br>    putnot $nick "No items in current todo list."<br>    return 0<br>  }<br>  set count 1<br>  foreach key [lsort -increasing $keys] {<br>    set curr [join $local_todo($key)]<br>    putnot $nick "$count.) \002[lrange $curr 1 end]\002 by \002[lindex $curr 0]\002 at [clock format $key -format %m/%d/%Y-%l:%M]"<br>    incr count<br>  }<br>}<br>complete{<br>  if {$args==""} {<br>    putnot $nick "Usage: !todo \[#channel\] complete &lt;number&gt;"<br>    putnot $nick "*TIP* Use !todo list to view numbers *TIP*"<br>    putnot $nick "Valid Number Formats: #-#(Number Range) , #,#,#(Set of Numbers) , #(Single Number)"<br>    return 0<br>  }<br>  if {![info exists todo($channel)]} {<br>    putnot $nick "No items in current todo list."<br>  }<br>  array set local_todo $todo($channel)<br>  if {[info exists todo_history($channel)]} { array set local_todo_history $todo_history($channel) }<br>  set arraylist [lsort -increasing [array names local_todo]]<br>  if {[string match *-* [lindex $args 0]]} {<br>    set start [lindex [split [lindex $args 0] -] 0]<br>    set end [lindex [split [lindex $args 0] -] 1]<br>    if {$start&gt;$end} {<br>      putnot $nick "\002$start\002 can't be larger then \002$end\002 retard. Use a correct range."<br>      return 0<br>    }<br>    if {[string equal {} [lindex $arraylist [expr $end - 1]]]} {<br>      putnot $nick "Illegal range specified"<br>      return 0<br>    }<br>    foreach stamp [lrange $arraylist [expr $start - 1] [expr $end - 1]] {<br>      set local_todo_history($stamp) "[unixtime] $todo($stamp)"<br>      unset local_todo($stamp)<br>    }<br>    set todo_history($channel) [array get local_todo_history]<br>    set todo($channel) [array get local_todo]<br>    putnot $nick "Entries $start -&gt; $end completed"<br>    save_todo ; save_history<br>    return 1<br>  }<br>  if {[string match *,* [lindex $args 0]]} {<br>    set unable ""<br>    set usable ""<br>    set list [split [lindex $args 0] ,]<br>    foreach num $list {<br>      if {[regexp {[^0-9]} $num]} { lappend unable $num } else { if {$num&gt;[llength $arraylist]} { lappend unable $num } else { lappend usable $num } }<br>    }<br>    if {$usable==""} {<br>      putnot $nick "Nothing valid to complete."<br>      putnot $nick "Invalid Entries: \002$unable\002"<br>      return 0<br>    }<br>    putnot $nick "Completing entries \002$usable\002"<br>    foreach num $usable {<br>      set key [lindex $arraylist [expr $num - 1]]<br>      set local_todo_history($key) "[unixtime] $todo($key)"<br>      unset local_todo($key)<br>    }<br>    if {$unable!=""} {<br>      putnot $nick "Invalid Entries: \002$unable\002"<br>    }<br>    set todo_history($channel) [array get local_todo_history]<br>    set todo($channel) [array get local_todo]<br>    save_todo ; save_history<br>    return 1<br>  }<br>  set num [lindex $args 0]<br>  if {$num&gt;[llength $arraylist]} {<br>    putnot $nick "Invalid Entry: \002$num\002"<br><br>  }<br>  set key [lindex $arraylist [expr $num - 1]]<br>  set local_todo_history($key) "[unixtime] $local_todo($key)"<br>  unset local_todo($key)<br>  putnot $nick "Completed $num"<br>  set todo_history($channel) [array get local_todo_history]<br>  set todo($channel) [array get local_todo]<br>  save_todo<br>  save_history<br>}<br>history{<br>  if {[info exists todo_history($channel)]} {<br>    array set local_todo_history $todo_history($channel)<br>  } else {<br>      putnot $nick "No items in current history list."<br>      return 0<br>    }<br>  set keys [array names local_todo_history]<br>  if {[llength $keys]=="0"} {<br>    putnot $nick "No items in current history list."<br>    return 0<br>  }<br>  set count 1<br>  foreach key [lsort -increasing $keys] {<br>    set curr $local_todo_history($key)<br>    putnot $nick "$count.) \002[lrange $curr 2 end]\002 by \002[lindex $curr 1]\002 at [clock format $key -format %m/%d/%Y-%l:%M] Completed on: [clock format [lindex $curr 0] -format %m/%d/%Y-%l:%M]"<br>    incr count<br>  }<br>}<br>  }<br>}<br>load_todo<br>load_history<br><br>putlog "Todo list tracking by eRUPT(<a href="mailto:erupt@ruptbot.com">erupt@ruptbot.com</a>) $todo_ver"<br><span style="font-size:75%;line-height:116%"></span><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6417">dvibe</a> — Thu Jun 30, 2005 6:21 am</p><hr />
]]></content>
	</entry>
	</feed>
