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

	<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>2006-08-13T08:34:06-04:00</updated>

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

		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-08-13T08:34:06-04:00</updated>

		<published>2006-08-13T08:34:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65429#p65429</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65429#p65429"/>
		<title type="html"><![CDATA[Want this script to work on ALL channels.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65429#p65429"><![CDATA[
because the timer repeats in every foreach loop.<br><br>rosc2112 should have paid attention.<br><div class="codebox"><p>Code: </p><pre><code>proc timer:wow {} {  global botnick wowchans wowchan wowtime wowtxt  set wowfile [open $wowtxt r]  set wowread [split [read $wowfile] \n]  close $wowfile  foreach wowchan $wowchans {    if { [onchan $botnick $wowchan] } {      putserv "PRIVMSG $wowchan :[lindex $wowread [rand [llength $wowread]]] "    }  }  timer $wowtime "timer:wow" } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sun Aug 13, 2006 8:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2006-08-13T01:16:17-04:00</updated>

		<published>2006-08-13T01:16:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65425#p65425</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65425#p65425"/>
		<title type="html"><![CDATA[Want this script to work on ALL channels.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65425#p65425"><![CDATA[
It works but it sent the wow text 10 times in a row in each channel  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_redface.gif" width="15" height="15" alt=":oops:" title="Embarassed"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Sun Aug 13, 2006 1:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-08-12T18:55:37-04:00</updated>

		<published>2006-08-12T18:55:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65420#p65420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65420#p65420"/>
		<title type="html"><![CDATA[Want this script to work on ALL channels.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65420#p65420"><![CDATA[
Ahh, I didn't completely analyze the timer thing.<br><br>I'll assume you want to have the timer go off in each of the wowchans, so change that proc like this:<div class="codebox"><p>Code: </p><pre><code>proc timer:wow {} {  global botnick wowchans wowchan wowtime wowtxtforeach wowchan $wowchans {   if { [onchan $botnick $wowchan] } {      set wowfile [open $wowtxt r]      set wowread [split [read $wowfile] \n]      close $wowfile      putserv "PRIVMSG $wowchan :[lindex $wowread [rand [llength $wowread]]] "      timer $wowtime "timer:wow"    }  }}</code></pre></div>Should fix er.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sat Aug 12, 2006 6:55 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2006-08-12T18:38:35-04:00</updated>

		<published>2006-08-12T18:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65418#p65418</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65418#p65418"/>
		<title type="html"><![CDATA[Want this script to work on ALL channels.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65418#p65418"><![CDATA[
Ok the !wow part works in every room but when the 30 min timer is ready to send it gives me this error:<br><div class="codebox"><p>Code: </p><pre><code>[18:34] Tcl error in script for 'timer6':[18:34] can't read "wowchan": no such variable</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Sat Aug 12, 2006 6:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2006-08-12T15:21:30-04:00</updated>

		<published>2006-08-12T15:21:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65416#p65416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65416#p65416"/>
		<title type="html"><![CDATA[Want this script to work on ALL channels.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65416#p65416"><![CDATA[
Thanks, works great so far  <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=7220">cache</a> — Sat Aug 12, 2006 3:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[rosc2112]]></name></author>
		<updated>2006-08-12T12:28:40-04:00</updated>

		<published>2006-08-12T12:28:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65410#p65410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65410#p65410"/>
		<title type="html"><![CDATA[Want this script to work on ALL channels.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65410#p65410"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>################################################################################################################## set the channel to display automatic WoW lines, include the '#' prefixset wowchans "#your_channel #channel2 #chan3 #etc"## set the timer interval (in minutes) between WoW linesset wowtime "30"if { [info exists wowtime] } { timer $wowtime "timer:wow" }set wowtxt "scripts/wow.txt"set wowver "v2.01"bind pub - !wow disp:wowproc disp:wow {nick host handle chan text} {# Need to leave 'wowchan' in the global dec so it'll carry over to the timer  global wowchans wowchan wowtxt# test if the channel is in the wowchans list and set 'wowchan' accordingly.if {[lsearch -exact $wowchans $chan] != -1} {               set wowchan $chan              } else {               # did not match a channel in the "wowchans list"               return     }  if { [isop $nick $wowchan] || [ishalfop $nick $wowchan] || [isvoice $nick $wowchan] } {     if { [lindex $text 0] != "" } {        set wowto [lindex $text 0]    } else {        set wowto $wowchan    }      set wowfile [open $wowtxt r]      set wowread [split [read $wowfile] \n]      close $wowfile      putserv "PRIVMSG $wowto :[lindex $wowread [rand [llength $wowread]]] "  } else {      set wowfile [open $wowtxt r]      set wowread [split [read $wowfile] \n]      close $wowfile      putserv "PRIVMSG $nick :[lindex $wowread [rand [llength $wowread]]] "  }}proc timer:wow {} {  global botnick wowchan wowtime wowtxt  if { [onchan $botnick $wowchan] } {    set wowfile [open $wowtxt r]    set wowread [split [read $wowfile] \n]    close $wowfile    putserv "PRIVMSG $wowchan :[lindex $wowread [rand [llength $wowread]]] "    timer $wowtime "timer:wow"  }}putlog "Words of Wisdom $wowver TCL (timer: $wowtime mins) - Loaded! "#</code></pre></div>That should do the trick.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7395">rosc2112</a> — Sat Aug 12, 2006 12:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[cache]]></name></author>
		<updated>2006-08-11T13:48:02-04:00</updated>

		<published>2006-08-11T13:48:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=65392#p65392</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=65392#p65392"/>
		<title type="html"><![CDATA[Want this script to work on ALL channels.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=65392#p65392"><![CDATA[
Can someone help me set this to work in all channels the bot is in? I tried $chan with no luck, only lets script work in one room.<br><div class="codebox"><p>Code: </p><pre><code>###############################################################                                                         ####           Words of Wisdom v2.01 TCL (WoW)               ####   Display funny nonsense to your irc friends/channel    ####                  by Phil (Admin)                        ####              Penthux.net - June 2005                    ####                                                         #### This script is not meant to do anything except make you #### smile. The text file can contain any plain text,        #### whether it be jokes, channel adverts or whatever. When  #### adding your own content just make sure you put each     #### item on a seperate line in the text file. There is no   #### limit to how large or small the text file must be.      ####                                                         #### Usage:                                                  #### [channel commands]                                      #### !wow               = displays a WoW line to channel     #### !wow [nick|chan]   = displays WoW line to nick or chan  ####                                                         #### ** NB - only ops, halfops and voices in the named       #### #channel can use the !wow [nick|chan] command which can #### be sent to any nickname or channel on the network which #### allows external messages. All other users get the WoW   #### line back in their own query window. Change the code if #### you like as this setup primarily stops lamer flooding   #### to nicks/chans.                                         ####                                                         #### Installation:                                           #### 1. Set the irc #channel to display the WoW lines        ## ## automatically and the timer intervals between output.   #### Edit your eggdrop filename.conf and add this line to    #### the end of the file:                                    ####                                                         #### source scripts/wow.tcl                                  ####                                                         #### 2. Copy the edited filename.conf file to your eggdrop   #### dir and copy both the wow.tcl &amp; wow.txt files to the    #### SCRIPTS directory. Now reboot/restart your eggdrop bot. ####                                                         #### Please keep this header intact if you distribute or     #### modify this CGI script.               admin@penthux.net ################################################################# set the channel to display automatic WoW lines, include the '#' prefixset wowchan "#your_channel"## set the timer interval (in minutes) between WoW linesset wowtime "30"########################################################## don't change anything below if u don't know TCL ##########################################################if { [info exists wowtime] } { timer $wowtime "timer:wow" }set wowtxt "scripts/wow.txt"set wowver "v2.01"bind pub - !wow disp:wowproc disp:wow {nick host handle chan text} {  global wowchan wowtxt  if { [isop $nick $wowchan] || [ishalfop $nick $wowchan] || [isvoice $nick $wowchan] } {      if { [lindex $text 0] != "" } {        set wowto [lindex $text 0]    } else {        set wowto $wowchan    }      set wowfile [open $wowtxt r]      set wowread [split [read $wowfile] \n]      close $wowfile      putserv "PRIVMSG $wowto :[lindex $wowread [rand [llength $wowread]]] "  } else {      set wowfile [open $wowtxt r]      set wowread [split [read $wowfile] \n]      close $wowfile      putserv "PRIVMSG $nick :[lindex $wowread [rand [llength $wowread]]] "  }}proc timer:wow {} {  global botnick wowchan wowtime wowtxt  if { [onchan $botnick $wowchan] } {    set wowfile [open $wowtxt r]    set wowread [split [read $wowfile] \n]    close $wowfile    putserv "PRIVMSG $wowchan :[lindex $wowread [rand [llength $wowread]]] "    timer $wowtime "timer:wow"   }}putlog "Words of Wisdom $wowver TCL (timer: $wowtime mins) - Loaded! "##</code></pre></div>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7220">cache</a> — Fri Aug 11, 2006 1:48 pm</p><hr />
]]></content>
	</entry>
	</feed>
