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

	<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>2010-07-05T10:32:52-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-07-05T10:32:52-04:00</updated>

		<published>2010-07-05T10:32:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93457#p93457</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93457#p93457"/>
		<title type="html"><![CDATA[Auto voice script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93457#p93457"><![CDATA[
You do realize there is a flag "g" that does this already? But I can see why you'd want a new script for it-its slow. I just did something like this to replace it:<br><div class="codebox"><p>Code: </p><pre><code>bind join * * avoiceproc avoice {nick host hand chan} {  if {[matchattr $hand |A $chan} {    putquick $chan +v $nick  } return}bind nick * * voice:nickchangeproc voice:nickchange {nick host hand chan newnick} {  if {[matchattr [nick2hand $newnick $chan] |A $chan] &amp;&amp; ![isvoice $newnick $chan]} {      putquick "MODE $chan +v $newnick"  } return}</code></pre></div>This creates the new channel flag "A", which should be faster than g. When I was using g, my bot used puthelp to voice.  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"> The second part will voice anyone who changes their nick to one that has flag A in the  bot.user file. Just another idea for you, I've never been a fan of "voice-everyone" scripts.<br><br>Edit: whoops, left out the args. :S<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Mon Jul 05, 2010 10:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2010-06-26T17:35:59-04:00</updated>

		<published>2010-06-26T17:35:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93420#p93420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93420#p93420"/>
		<title type="html"><![CDATA[Auto voice script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93420#p93420"><![CDATA[
I haven't coded in like a few years so bear with me. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> I would rather use 'setudef' (example: 'setudef flag avoice') than a variable in this case. Below I tried to make something for you, not sure 100% if it's ok or not, just test it and let me now and will make the required adjustments. <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>setudef flag avoicebind join - * voice:joinbind pub m ".autovoice" voice:setupproc voice:join (nick uhost handle channel} {if {![channel get $channel avoice] || ![botisop $channel]} returnpushmode $chan +v $nick}proc voice:setup (nick uhost handle channel text) {set len [llength $text]if (!$len) {putserv "NOTICE $nick :Usage: \002.autovoice &lt;on/off&gt; [#channel]\002, where the mode is required and the channel name is optional."return}if {$len == 1} {set chan $channelset mode [lindex [split $text] 0]} elseif {$len==2} {foreach (mode chan) [split $text] {break}}set status [channel get $chan avoice]switch $status {0 {set status2 "Disabled"}1 {set status2 "Enabled"}}switch [string tolowed $mode] {"on" {if (!$status) {channel set $chan +avoiceputserv "NOTICE $nick :Auto voice for $chan channel has been enabled."} else {putserv "NOTICE $nick :Auto voice for $chan channel is already enabled."}}"off" {if ($status) {channel set $chan -avoiceputserv "NOTICE $nick :Auto voice for $chan channel has been disabled."} else {putserv "NOTICE $nick :Auto voice for $chan channel is already disabled."}}"status" {putserv "NOTICE $nick :Auto voice for channel $chan is $status2"}} }</code></pre></div>Oh, and in the future, stop comparing stuff like this:<div class="codebox"><p>Code: </p><pre><code>if { $channel == $canal } { </code></pre></div>cos the channel names can be uppercase or lowercase, so use instead:<div class="codebox"><p>Code: </p><pre><code>if {[string match -nocase $canal $channel]} { </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Jun 26, 2010 5:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[TEK7]]></name></author>
		<updated>2010-06-26T08:37:20-04:00</updated>

		<published>2010-06-26T08:37:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=93416#p93416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=93416#p93416"/>
		<title type="html"><![CDATA[Auto voice script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=93416#p93416"><![CDATA[
I have this code.<br><div class="codebox"><p>Code: </p><pre><code>bind join - * join_avproc join_av {nick uhost handle chan} { pushmode $chan +v $nick}</code></pre></div>But i want to put a command to active "+autovoice" and to desactive "-autovoice"<br><br>Can help me? <br><br>Thanks for all!<br><br>EDITED.<br>Done, here is the script<br><br><div class="codebox"><p>Code: </p><pre><code>set canal "#teamSIN"set av "0"bind join - * jjavbind pub m "+autovoice" javbind pub m "-autovoice" jmavproc jjav { nick uhost handle channel } {  global canal av  if { $channel == $canal } {    if { $av == 1 } {    pushmode $channel +v $nick    }  }}proc jav { nick uhost handle channel arg } {  global canal av  if { $channel == $canal } {      if { $av == 0 } {        set av 1        putserv "NOTICE $nick :Auto Voice is now ON!"    }  }}proc jmav { nick uhost handle channel arg } {  global canal av  if { $channel == $canal } {      if { $av == 1 } {        set av 0        putserv "NOTICE $nick :Auto Voice is now OFF!"    }  }}putlog "## AutoVoice by TEK7"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11170">TEK7</a> — Sat Jun 26, 2010 8:37 am</p><hr />
]]></content>
	</entry>
	</feed>
