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

	<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>2012-09-02T20:39:19-04:00</updated>

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

		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-09-02T20:39:19-04:00</updated>

		<published>2012-09-02T20:39:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99982#p99982</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99982#p99982"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99982#p99982"><![CDATA[
Probably problems with finding the ads file.<br>Let's try it with some error lines added...<br><div class="codebox"><p>Code: </p><pre><code># set the route and file name of the channel ads file ## make the ads file as a plain text document, 1 ad per file line #set prnl(ad-file) "scripts/ad-file.txt"# The channels to msg: #chan1 #chan2 #etc  (* = all channels) #set prnl(chans) {*}# The minimum number of minutes between channel ads  (1 or more minutes) #set prnl(min-lo) 5# The maximum number of minutes between channel ads  (same or above min-lo) #set prnl(min-hi) 10# Read the lines in order or random  (1=inorder || 2=random) #set prnl(order) 2###### END OF SETTINGS ######set prnl(msgs) ""if {![file exists $prnl(ad-file)]} {  putlog "PRNL Error: Unable to find file: $prnl(ad-file)"  putlog "Public Read Next Line v1.4 NOT loaded!"  return}set prnl(tm-open) [open $prnl(ad-file)]while {![eof $prnl(tm-open)]} { set prnl(tm-line) [string trim [gets $prnl(tm-open)]] if {$prnl(tm-line) ne ""} {   lappend prnl(msgs) $prnl(tm-line) }}close $prnl(tm-open)unset prnl(tm-open) prnl(tm-line) prnl(ad-file)if {$prnl(msgs) eq ""} {  putlog "PRNL Error: No text in ad file: $prnl(ad-file)"  putlog "Public Read Next Line v1.4 NOT loaded!"  return}if {$prnl(chans) eq "*" || $prnl(chans) eq ""} {  set prnl(chans) [channels]  }if {![info exists prnl(next)]} {  set prnl(next) 0  }if {![info exists prnl(timer)]} { set prnl(timer) [timer 2 [list prnl:rnext]] }if {$prnl(min-hi)&lt;$prnl(min-lo)} {  set prnl(min-hi) $prnl(min-lo)  }proc prnl:rnext {} {  global prnl if {$prnl(msgs) eq ""} {  return  } if {$prnl(order)=="2"} {  set prnl(next) [rand [llength $prnl(msgs)]]  } foreach ch $prnl(chans) {  puthelp "PRIVMSG $ch :[lindex $prnl(msgs) $prnl(next)]" } incr prnl(next) if {$prnl(next)&gt;=[llength $prnl(msgs)]} {  set prnl(next) 0  } set randmin $prnl(min-lo) if {$prnl(min-hi)&gt;$prnl(min-lo)} {   incr randmin [rand [expr {$prnl(min-hi)-$prnl(min-lo)+1}]] } set prnl(timer) [timer $randmin [list prnl:rnext]]}putlog "Public Read Next Line v1.4 loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Sep 02, 2012 8:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2012-09-02T20:28:44-04:00</updated>

		<published>2012-09-02T20:28:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99981#p99981</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99981#p99981"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99981#p99981"><![CDATA[
has been tested and does not work at all<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Sun Sep 02, 2012 8:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-09-02T02:34:35-04:00</updated>

		<published>2012-09-02T02:34:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99978#p99978</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99978#p99978"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99978#p99978"><![CDATA[
<blockquote class="uncited"><div>1. timer to use static/dynamric </div></blockquote>To have the ads always on the same time interval, set min-lo &amp; min-hi both to the same number of minutes.<br><br><blockquote class="uncited"><div>no working properly if in the quotes has [,],(,),%,&amp;,!, .</div></blockquote>The issue there is with a few tcl special characters.<br>We can get around that by storing all our ad lines to a plain text file, and not in the script tcl file.<br>Make a ad-file.txt, and put it in the scripts dir with this new script...<br><div class="codebox"><p>Code: </p><pre><code># set the route and file name of the channel ads file ## make the ads file as a plain text document, 1 ad per file line #set prnl(ad-file) "scripts/ad-file.txt"# The channels to msg: #chan1 #chan2 #etc  (* = all channels) #set prnl(chans) {*}# The minimum number of minutes between channel ads  (1 or more minutes) #set prnl(min-lo) 5# The maximum number of minutes between channel ads  (same or above min-lo) #set prnl(min-hi) 10# Read the lines in order or random  (1=inorder || 2=random) #set prnl(order) 2###### END OF SETTINGS ######set prnl(msgs) ""if {![file exists $prnl(ad-file)]} {  return  }set prnl(tm-open) [open $prnl(ad-file)]while {![eof $prnl(tm-open)]} { set prnl(tm-line) [string trim [gets $prnl(tm-open)]] if {$prnl(tm-line) ne ""} {   lappend prnl(msgs) $prnl(tm-line) }}close $prnl(tm-open)unset prnl(tm-open) prnl(tm-line) prnl(ad-file)if {$prnl(msgs) eq ""} {  return  }if {$prnl(chans) eq "*" || $prnl(chans) eq ""} {  set prnl(chans) [channels]  }if {![info exists prnl(next)]} {  set prnl(next) 0  }if {![info exists prnl(timer)]} { set prnl(timer) [timer 2 [list prnl:rnext]] }if {$prnl(min-hi)&lt;$prnl(min-lo)} {  set prnl(min-hi) $prnl(min-lo)  }proc prnl:rnext {} {  global prnl if {$prnl(msgs) eq ""} {  return  } if {$prnl(order)=="2"} {  set prnl(next) [rand [llength $prnl(msgs)]]  } foreach ch $prnl(chans) {  puthelp "PRIVMSG $ch :[lindex $prnl(msgs) $prnl(next)]" } incr prnl(next) if {$prnl(next)&gt;=[llength $prnl(msgs)]} {  set prnl(next) 0  } set randmin $prnl(min-lo) if {$prnl(min-hi)&gt;$prnl(min-lo)} {   incr randmin [rand [expr {$prnl(min-hi)-$prnl(min-lo)+1}]] } set prnl(timer) [timer $randmin [list prnl:rnext]]}putlog "Public Read Next Line v1.3 loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Sep 02, 2012 2:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2012-09-02T01:01:50-04:00</updated>

		<published>2012-09-02T01:01:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99977#p99977</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99977#p99977"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99977#p99977"><![CDATA[
okay, but can you keep both timers i mean to looks something like that:<br><br>1. timer to use static/dynamric<br>a. static - in the first post ( where always post a reply on same time )<br>b. dynamic - last post ( where use the values min and max )<br>2. possible bugs ( tested ):<br>no working properly if in the quotes has [,],(,),%,&amp;,!, .<br>example:<br>Dr. Kucho! feat. Aris - Doing Better Without You (Original Mix).mp3<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Sun Sep 02, 2012 1:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-09-01T22:39:50-04:00</updated>

		<published>2012-09-01T22:39:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99976#p99976</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99976#p99976"/>
		<title type="html"><![CDATA[Public Read Next Line v1.2]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99976#p99976"><![CDATA[
This should do it.<br><div class="codebox"><p>Code: </p><pre><code># The list of channel ads to run (set to {} to disable this script) #set prnl(msgs) {1st example ad.2nd example ad.Next ad.Last ad.}# The channels to msg: #chan1 #chan2 #etc  (* = all channels) #set prnl(chans) {*}# The number of minutes between channel ads  (1 or more minutes) #set prnl(min-lo) 5# The number of minutes between channel ads  (same or above min-lo) #set prnl(min-hi) 10# Read the lines in order or random  (1=inorder || 2=random) #set prnl(order) 2###### END OF SETTINGS ######set prnl(tmls) [split [string trim $prnl(msgs)] "\n"]set prnl(msgs) ""foreach prnl(tmit) $prnl(tmls) {  set prnl(tmit) [string trim $prnl(tmit)]  if {$prnl(tmit) ne ""} {  lappend prnl(msgs) $prnl(tmit)  }}unset prnl(tmls) prnl(tmit)if {$prnl(msgs) eq ""} {  return  }if {$prnl(chans) eq "*" || $prnl(chans) eq ""} {  set prnl(chans) [channels]  }if {![info exists prnl(next)]} {  set prnl(next) 0  }if {![info exists prnl(timer)]} { set prnl(timer) [timer 2 [list prnl:rnext]] }if {$prnl(min-hi)&lt;$prnl(min-lo)} {  set prnl(min-hi) $prnl(min-lo)  }proc prnl:rnext {} {  global prnl if {$prnl(msgs) eq ""} {  return  } if {$prnl(order)=="2"} {  set prnl(next) [rand [llength $prnl(msgs)]]  } foreach ch $prnl(chans) {  puthelp "PRIVMSG $ch :[lindex $prnl(msgs) $prnl(next)]" } incr prnl(next) if {$prnl(next)&gt;=[llength $prnl(msgs)]} {  set prnl(next) 0  } set randmin $prnl(min-lo) if {$prnl(min-hi)&gt;$prnl(min-lo)} {   incr randmin [rand [expr {$prnl(min-hi)-$prnl(min-lo)+1}]] } set prnl(timer) [timer $randmin [list prnl:rnext]]}putlog "Public Read Next Line v1.2 loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Sep 01, 2012 10:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2012-09-01T21:35:50-04:00</updated>

		<published>2012-09-01T21:35:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99975#p99975</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99975#p99975"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99975#p99975"><![CDATA[
could you add a second timer:<br> <br>1. minimum time before post the quote<br>2. maximum time before post the quote<br><br>result: <br>get some random time between min and max time<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Sat Sep 01, 2012 9:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-09-01T20:11:28-04:00</updated>

		<published>2012-09-01T20:11:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99974#p99974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99974#p99974"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99974#p99974"><![CDATA[
Now you have a choice of reading 'in order' or eggdrops somewhat less than 'random' <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><div class="codebox"><p>Code: </p><pre><code># The list of channel ads to run (set to {} to disable this script) #set prnl(msgs) {1st example ad.2nd example ad.Next ad.Last ad.}# The channels to msg: #chan1 #chan2 #etc  (* = all channels) #set prnl(chans) {*}# The number of minutes between channel ads  (1 or more minutes) #set prnl(minutes) 5# Read the lines in order or random  (1=inorder || 2=random) #set prnl(order) 2###### END OF SETTINGS ######set prnl(tmls) [split [string trim $prnl(msgs)] "\n"]set prnl(msgs) ""foreach prnl(tmit) $prnl(tmls) {  set prnl(tmit) [string trim $prnl(tmit)]  if {$prnl(tmit) ne ""} {  lappend prnl(msgs) $prnl(tmit)  }}unset prnl(tmls) prnl(tmit)if {$prnl(msgs) eq ""} {  return  }if {$prnl(chans) eq "*" || $prnl(chans) eq ""} {  set prnl(chans) [channels]  }if {![info exists prnl(next)]} {  set prnl(next) 0  }if {![info exists prnl(timer)]} { set prnl(timer) [timer 2 [list prnl:rnext]] }proc prnl:rnext {} {  global prnl if {$prnl(msgs) eq ""} {  return  } if {$prnl(order)=="2"} {  set prnl(next) [rand [llength $prnl(msgs)]]  } foreach ch $prnl(chans) {  puthelp "PRIVMSG $ch :[lindex $prnl(msgs) $prnl(next)]" } incr prnl(next) if {$prnl(next)&gt;=[llength $prnl(msgs)]} {  set prnl(next) 0  } set prnl(timer) [timer $prnl(minutes) [list prnl:rnext]]}putlog "Public Read Next Line v1.1 loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Sep 01, 2012 8:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2012-09-01T19:51:04-04:00</updated>

		<published>2012-09-01T19:51:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99973#p99973</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99973#p99973"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99973#p99973"><![CDATA[
could you add an option to post random quotes ( where can not repeat last 5 quotes at least )<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Sat Sep 01, 2012 7:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-09-01T19:47:15-04:00</updated>

		<published>2012-09-01T19:47:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99972#p99972</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99972#p99972"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99972#p99972"><![CDATA[
Try this:<br><div class="codebox"><p>Code: </p><pre><code># The list of channel ads to run (set to {} to disable this script) #set prnl(msgs) {1st example ad.2nd example ad.Next ad.Last ad.}# The channels to msg: #chan1 #chan2 #etc  (* = all channels) #set prnl(chans) {*}# The number of minutes between channel ads  (1 or more minutes) #set prnl(minutes) 5###### END OF SETTINGS ######set prnl(tmls) [split [string trim $prnl(msgs)] "\n"]set prnl(msgs) ""foreach prnl(tmit) $prnl(tmls) {  set prnl(tmit) [string trim $prnl(tmit)]  if {$prnl(tmit) ne ""} {  lappend prnl(msgs) $prnl(tmit)  }}unset prnl(tmls) prnl(tmit)if {$prnl(msgs) eq ""} {  return  }if {$prnl(chans) eq "*" || $prnl(chans) eq ""} {  set prnl(chans) [channels]  }if {![info exists prnl(next)]} {  set prnl(next) 0  }if {![info exists prnl(timer)]} { set prnl(timer) [timer 2 [list prnl:rnext]] }proc prnl:rnext {} {  global prnl if {$prnl(msgs) eq ""} {  return  } foreach ch $prnl(chans) {  puthelp "PRIVMSG $ch :[lindex $prnl(msgs) $prnl(next)]" } incr prnl(next) if {$prnl(next)&gt;=[llength $prnl(msgs)]} {  set prnl(next) 0  } set prnl(timer) [timer $prnl(minutes) [list prnl:rnext]]}putlog "Public Read Next Line v1.1 loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Sep 01, 2012 7:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2012-09-01T17:40:50-04:00</updated>

		<published>2012-09-01T17:40:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99971#p99971</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99971#p99971"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99971#p99971"><![CDATA[
i got some example script for this but is old.. and not work properly<br><br><a href="http://paste.tclhelp.net/?id=bm3" class="postlink">http://paste.tclhelp.net/?id=bm3</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Sat Sep 01, 2012 5:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2012-09-01T17:36:53-04:00</updated>

		<published>2012-09-01T17:36:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99970#p99970</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99970#p99970"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99970#p99970"><![CDATA[
Would that timer read one line from the file??<br><br>Maybe keep track of the last line read, and read the next line in the file?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sat Sep 01, 2012 5:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arkadietz]]></name></author>
		<updated>2012-09-01T17:04:52-04:00</updated>

		<published>2012-09-01T17:04:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=99966#p99966</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=99966#p99966"/>
		<title type="html"><![CDATA[Message + timer]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=99966#p99966"><![CDATA[
Okay it's simple.<br><br>1. To has a list where i can put my messages<br>2. To has a settable timer ( where show the messages in the channel/s )<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7974">Arkadietz</a> — Sat Sep 01, 2012 5:04 pm</p><hr />
]]></content>
	</entry>
	</feed>
