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

	<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>2021-01-03T18:59:20-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2021-01-03T18:59:20-04:00</updated>

		<published>2021-01-03T18:59:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109307#p109307</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109307#p109307"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109307#p109307"><![CDATA[
Ok, so I explain: the piece of code I add must be added to the previous code.<br>And as eggdrop is mono-server, it's useless to verify on which server it is connected.<br><br>So, here is the full code (based on mine):<div class="codebox"><p>Code: </p><pre><code>set packlist "lastpacks.txt"set maxentry 50set packchan "#channel1"set modchan "#channel2"set autonick {\[LWT\] \[TF\] ORATEGOD} # triggers "!add packs" commandbind pub - !add newpackproc newpack {nick uhost handle chan text} {   if {![string match -nocase $::packchan $chan]} { return }   set args [split $text]   if {![string match -nocase "packs" [lindex $args 0]]} { return }   if {[llength $args]&lt;2} {     putserv "NOTICE $nick :Syntax error: !add packs \00302release title\003"      return   }   set now [strftime "%d/%m/%Y (%Hh%M)"]   set fi [open $::packlist "a"]   puts $fi "[join [lrange $args 1 end]] $now"   close $fi}# triggers "!last", "!latest" and "!l" commandsbind pub - !last lastpackbind pub - !lastest lastpackbind pub - !l lastpackproc lastpack {nick uhost handle chan text} {   if {![string match -nocase $::modchan $chan]} { return }   set fo [open $::packlist "r"]   set packs [lrange [split [read -nonewline $fo] "\n"] end-50 end]   close $fo   foreach pack $packs {      putserv "PRIVMSG $nick :$pack"   }}# triggers when someone in $autonick list# type "new release ....."bind pub - "new" addautoproc addauto {nick uhost handle chan text} {  if {![string match -nocase $::packchan $chan]} { return }  set args [split $text]  if {![string match -nocase "release" [lindex $args 0]]} { return }  if {[lsearch -nocase $::autonick $nick]==-1} { return }  newpack $nick $uhost $handle $chan "newpack [join [lrange $args 1 end]]"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Sun Jan 03, 2021 6:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2021-01-03T16:24:30-04:00</updated>

		<published>2021-01-03T16:24:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109306#p109306</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109306#p109306"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109306#p109306"><![CDATA[
<blockquote class="uncited"><div><blockquote class="uncited"><div><strong class="text-strong">I complement it with this *.mrc // which I don't know how to write in TCL</strong><br><div class="codebox"><p>Code: </p><pre><code>;# ----------[ AutoAddLatest ]----------on *:TEXT:*:#Chan01:{  tokenize 32 $strip($1-)  if ( [LWT]- isin $nick || [TF]- isin $nick || ORATEGOD isin $nick ) {    if ( $1 == New &amp;&amp; Release isin $2 ) {      scon -a if ($network == NETWORK.IRC) msg #Chan01 !add packs $3    }  }}</code></pre></div></div></blockquote>This part of script will simply convert a line beginning by "New Release" on #chan01 on network.irc to a "!add packs" on #chan01, if user is [LWT], [TF] or ORATEGOD.<br>So it could be a short procedure:<div class="codebox"><p>Code: </p><pre><code>set autonick {\[LWT\] \[TF\] ORATEGOD}bind pub - "new" addautoproc addauto {nick uhost handle chan text} {  if {![string match -nocase $::packchan $chan]} { return }  set args [split $text]  if {![string match -nocase "release" [lindex $args 0]]} { return }  if {[lsearch -nocase $::autonick $nick]==-1} { return }  newpack $nick $uhost $handle $chan "newpack [join [lrange $args 1 end]]"}</code></pre></div></div></blockquote><strong class="text-strong">HAPPY YEAR FRIENDS !!</strong><br><br><br>nowhere in that code it does "!add packs thepackname"<br><strong class="text-strong">!add packs</strong><div class="codebox"><p>Code: </p><pre><code>scon -a if ($network == NETWORK.IRC) msg #Chan01 !add packs $3</code></pre></div>How can it be corrected?<br><span style="font-size:150%;line-height:116%"></span><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Sun Jan 03, 2021 4:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-12-31T06:31:59-04:00</updated>

		<published>2020-12-31T06:31:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109301#p109301</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109301#p109301"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109301#p109301"><![CDATA[
<blockquote class="uncited"><div><strong class="text-strong">I complement it with this *.mrc // which I don't know how to write in TCL</strong><br><div class="codebox"><p>Code: </p><pre><code>;# ----------[ AutoAddLatest ]----------on *:TEXT:*:#Chan01:{  tokenize 32 $strip($1-)  if ( [LWT]- isin $nick || [TF]- isin $nick || ORATEGOD isin $nick ) {    if ( $1 == New &amp;&amp; Release isin $2 ) {      scon -a if ($network == NETWORK.IRC) msg #Chan01 !add packs $3    }  }}</code></pre></div></div></blockquote>This part of script will simply convert a line beginning by "New Release" on #chan01 on network.irc to a "!add packs" on #chan01, if user is [LWT], [TF] or ORATEGOD.<br>So it could be a short procedure:<div class="codebox"><p>Code: </p><pre><code>set autonick {\[LWT\] \[TF\] ORATEGOD}bind pub - "new" addautoproc addauto {nick uhost handle chan text} {  if {![string match -nocase $::packchan $chan]} { return }  set args [split $text]  if {![string match -nocase "release" [lindex $args 0]]} { return }  if {[lsearch -nocase $::autonick $nick]==-1} { return }  newpack $nick $uhost $handle $chan "newpack [join [lrange $args 1 end]]"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Dec 31, 2020 6:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2020-12-30T23:49:59-04:00</updated>

		<published>2020-12-30T23:49:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109299#p109299</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109299#p109299"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109299#p109299"><![CDATA[
<strong class="text-strong">I work with these lines...</strong><br><div class="codebox"><p>Code: </p><pre><code># ==============================================================================================================================================================================# Add !latest set packlist "lastpacks.db"set maxentry 50# Donde se anuncian los packsset packchan "#Chan01"# Donde se muestra los 50 últimos packsset modchan "#Chan02" bind pub - !add newpackproc newpack {nick uhost handle chan text} {   if {![string match -nocase $::packchan $chan]} { return }   set args [split $text]   if {![string match -nocase "packs" [lindex $args 0]]} { return }   if {[llength $args]&lt;2} {     putserv "NOTICE $nick :Syntax error: !add packs \00302release title\003"      return   }   set now [strftime "%d/%m/%Y (%Hh%M)"]   set fi [open $::packlist "a"]   puts $fi "[join [lrange $args 1 end] $now]"   close $fi}bind pub - !latest lastpackbind pub - !l lastpackproc lastpack {nick uhost handle chan text} {   if {![string match -nocase $::modchan $chan]} { return }   set fo [open $::packlist "r"]   set packs [lrange [split [read -nonewline $fo] "\n"] end-50 end]   close $fo   putserv "NOTICE $nick : "   putserv "NOTICE $nick :\00309,01 ========================================\[ !Latest - 50 Packs \]======================================== \003"   foreach pack $packs {      putserv "NOTICE $nick :\00309,01 $pack \003"   }   putserv "NOTICE $nick :\00309,01 ======================================================================================================= \003"   putserv "NOTICE $nick :  "}</code></pre></div><br><strong class="text-strong">I complement it with this *.mrc // which I don't know how to write in TCL</strong><br><div class="codebox"><p>Code: </p><pre><code>;# ----------[ AutoAddLatest ]----------on *:TEXT:*:#Chan01:{  tokenize 32 $strip($1-)  if ( [LWT]- isin $nick || [TF]- isin $nick || ORATEGOD isin $nick ) {    if ( $1 == New &amp;&amp; Release isin $2 ) {      scon -a if ($network == NETWORK.IRC) msg #Chan01 !add packs $3    }  }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Wed Dec 30, 2020 11:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-12-30T05:30:19-04:00</updated>

		<published>2020-12-30T05:30:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109296#p109296</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109296#p109296"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109296#p109296"><![CDATA[
<blockquote class="uncited"><div><strong class="text-strong">Greetings ... It does not add the lines to txt, and it does not show the results of the triggers.<br><br><span style="text-decoration:underline">NOTE</span>: Thanks for the help you always give me in the forums.</strong><br><br>[11:28] &lt;~ORATEGOD&gt; !add packs Six.Days.ebooks.pdf<br>[11:28] &lt;~ORATEGOD&gt; !l<br>[11:29] &lt;~ORATEGOD&gt; !last<br>[11:29] &lt;~ORATEGOD&gt; !lastest</div></blockquote>Did you well set packchan and modchan ?<br>And I made 2 small errors:<br>@line 17, a ] is missing:<div class="codebox"><p>Code: </p><pre><code>puts $fi "[join [lrange $args 1 end]] $now"</code></pre></div>@line 26, bad opening of the file:<div class="codebox"><p>Code: </p><pre><code>set fo [open $::packlist "r"]</code></pre></div>If you used party-line and console mode +d, you'll get the error.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Wed Dec 30, 2020 5:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2020-12-29T11:36:29-04:00</updated>

		<published>2020-12-29T11:36:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109294#p109294</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109294#p109294"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109294#p109294"><![CDATA[
Cheers... Thanks for those references ... I'll study them.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Tue Dec 29, 2020 11:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2020-12-29T11:35:08-04:00</updated>

		<published>2020-12-29T11:35:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109293#p109293</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109293#p109293"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109293#p109293"><![CDATA[
<strong class="text-strong">Greetings ... It does not add the lines to txt, and it does not show the results of the triggers.<br><br><span style="text-decoration:underline">NOTE</span>: Thanks for the help you always give me in the forums.</strong><br><br>[11:28] &lt;~ORATEGOD&gt; !add packs Six.Days.ebooks.pdf<br>[11:28] &lt;~ORATEGOD&gt; !l<br>[11:29] &lt;~ORATEGOD&gt; !last<br>[11:29] &lt;~ORATEGOD&gt; !lastest<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Tue Dec 29, 2020 11:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2020-12-29T09:55:59-04:00</updated>

		<published>2020-12-29T09:55:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109292#p109292</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109292#p109292"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109292#p109292"><![CDATA[
Some good references to bookmark and use, when learning :<br><br><br><a href="http://suninet.the-demon.de/" class="postlink">http://suninet.the-demon.de/</a><br><br><a href="https://docs.eggheads.org/mainDocs/tcl-commands.html" class="postlink">https://docs.eggheads.org/mainDocs/tcl-commands.html</a><br><br><a href="http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm" class="postlink">http://www.tcl.tk/man/tcl8.6/TclCmd/contents.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Tue Dec 29, 2020 9:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2020-12-29T06:31:27-04:00</updated>

		<published>2020-12-29T06:31:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109291#p109291</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109291#p109291"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109291#p109291"><![CDATA[
You can probably begin to learn tcl, especially when you have basics mrc remotes.<br><br><strong class="text-strong">on *:TEXT</strong> is a <strong class="text-strong">bind pub</strong> (or pubm if text begins with *)<br><div class="codebox"><p>Code: </p><pre><code>set packlist "lastpacks.txt"set maxentry 50set packchan "#channel1"set modchan "#channel2"bind pub - !add newpackproc newpack {nick uhost handle chan text} {   if {![string match -nocase $::packchan $chan]} { return }   set args [split $text]   if {![string match -nocase "packs" [lindex $args 0]]} { return }   if {[llength $args]&lt;2} {     putserv "NOTICE $nick :Syntax error: !add packs \00302release title\003"      return   }   set now [strftime "%d/%m/%Y (%Hh%M)"]   set fi [open $::packlist "a"]   puts $fi "[join [lrange $args 1 end] $now"   close $fi}bind pub - !last lastpackbind pub - !lastest lastpackbind pub - !l lastpackproc lastpack {nick uhost handle chan text} {   if {![string match -nocase $::modchan $chan]} { return }   set fo [open $::packlist "w"]   set packs [lrange [split [read -nonewline $fo] "\n"] end-50 end]   close $fo   foreach pack $packs {      putserv "PRIVMSG $nick :$pack"   }}</code></pre></div>Not tested, but may work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Tue Dec 29, 2020 6:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ORATEGOD]]></name></author>
		<updated>2020-12-28T22:45:23-04:00</updated>

		<published>2020-12-28T22:45:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=109289#p109289</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=109289#p109289"/>
		<title type="html"><![CDATA[change mrc to tcl (please help)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=109289#p109289"><![CDATA[
<strong class="text-strong">I already appreciate the help for this * .mrc (change it to * .tcl)</strong><br><br><div class="codebox"><p>Code: </p><pre><code>; ---------------------------------------------; AGREGA NUEVOS PACKS A UN TXT (lastpacks.txt).; ADD NEW PACKS TO A TXT (lastpacks.txt).; ---------------------------------------------on *:TEXT:!add packs*:#Channel1:{  if ($nick isop $chan) {    if (!$3) { .notice $nick 04[02 LastBot 04][02 syntax error04:02 !add packs 04(02Release Title04) 04] | halt }    while ($lines(lastpacks.txt) &gt;= 50) { write -dl1 lastpacks.txt }    write lastpacks.txt $3- 12(02 $+ $date $+ 12)     msg #Channel1 04[02 Latest Packs Added04:02 $3- 04(02 $+ $date $+ 04) 04]  }}; ------------------------------------------------; MUESTRA LOS ULTIMOS 50 PACKS SUBIDOS A LOS BOTS.; SHOW THE LAST 50 PACKS UPLOADED TO THE BOTS.; Triggers: !last - !latest - !l; ------------------------------------------------on *:TEXT:!last:#Channel2:{  var %i 50  var %c 1  .notice $nick 04[02 LastBot 04][02 Latest Releases04. 04]  while (%i &gt; 0) {    .notice $nick 04[02 Release $chr(35) $+ %c $+ 04:02 $gettok($read(lastpacks.txt,%i),1,32) 04][02 Added04:02 $gettok($read(lastpacks.txt,%i),2-,32) $+ 04. 04]    dec %i    inc %c  }}}}</code></pre></div><br><br>Note ... this mrc I could test it and it works in a good way ... it is only for moderators (@) of a channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12869">ORATEGOD</a> — Mon Dec 28, 2020 10:45 pm</p><hr />
]]></content>
	</entry>
	</feed>
