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

	<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>2009-08-26T19:21:48-04:00</updated>

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

		<entry>
		<author><name><![CDATA[mr_fanatic]]></name></author>
		<updated>2009-08-26T19:21:48-04:00</updated>

		<published>2009-08-26T19:21:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90062#p90062</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90062#p90062"/>
		<title type="html"><![CDATA[Fixed: Guest Devoice]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90062#p90062"><![CDATA[
Okay, after several trial and errors i've finally manage to make it work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz">. For users interested usage is: <strong class="text-strong">.chanset #channel +guestdevoice</strong><div class="codebox"><p>Code: </p><pre><code>setudef flag guestdevoicebind nick - * guestchangenick proc guestchangenick {nick host hand chan newnick} {if {![channel get $chan guestdevoice]} { return } if {[isvoice $newnick $chan]} {if {[string match "Guest*" $newnick]} {pushmode $chan -v $newnick}}} putlog "Guest Devoice loaded."</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9267">mr_fanatic</a> — Wed Aug 26, 2009 7:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mr_fanatic]]></name></author>
		<updated>2009-08-26T19:00:28-04:00</updated>

		<published>2009-08-26T19:00:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90061#p90061</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90061#p90061"/>
		<title type="html"><![CDATA[Guest kick]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90061#p90061"><![CDATA[
i modify the above code so that when a users nick change to Guest7834 or Guest???? it will devoice them. but it doesnt work. please help.<div class="codebox"><p>Code: </p><pre><code>setudef flag voicenickbind nick - * guestchangenick proc guestchangenick {nick host hand chan newnick} {  if {![channel get $chan voicenick]} { return }  if {!([string match "Guest*" $newnick] || [string match "Guest*" $newnick])} { pushmode $chan -v $nick  }}putlog "Guest Devoice loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9267">mr_fanatic</a> — Wed Aug 26, 2009 7:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-08-26T18:17:41-04:00</updated>

		<published>2009-08-26T18:17:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90059#p90059</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90059#p90059"/>
		<title type="html"><![CDATA[script to autovoice nicks that ends with letter z]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90059#p90059"><![CDATA[
Well... I did mention the two cases of using -nocase vs not using it (in the post where I did post code).<br>Of course, any performance comparisons should be done under similar conditions apart from the very function you are testing... though now we're getting rather academic :p<br><br>Ps. did a very limited "time" test... guess what, my code ran faster *nag*  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Aug 26, 2009 6:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-08-26T17:57:36-04:00</updated>

		<published>2009-08-26T17:57:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90058#p90058</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90058#p90058"/>
		<title type="html"><![CDATA[script to autovoice nicks that ends with letter z]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90058#p90058"><![CDATA[
<blockquote class="uncited"><div>Probably right on the nickchange, speechles.<br>Performance-wize, I'd suggest you use string match, as this saves you one command call. Which approach is the "cleanest" is something I'll leave up to anyone to decide on their own.</div></blockquote>Performance-wi<strong class="text-strong">z</strong>e ... You are quite the sharp mind nml, purposely mispelling it to fit the topic <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>And yeah, your probably correct in that if you merely used a single [string match] but your using two.. heh so yours will be slower. I was trying to show the poster there are several methods to do this without resulting to glob string match for everything. It shows him how to extract the last letter in case he wants to do something further down the road.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed Aug 26, 2009 5:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-08-26T17:39:03-04:00</updated>

		<published>2009-08-26T17:39:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90057#p90057</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90057#p90057"/>
		<title type="html"><![CDATA[script to autovoice nicks that ends with letter z]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90057#p90057"><![CDATA[
Probably right on the nickchange, speechles.<br>Performance-wize, I'd suggest you use string match, as this saves you one command call. Which approach is the "cleanest" is something I'll leave up to anyone to decide on their own.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Aug 26, 2009 5:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2009-08-26T17:29:29-04:00</updated>

		<published>2009-08-26T17:29:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90056#p90056</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90056#p90056"/>
		<title type="html"><![CDATA[script to autovoice nicks that ends with letter z]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90056#p90056"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>setudef flag voicenickbind join - * zchecknickbind nick - * zchangenick proc zchecknick {nick host hand chan} {   if {![channel get $chan voicenick]} { return }  if {[string equal -nocase "z" [string index $nick end]]} {    pushmode $chan +v $nick  }}proc zchangenick {nick host hand chan newnick} {  if {![channel get $chan voicenick]} { return }  if {![string equal -nocase "z" [string index $newnick end]]} {    pushmode $chan -v $nick  } elseif {![isvoice $newnick $chan]} {    pushmode $chan +v $nick  }}</code></pre></div>What about if the nick "jimbob" changes nick to "jimbobz" shouldn't he then be voiced? The above script is much easier on the eyes and is indented properly. For some reason this blackshadow guy can't write clear coherent code with proper indentation to save his life. I'm not sure if this is intentional or caused by some improper editor of his mangling prefixed spacing.<br><br>That [valid $chan] part is not necessary as the [channel get] will not be set if the channel isn't valid.. Remember you can't set an invalid channel any settings.<br><br>Also, changed the procedure names to avoid collisions with any other scripts which may use those all-to-common procedure names.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Wed Aug 26, 2009 5:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2009-08-26T12:24:06-04:00</updated>

		<published>2009-08-26T12:24:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90048#p90048</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90048#p90048"/>
		<title type="html"><![CDATA[script to autovoice nicks that ends with letter z]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90048#p90048"><![CDATA[
I'm afraid that the logic for the nick-change is flawed, and it will always de-voice on nickchange. However, if you stick with the -nocase option, there's no need to test both cases.<br><br>If you'd like to leave out the -nocase option for compability with older versions of tcl, use one of these logic patterns instead:<div class="codebox"><p>Code: </p><pre><code>if {!([string match "*z" $newnick] || [string match "*Z" $newnick])} {#Or this one..if {![string match "*z" $newnick] &amp;&amp; ![string match "*Z" $newnick]} {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Wed Aug 26, 2009 12:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BLaCkShaDoW]]></name></author>
		<updated>2009-08-26T10:25:46-04:00</updated>

		<published>2009-08-26T10:25:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90047#p90047</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90047#p90047"/>
		<title type="html"><![CDATA[Hello :)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90047#p90047"><![CDATA[
This should work<br><div class="codebox"><p>Code: </p><pre><code>#################################################################### VoiceNick ##just activate using .chanset #channel +voicenick####################################################################setudef flag voicenickbind join - * checknickbind nick - * changenickproc checknick {nick host hand chan} {if {![validchan $chan]} { return 0 }if {[channel get $chan voicenick]} {if {[string match -nocase "*z" "$nick"] || [string match -nocase "*Z" "$nick"]} {pushmode $chan +v $nick}}}proc changenick {nick host hand chan newnick} {if {![validchan $chan]} { return 0 }if {[channel get $chan voicenick]} {if {[isvoice $newnick $chan]} {if {![string match "*z" $newnick] || ![string match "*Z" $newnick]} {pushmode $chan -v $newnick}}}}putlog "VoiceNick by BLaCkShaDoW Loaded"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10416">BLaCkShaDoW</a> — Wed Aug 26, 2009 10:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[asdd1]]></name></author>
		<updated>2009-08-26T06:04:33-04:00</updated>

		<published>2009-08-26T06:04:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=90046#p90046</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=90046#p90046"/>
		<title type="html"><![CDATA[script to autovoice nicks that ends with letter z]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=90046#p90046"><![CDATA[
Hi folks,<br><br>I've googled and checked the archive, but haven't been able to locate a TCL script for our little eggdrop which will auto voice nicks on entry to a room.<br><br>The catch is that nicks which should be auto-voiced should only be those that have a last letter z or Z... <br><strong class="text-strong">And devoice user, if user changes nick that doesn't have last letter z OR Z..</strong><br>Any help or pointers would be truly appreciated.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10036">asdd1</a> — Wed Aug 26, 2009 6:04 am</p><hr />
]]></content>
	</entry>
	</feed>
