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

	<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>2016-06-20T15:06:09-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-06-20T01:00:31-04:00</updated>

		<published>2016-06-20T01:00:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105199#p105199</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105199#p105199"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105199#p105199"><![CDATA[
The new code should be:<div class="codebox"><p>Code: </p><pre><code>bind join * * case:joinedbind nick * * case:nickproc case:joined {nick uhost hand chan} {   case:action $chan $nick}   proc case:nick {nick uhost hand chan newnick} {   case:action $chan $newnick}proc case:action {chan nick} {if {[isbotnick $nick] || ![botisop $chan]} returnif {![string compare -length 5 "Guest" $nick]} {set test 0} else {set letter [lindex [split $nick ""] 0]set test [string is upper $letter]}if {$test} {if {![isvoice $nick $chan]} {set mode "+v"}} else {if {[isvoice $nick $chan]} {set mode "-v"}}pushmode $chan $mode $nick}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jun 20, 2016 1:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizmo]]></name></author>
		<updated>2016-06-19T22:41:21-04:00</updated>

		<published>2016-06-19T22:41:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105198#p105198</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105198#p105198"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105198#p105198"><![CDATA[
Ignore that last post. <br><br>For some reason, and I'm lost as to why it wasn't working, the script is now working. <br><br>No extra restart, rehash or reload. It just started work :/<br><br>Thanks again all. <br><br>Regards, <br>Stuart.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12617">Dizmo</a> — Sun Jun 19, 2016 10:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizmo]]></name></author>
		<updated>2016-06-19T20:00:23-04:00</updated>

		<published>2016-06-19T20:00:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105197#p105197</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105197#p105197"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105197#p105197"><![CDATA[
Thank you for the replies everyone. I've tried adding the following:<div class="codebox"><p>Code: </p><pre><code>set test [string is upper $letter]   if {![string compare -length 5 "Guest" $nick]} {   set test 0</code></pre></div>and my script isn't working. Maybe I'm making a stupid mistake, I don't know. I can't see any errors. <br><br>Feel free to tell me '**** off' lol. I've just about got my sense of humour left after fighting with this damn script. I'd appreciate further help, however I won't be offended if you've had enough of me - I certainly am fed up of myself. <br><br>Regards, <br>Stuart.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12617">Dizmo</a> — Sun Jun 19, 2016 8:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2016-06-20T15:06:09-04:00</updated>

		<published>2016-06-19T19:16:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105196#p105196</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105196#p105196"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105196#p105196"><![CDATA[
in the case of the msl one try this:<br><br><div class="codebox"><p>Code: </p><pre><code>On ^*:join:#:{  if ($nick(#,$me,@&amp;~%)) {      if ($regex($nick,/(Guest)/i)) { halt }    if (($left($nick, 1) isupper) &amp;&amp; ($left($nick, 1) isalpha)) { putmode -t0 $chan +v $nick }  }} ON ^*:nick:{  haltdef  var %VoiceFirstCAP = 1  while ( $comchan($newnick,%VoiceFirstCAP) != $null )  {    var %chan1 $v1    if ($nick(%chan1,$me,@&amp;~%)) {      if ($regex($newnick,/(Guest)/i)) { halt }      if (($left($newnick, 1) isupper) &amp;&amp; ($left($newnick, 1) isalpha)) { putmode -t0 %chan1 +v $newnick }      if ($islower($left($newnick,1))) { putmode -t0 %chan1 -v $newnick }    }    inc %VoiceFirstCAP  }  halt}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Sun Jun 19, 2016 7:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-06-19T08:42:07-04:00</updated>

		<published>2016-06-19T08:42:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105193#p105193</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105193#p105193"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105193#p105193"><![CDATA[
You have at least 3 options with using <em class="text-italics"><a href="https://www.tcl.tk/man/tcl8.6/TclCmd/string.htm" class="postlink">string</a></em> alone. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>1. string match - returns 1 for match and 0 otherwise. Example:<div class="codebox"><p>Code: </p><pre><code>if {[string match "Guest*" $nick]} return</code></pre></div>2. String compare (with defining the length of the string we are looking after, in our case 5 cos Guest is 5 characters long) - returns 0 for match and 1 otherwise. Example:<div class="codebox"><p>Code: </p><pre><code>if {![string compare -length 5 "Guest" $nick]} return</code></pre></div>3. string first - return 0 for a match and -1 otherwise. Example:<div class="codebox"><p>Code: </p><pre><code>if {![string first "Guest" $nick]} return</code></pre></div>Pick one of your choice and add it after:<div class="codebox"><p>Code: </p><pre><code>if {[isbotnick $nick] || ![botisop $chan]} return</code></pre></div>if you want to stop the execution if nick matches Guest upon joining the channel.<br><br>But if you wish to devoice members that changed their names to Guest123 for instance, you would have to change previous line you picked, let's say you went with <em class="text-italics">string compare</em>, to:<div class="codebox"><p>Code: </p><pre><code>if {![string compare -length 5 "Guest" $nick]} {set test 0}</code></pre></div>and add it after:<div class="codebox"><p>Code: </p><pre><code>set test [string is upper $letter]</code></pre></div>This way we force the previous test that was testing if first letter of the nick is capital letter to actually <em class="text-italics">fail</em> even if it didn't, and remove the voice of the said member if his nick starts with Guest.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Jun 19, 2016 8:42 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizmo]]></name></author>
		<updated>2016-06-19T06:16:23-04:00</updated>

		<published>2016-06-19T06:16:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105192#p105192</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105192#p105192"/>
		<title type="html"><![CDATA[Modifying the Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105192#p105192"><![CDATA[
Hey, <br><br>I need to add another 'variable' into the script, however I'm a little lost as to how I do it. I'm probably over complicating things again....<br><br>I need the bot to not voice Guest***** nicks. I can't just put a return 1 after a variable check (I hope that makes sense, it sort of does, in my head) because of how the script checks the nicks.<br><br>It's a shame I can't do a 'if line ABC is positive, go to line ABCDEFG' or similar. I'm sure Q basic works like that - can't remember, it's been so long since I used Qbasic (ah the old days). <br><br>I'd appreciate any help.<br><br>Regards, <br>Stuart.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12617">Dizmo</a> — Sun Jun 19, 2016 6:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2016-04-07T02:20:39-04:00</updated>

		<published>2016-04-07T02:20:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104905#p104905</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104905#p104905"/>
		<title type="html"><![CDATA[Re: Thank you]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104905#p104905"><![CDATA[
<blockquote class="uncited"><div>...<br>I'm trying to teach myself tcl again...</div></blockquote>This can be helpful:<br><br><a href="http://suninet.the-demon.de/" class="postlink">http://suninet.the-demon.de/</a><br><br><br>There are others too.  <br>That one is a tutor though, that starts from scratch.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Thu Apr 07, 2016 2:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizmo]]></name></author>
		<updated>2016-04-07T01:25:08-04:00</updated>

		<published>2016-04-07T01:25:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104904#p104904</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104904#p104904"/>
		<title type="html"><![CDATA[Thank you]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104904#p104904"><![CDATA[
caesar and simo, thank you so much.<br><br>You two are legends. The tcl script works a dream <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>You, Sir, are a diamond<br><br>Just got to make a profile script now <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>I'm trying to teach myself tcl again so the profile script can wait <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I'm messing around with a database script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12617">Dizmo</a> — Thu Apr 07, 2016 1:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-04-02T04:56:26-04:00</updated>

		<published>2016-04-02T04:56:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104872#p104872</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104872#p104872"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104872#p104872"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind join * * case:joinedbind nick * * case:nickproc case:joined {nick uhost hand chan} {# we trigger our special function to do the testing when someone just joined the channelcase:action $chan $nick}proc case:nick {nick uhost hand chan newnick} {# we trigger our special function to do the testing when someone just changed his nick to a new onecase:action $chan $newnick}proc case:action {chan nick} {# check if bot is the one that joined the channel and then check if he's a channel operator (has @)if {[isbotnick $nick] || ![botisop $chan]} return# we split the nick in sepatate elements (let's call them letters) and grab only the first oneset letter [lindex [split $nick ""] 0]# we test if the letter we previously grabbed is in uppercase (result will be 1) or lowercase (result will be 0)set test [string is upper $letter]# if the result is 1 then proceed to the next stepif {$test} {# test if the nick isn't already voicedif {![isvoice $nick $chan]} {# nick isn't already voiced so give him voice (+v)pushmode $chan +v $nick}# the previous test failed thus we do something else in return} else {# test if nick has voice (+v) on the channelif {[isvoice $nick $chan]} {# and now we actually remove his voice (+v) statuspushmode $chan -v $nick}}}</code></pre></div>Haven't tested this so let me know if doesn't work. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"> Should do what you asked for. And I don't need anything in return apart a 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=187">caesar</a> — Sat Apr 02, 2016 4:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[simo]]></name></author>
		<updated>2016-04-01T16:43:23-04:00</updated>

		<published>2016-04-01T16:43:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104871#p104871</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104871#p104871"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104871#p104871"><![CDATA[
try this for your mirc code i added putmode so it would do like +vvvv nick1 nick2 nick3 nick4  in 1 line in the case of multi users joining so it wont spam channel with multi lines of +v for each nick :<br><div class="codebox"><p>Code: </p><pre><code>On ^*:join:#:{  if ($nick(#,$me,@&amp;~%)) {    if (($left($nick, 1) isupper) &amp;&amp; ($left($nick, 1) isalpha)) { putmode -t0 $chan +v $nick }  }} ON ^*:nick:{  haltdef  var %VoiceFirstCAP = 1  while ( $comchan($newnick,%VoiceFirstCAP) != $null )  {    var %chan1 $v1    if ($nick(%chan1,$me,@&amp;~%)) {      if (($left($newnick, 1) isupper) &amp;&amp; ($left($newnick, 1) isalpha)) { putmode -t0 %chan1 +v $newnick }      if ($islower($left($newnick,1))) { putmode -t0 %chan1 -v $newnick }    }    inc %VoiceFirstCAP  }  halt}Alias putmode {  if (!$isid) {    var %echo = !echo -acq $+ $iif($active == Status Window,e) info *    var %strict = $true    if ($left($1,1) == -) {      if (f isincs $1) %strict = $false      if (t isincs $1) !.echo -q $regex(putmode,$1,/t(\d*)/)      tokenize 32 $2-    }    if ($2 == $null) %echo /putmode: insufficient parameters    else {      var %name = putmode. $+ $cid $+ . $+ $1      if (!$timer(%name)) {        hadd -m %name index -1        hadd -m %name current 0        hadd -m %name strict $iif(%strict,$true,$false)        ; deze $ifmatch,0) is normaal $ifmatch,1400)        !.timer $+ %name -m 0 $iif($regml(putmode,1) isnum,$ifmatch,0) putmode.exec $cid $1        !.echo -q $regex(putmode,reset,/reset/)      }      hinc -m %name index      hadd -m %name $hget(%name,index) $2-    }  }} alias putmode.exec {  var %name = putmode. $+ $1 $+ . $+ $2, %parameter, %parameters, %tmp, $&amp;    %index = $hget(%name,current), %subindex, %modestring, %prefix, $&amp;    %parmrequired = $remove($gettok($chanmodes,1-2,44),44) $+ $nickmode, $&amp;    %parmrequiredset = $gettok($chanmodes,3,44), %string, %substring, %operator  while ($hget(%name,%index) &lt;= $hget(%name,index)) {    %string = $ifmatch    %subindex = 1    while (%subindex &lt;= $len($gettok(%string,1,32))) {      %substring = $mid(%string,%subindex,1)      %parameter = $gettok(%string,2,32)      if (%substring isin +-) {        %tmp = %prefix        %prefix = $ifmatch        if (%prefix == %tmp) goto loopend      }      elseif (%substring isincs %parmrequired || (%substring isincs %parmrequiredset &amp;&amp; %prefix == +)) {        if (%substring isincs $nickmode &amp;&amp; $gettok(%string,2,32) !ison $2) goto loopend        elseif (%substring isincs bhoqv &amp;&amp; $hget(%name,strict)) {          if (%substring === b) &amp;&amp; ($chr(33) !isin %parameter) &amp;&amp; (@ !isin %parameter) {            if (%parameter == $null) !.echo -q .            elseif (. !isin %parameter) %parameter = %parameter $+ !*@*            else %parameter = *!*@ $+ %parameter          }          %operator = $iif(%prefix == -,!) $+ is $+ $replacex(%substring,b,ban,q,owner,o,op,h,hop,v,voice)          if (%parameter %operator $2) goto loopend        }        %parameters = %parameters %parameter        %string = $gettok(%string,1,32) $gettok(%string,3-,32)      }      %modestring = %modestring $+ %substring      if ($numtok(%parameters,32) == $modespl) {        if ($me ison $2) || ($me ison $2)  !mode $2 %modestring %parameters        %string = $mid($gettok(%string,1,32),$calc(%subindex + 1)) $gettok($hget(%name,%index),$calc($modespl + 2) $+ -,32)        hadd -m %name %index $iif($left(%string,1) !isin +-,%prefix) $+ %string        goto end      }      :loopend      inc %subindex    }    hdel %name %index    hinc %name current    inc %index  }  if (($me ison $2 || $me ison $2) &amp;&amp; $len(%modestring) &gt; 1) {    !mode $2 %modestring %parameters    hdel %name %index  }  :end  if ($hget(%name,0).item == 3) putmode.cleanup $1 $2}alias putmode.cleanup {  var %name = putmode. $+ $1 $+ . $+ $2  !.timer $+ %name off  hfree -w %name}ON *:KICK:#:if ($knick == $me) putmode.cleanup $cid $chanON *:PART:#:if ($nick == $me) putmode.cleanup $cid $chanON *:DISCONNECT:{ putmode.cleanup $cid *  | echo -at 0,4 *!*...Disconnected...*!*  00,03 $network  }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12505">simo</a> — Fri Apr 01, 2016 4:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Dizmo]]></name></author>
		<updated>2016-04-01T14:52:10-04:00</updated>

		<published>2016-04-01T14:52:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104870#p104870</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104870#p104870"/>
		<title type="html"><![CDATA[Voice/Devoice on Nickname Change mIRC to TCL]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104870#p104870"><![CDATA[
Hey, I've tried looking for a pre-made TCL script to do what I need it to do however I've managed to 'hit a brick wall'. <br><br>The mIRC version is terrible, no wonders as most of it was written by myself. Here is the mIRC version (**IF you only know mIRC scripting and are able to make the script below 'less buggy and annoying (No Such Channel: #CHANNEL), when connected to other networks, then please read the last paragraph of my post):<div class="codebox"><p>Code: </p><pre><code>on %*:join:#CHAN:{  if (($left($nick, 1) isupper) &amp;&amp; ($left($nick, 1) isalpha)) { .mode #CHAN +v $nick }}on *:NICK: {  if (($left($newnick, 1) isupper) &amp;&amp; ($left($newnick, 1) isalpha)) { .mode #CHAN +v $newnick }  if ($islower($left($newnick,1))) { .mode #CHAN -v $newnick }}</code></pre></div>The script, although buggy and annoyingly spammy, does the following:<br><br>Voices users that join a specific channel who have a capitalised first letter of their nick; f.ex Dizmo. The second part of the script devoices (/nick testing123), or voices (/nick Testing123) on nick change.<br><br>This applies to all users, even ones that are opped, or in this case (InspIRCd); users with +vho +ao of +q.<br><br>The reason for the script: When users are 'active' they change their nicks from 'test' to 'Test' and thus get voice. I tried to write this in TCL but got so annoyed by myself that I didn't only give up, I also deleted the script; so I can't even prove that I've tried to do it. <br><br>I hate asking people to write scripts and certainly can't afford to pay for someone to write the script for me, however, if my next suggestion* isn't breaking 'egghelp.org's' rules then I'm good if you are. <br><br>* I can host an eggdrop or bnc for free (not really sure how long for, at least a month). If said eggdrop/bnc is to be on QuakeNET then you'll have to give me time to get a trust set up. ** If you're happy to make this mIRC script better then I will offer an eggdrop/bnc for free for a duration (not sure how long for).<br><br>Thank you in advance, I really appreciate it. <br>Regards, <br>Dizmo. <br><br>P.S I also have a web hosting company so I may be willing to offer discount hosting/free hosting (with limits). Nothing is free in this life <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=12617">Dizmo</a> — Fri Apr 01, 2016 2:52 pm</p><hr />
]]></content>
	</entry>
	</feed>
