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

	<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-06-04T01:42:39-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Deniska]]></name></author>
		<updated>2005-06-04T01:42:39-04:00</updated>

		<published>2005-06-04T01:42:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50191#p50191</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50191#p50191"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50191#p50191"><![CDATA[
When you use <div class="codebox"><p>Code: </p><pre><code>set flag antiadver</code></pre></div>you just set a variable ( $flag ). When you use<div class="codebox"><p>Code: </p><pre><code>setudef flag antiadver</code></pre></div>you set a channel flag. This flag maybe + or - ( == 1 or &lt;&gt;1 ). You can see that in .chaninfo #chan. Also exists setudef int, setudef str. Read more in tcl manuals.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6137">Deniska</a> — Sat Jun 04, 2005 1:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-06-01T12:07:51-04:00</updated>

		<published>2005-06-01T12:07:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50062#p50062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50062#p50062"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50062#p50062"><![CDATA[
Thanks... works fine but....<br>I want it to NOT start when the eggdrop starts... only when I do !advert on<br>I tried:<br><div class="codebox"><p>Code: </p><pre><code>setudef flag antiadver</code></pre></div>into<br><div class="codebox"><p>Code: </p><pre><code>set flag antiadver </code></pre></div>but<br><div class="codebox"><p>Code: </p><pre><code>Tcl error [adver:switch]: illegal channel option: -antiadver</code></pre></div>then I tried<br><div class="codebox"><p>Code: </p><pre><code>proc adver:start {nick host hand chan text} { channel set $chan +antiadver} </code></pre></div>which seems to work... is it okay, or is there something better?<br><br>Thanks for all your help. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> Most precious.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Wed Jun 01, 2005 12:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Deniska]]></name></author>
		<updated>2005-06-01T10:19:01-04:00</updated>

		<published>2005-06-01T10:19:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50060#p50060</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50060#p50060"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50060#p50060"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>################################## ### TimeMessage.tcl            ### ### Version 1.0                ### ### By Wcc                     ### ### wcc@techmonkeys.org        ### ### http://www.dawgtcl.com:81/ ### ### EFnet #|DAWG|Tcl           ### ################################## ############################################################################ ### Copyright c 2000 - 2002 |DAWG| Scripting Group. All rights reserved. ### ############################################################################ ############################################################################ ## This script sends a message to a channel (or channels) every x seconds ## ## (or minutes).                                                          ## ############################################################################ ########################################################## ## Just load the script, edit the settings, and rehash. ## ########################################################## setudef flag antiadver bind pub n|n !adver adver:switch proc adver:switch {nick host hand chan text} { set option [lindex [split $text] 0] if { $option == "on" } {channel set $chan -antiadver puthelp "NOTICE $nick : Advertise is 9ON9" } if { $option == "off" } { channel set $chan +antiadver puthelp "NOTICE $nick : Advertise is 4OFF4" } } ################################# # Set the message to send here. # ################################# set timemessage_setting(message) { "blablablabla" } ########################################## # Set the channel(s) to send it to here. # ########################################## set timemessage_setting(channel) "#channel" ########################################################################### # Set the time in minutes between messages here. Prefix the time with a ! # # to use seconds.                                                         # ########################################################################### set timemessage_setting(time) "15" #################### # Code begins here # #################### if {![string match 1.6.* $version]} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." } if {[info tclversion] &lt; 8.2} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." } if {[string compare [string index $timemessage_setting(time) 0] "!"] == 0} { set timemessage_timer [string range $timemessage_setting(time) 1 end] } { set timemessage_timer [expr $timemessage_setting(time) * 60] } if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $timemessage_timer timemessage_go } proc timemessage_go {} { foreach chan $::timemessage_setting(channel) { if {![validchan $chan] || ![botonchan $chan]} { continue } if {![channel get $chan antiadver]} { foreach line $::timemessage_setting(message) { putserv "PRIVMSG $chan :$line" } } } if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $::timemessage_timer timemessage_go } } putlog "\002TIMEMESSAGE:\002 TimeMessage.tcl Version 1.0 by Wcc is loaded." </code></pre></div>This variance must work correctly. <br>Hm.. I think it does not work because of codepage. When i copy code in file and try to launch, bot putlog a message.. Mm.. something about '=' symbol before every string /-:. But when i retype all spaces in cp1251 codepage, script will work correctly.. Also i fix some part of code..<br>--<br>Sorry for my english..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6137">Deniska</a> — Wed Jun 01, 2005 10:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-06-01T09:18:51-04:00</updated>

		<published>2005-06-01T09:18:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50057#p50057</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50057#p50057"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50057#p50057"><![CDATA[
but still won't work in either on or off... what am I doing wrong? :\<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Wed Jun 01, 2005 9:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Deniska]]></name></author>
		<updated>2005-06-01T07:08:52-04:00</updated>

		<published>2005-06-01T07:08:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50051#p50051</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50051#p50051"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50051#p50051"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>################################## ### TimeMessage.tcl            ### ### Version 1.0                ### ### By Wcc                     ### ### wcc@techmonkeys.org        ### ### http://www.dawgtcl.com:81/ ### ### EFnet #|DAWG|Tcl           ### ################################## ############################################################################ ### Copyright © 2000 - 2002 |DAWG| Scripting Group. All rights reserved. ### ############################################################################ ############################################################################ ## This script sends a message to a channel (or channels) every x seconds ## ## (or minutes).                                                          ## ############################################################################ ########################################################## ## Just load the script, edit the settings, and rehash. ## ########################################################## setudef flag antiadver bind PUB n|n !adver adver:switch proc adver:switch {nick host hand chan text} {  set option [lindex [split $text] 0]  switch -- $option {   "on" {    channel set $chan -antiadver     puthelp "NOTICE $nick : Advertise is 9ON9"   }   "off" {    channel set $chan +antiadver    puthelp "NOTICE $nick : Advertise is 4OFF4"   }  } } ################################# # Set the message to send here. # ################################# set timemessage_setting(message) {    "blablablabla" } ########################################## # Set the channel(s) to send it to here. # ########################################## set timemessage_setting(channel) "#channel" ########################################################################### # Set the time in minutes between messages here. Prefix the time with a ! # # to use seconds.                                                         # ########################################################################### set timemessage_setting(time) "15" #################### # Code begins here # #################### if {![string match 1.6.* $version]} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." } if {[info tclversion] &lt; 8.2} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." } if {[string compare [string index $timemessage_setting(time) 0] "!"] == 0} { set timemessage_timer [string range $timemessage_setting(time) 1 end] } { set timemessage_timer [expr $timemessage_setting(time) * 60] } if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $timemessage_timer timemessage_go } proc timemessage_go {} {    foreach chan $::timemessage_setting(channel) {       if {![validchan $chan] || ![botonchan $chan]} { continue }       if {![channel get $chan antiadver]} {       foreach line $::timemessage_setting(message) { putserv "PRIVMSG $chan :$line" }    } }   if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $::timemessage_timer timemessage_go } } putlog "\002TIMEMESSAGE:\002 TimeMessage.tcl Version 1.0 by Wcc is loaded."</code></pre></div>Imho.. When is +antiadver, procedure will not show message on this channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6137">Deniska</a> — Wed Jun 01, 2005 7:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-05-31T19:20:55-04:00</updated>

		<published>2005-05-31T19:20:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50032#p50032</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50032#p50032"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50032#p50032"><![CDATA[
How exactly do I merge the two codes?<br>I found a similar code in the forum, but I simply cannot make it work at all... how do I blend the codes?<br><br>I tried this but does not work at all....<br><div class="codebox"><p>Code: </p><pre><code>##################################### TimeMessage.tcl            ###### Version 1.0                ###### By Wcc                     ###### wcc@techmonkeys.org        ###### http://www.dawgtcl.com:81/ ###### EFnet #|DAWG|Tcl           #################################################################################################################### Copyright © 2000 - 2002 |DAWG| Scripting Group. All rights reserved. ############################################################################################################################################################# This script sends a message to a channel (or channels) every x seconds #### (or minutes).                                                          ########################################################################################################################################## Just load the script, edit the settings, and rehash. ############################################################setudef flag antiadver bind PUB n|n !adver adver:switch proc adver:switch {nick host hand chan text} {  set option [lindex [split $text] 0]  switch -- $option {   "on" {    channel set $chan +antiadver     puthelp "NOTICE $nick : Advertise is 9ON9"   }   "off" {    channel set $chan -antiadver    puthelp "NOTICE $nick : Advertise is 4OFF4"   }  } } ################################## Set the message to send here. ##################################set timemessage_setting(message) {"blablablabla"}########################################### Set the channel(s) to send it to here. ###########################################set timemessage_setting(channel) "#channel"############################################################################ Set the time in minutes between messages here. Prefix the time with a ! ## to use seconds.                                                         ############################################################################set timemessage_setting(time) "15"##################### Code begins here #####################if {![string match 1.6.* $version]} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." }if {[info tclversion] &lt; 8.2} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." }if {[string compare [string index $timemessage_setting(time) 0] "!"] == 0} { set timemessage_timer [string range $timemessage_setting(time) 1 end] } { set timemessage_timer [expr $timemessage_setting(time) * 60] }if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $timemessage_timer timemessage_go }if {[channel get $chan antiadver]} { proc timemessage_go {} {foreach chan $::timemessage_setting(channel) {if {![validchan $chan] || ![botonchan $chan]} { continue }foreach line $::timemessage_setting(message) { putserv "PRIVMSG $chan :$line" }}if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $::timemessage_timer timemessage_go }}}putlog "\002TIMEMESSAGE:\002 TimeMessage.tcl Version 1.0 by Wcc is loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Tue May 31, 2005 7:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizzle]]></name></author>
		<updated>2005-05-31T16:29:34-04:00</updated>

		<published>2005-05-31T16:29:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50028#p50028</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50028#p50028"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50028#p50028"><![CDATA[
Hope this will work <br><div class="codebox"><p>Code: </p><pre><code>proc mute::av { nickname hostname handle channel arguments } {set mode [lindex [split $arguments] 0]  switch $mode {on {  if {[channel get $channel "autovoice"]} {    putquick "NOTICE $nickname :autovoice is already enabled for $channel."    return 0   }    channel set $channel +autovoice    putquick "NOTICE $nickname :autovoice has been enabled for $channel."   }off {  if {![channel get $channel "autovoice"]} {    putquick "NOTICE $nickname :autovoice is already disabled for $channel."    return 0   }    channel set $channel -autovoice    putquick "NOTICE $nickname :autovoice has been disabled for $channel."         }default {        if {[channel get $channel "autovoice"]} {    putquick "NOTICE $nickname :autovoice is currently enabled for $channel."  } else {    putquick "NOTICE $nickname :autovoice is currently disabled for $channel."  }      }   }}</code></pre></div><br>all credits too Metroid, he build this<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6156">Dizzle</a> — Tue May 31, 2005 4:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-05-31T15:18:21-04:00</updated>

		<published>2005-05-31T15:18:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=50027#p50027</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=50027#p50027"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=50027#p50027"><![CDATA[
I've also searched other similar scripts... they are all activated at start, with no switch... :\<br><br>help needed... <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=6079">Thunderdome</a> — Tue May 31, 2005 3:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-05-25T12:47:09-04:00</updated>

		<published>2005-05-25T12:47:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49807#p49807</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49807#p49807"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49807#p49807"><![CDATA[
I saw some of the topics related, but the on/off would not work... <br><br>Can you please give me a hand on this one?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6079">Thunderdome</a> — Wed May 25, 2005 12:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Thunderdome]]></name></author>
		<updated>2005-05-24T14:35:36-04:00</updated>

		<published>2005-05-24T14:35:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=49782#p49782</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=49782#p49782"/>
		<title type="html"><![CDATA[Put a &quot;on/off switch&quot;]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=49782#p49782"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>##################################### TimeMessage.tcl            ###### Version 1.0                ###### By Wcc                     ###### wcc@techmonkeys.org        ###### http://www.dawgtcl.com:81/ ###### EFnet #|DAWG|Tcl           #################################################################################################################### Copyright © 2000 - 2002 |DAWG| Scripting Group. All rights reserved. ############################################################################################################################################################# This script sends a message to a channel (or channels) every x seconds #### (or minutes).                                                          ########################################################################################################################################## Just load the script, edit the settings, and rehash. ############################################################################################## Set the message to send here. ##################################set timemessage_setting(message) {"message here"                              }########################################### Set the channel(s) to send it to here. ###########################################set timemessage_setting(channel) "#channel"############################################################################ Set the time in minutes between messages here. Prefix the time with a ! ## to use seconds.                                                         ############################################################################set timemessage_setting(time) "15"##################### Code begins here #####################if {![string match 1.6.* $version]} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on eggdrop 1.6.x or later." }if {[info tclversion] &lt; 8.2} { putlog "\002TIMEMESSAGE:\002 \002WARNING:\002 This script is intended to run on Tcl Version 8.2 or later." }if {[string compare [string index $timemessage_setting(time) 0] "!"] == 0} { set timemessage_timer [string range $timemessage_setting(time) 1 end] } { set timemessage_timer [expr $timemessage_setting(time) * 60] }if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $timemessage_timer timemessage_go }proc timemessage_go {} {foreach chan $::timemessage_setting(channel) {if {![validchan $chan] || ![botonchan $chan]} { continue }foreach line $::timemessage_setting(message) { putserv "PRIVMSG $chan :$line" }}if {[lsearch -glob [utimers] "* timemessage_go *"] == -1} { utimer $::timemessage_timer timemessage_go }}putlog "\002TIMEMESSAGE:\002 TimeMessage.tcl Version 1.0 by Wcc is loaded."</code></pre></div><br>How do I put a on/off switch than can be use from a bind to owner (+n) only?<br> like !timemsg and the script starts.... I would also like it to be disabled by default, only starting with !timemsg<br><br>Thanks!  <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=6079">Thunderdome</a> — Tue May 24, 2005 2:35 pm</p><hr />
]]></content>
	</entry>
	</feed>
