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

	<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>2015-04-09T18:41:11-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-04-09T18:41:11-04:00</updated>

		<published>2015-04-09T18:41:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103775#p103775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103775#p103775"/>
		<title type="html"><![CDATA[[SOLVED]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103775#p103775"><![CDATA[
<blockquote class="uncited"><div>On what IRC Network are you? Dose it support channel invites?</div></blockquote> I'm chathispano IRC network.<br>The mode "+I" for channels is not a valid mode for that network.<br>Anyway, the bot works well with the invite, invites all channels (although these channels do not have the "+I" mode.).<br>The problem is that the bot adds the previously mentioned modes in the channel where I execute the command (!addinvite) if in the nick's characters (letters) is one of the modes supported by the network for channels (CcikmMRstu).<br><br>I came up with an idea to remove these modes, but as I am newbie I not doing the work well with variables and timers.<br>The idea is that I had the channel modes are compared (before executing the command  newchaninvite) and then executed the same, whith [getchanmode $chan].<br>The next step would be to compare the variables which channel modes were saved, and remove the mode that is different from the first list.<br><br>The issue is that I have to wait at least 5 seconds to check again [getchanmode $chan] for the list is refreshed with the new mode added by the bot (network lag).<br>Another problem that I have is that the variable $mode2  give error  until  is not yet set will by the timer.<br>I do not know, if the comparison of the variables is well in the 'While'.<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|o !addinvite pub:addinviteproc pub:addinvite {n u h c t} {###### I store channel modes in the variable modes1 #####  set modes1 [getchanmode $c]###### Show values on channel ######putmsg $chan "The channel current modes are: $modes1"##### Add mask to nick ($t)#####set t "$t[join !*@*]"##### Consults if the nick is on the invite list Channel ($t)#####   if {![isinvite $t $chan]} {  newchaninvite $chan $t invite 0 sticky##### I add this timer for 5 seconds to allow time for the list to refresh (Has the correct syntax the next line, utimer command?)#####  utimer 5 [list set modes2 [getchanmode $chan]]  utimer 4 [list putmsg $chan "Now the channel current modes are: $modes2"]##### HERE is where the problems begin, because the variable $modes2 is not yet set will by the timer 5 seconds!######### No how to make the code stop here, until $modes2 variable is not set, and then continue to the next line when variable $modes2 be set. ####  set large [string length $modes2]  set x 0  while  {$x &lt; $large} {#####  Not know if the comparison of the variables $mode2 and $mode1 is is performed in this way. #####      if {[string index $modes2 $x] != [string index $modes1 $x]} {    set modchange [string index $modes2 $x]       pushmode $chan "-[join $modchange]"          unset modchange         }     incr $x     } putmsg $chan "$t has been added to the autoinvite database $c" return    } else {  putmsg $chan "$t is already in the autoinvite database $c"     }}</code></pre></div>Could help me fix this code?<br><br><strong class="text-strong">Edit: </strong> Fixed, to see solution in this <a href="http://forum.egghelp.org/viewtopic.php?t=19916" class="postlink">thread.</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Thu Apr 09, 2015 6:41 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-04-09T02:18:10-04:00</updated>

		<published>2015-04-09T02:18:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103773#p103773</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103773#p103773"/>
		<title type="html"><![CDATA[Windrop  problem with the command newchaninvite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103773#p103773"><![CDATA[
On what IRC Network are you? Dose it support channel invites?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Apr 09, 2015 2:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-04-08T20:35:18-04:00</updated>

		<published>2015-04-08T20:35:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103768#p103768</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103768#p103768"/>
		<title type="html"><![CDATA[Windrop  problem with the command newchaninvite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103768#p103768"><![CDATA[
<a href="http://forum.egghelp.org/viewtopic.php?p=98805" class="postlink">complete script <span style="color:red">here </span><span style="color:black">by Johannes13 last post</span></a><br><div class="codebox"><p>Code: </p><pre><code>bind pub o|o +autoinvite pub:addinvite proc pub:addinvite {n u h c a} {   if {![isinvite $a $c]} {      newchaninvite $c $a invite 0 sticky      putnotc $n "$a has been added to the autoinvite database"   } {      putnotc $n "$a is already in the autoinvite database"   }} </code></pre></div> When I add a new guest, the bot change channel modes depending on the letters of nick: S<br><br><span style="text-decoration:underline">Examples</span>:<br><br>&lt;owner&gt; +autoinvite <span style="color:red">m</span>ary<br>&lt;bot&gt; mary has been added to the autoinvite database<br>&lt;bot&gt;   bot puts mode +<span style="color:red">m</span><br><br><br>&lt;owner&gt; +autoinvite <span style="color:red">m</span>ar<span style="color:red">i</span>a<br>&lt;bot&gt; maria has been added to the autoinvite database<br>&lt;bot&gt;   bot puts mode +<span style="color:red">mi</span><br><br><br>&lt;owner&gt; +autoinvite <span style="color:red">Ccm</span><span style="color:black">jh</span><span style="color:red">M</span><span style="color:black">gf</span><br>&lt;bot&gt; mary has been added to the autoinvite database<br>&lt;bot&gt;   bot puts mode +<span style="color:red">CcmM</span><br><br><br>&lt;owner&gt; +autoinvite vbjp<br>&lt;bot&gt; vbjp has been added to the autoinvite database<br>&lt;owner&gt; +autoinvite jhgf<br>&lt;bot&gt; jhgf has been added to the autoinvite database<br><br><span style="text-decoration:underline">Conclusion</span>:<br> If within nick characters are letters that correspond to channel modes, the bot puts these modes: S<br><br>I use <strong class="text-strong">windrop</strong> eggdrop v1.6.21, on CYGWIN_NT-5.1 1.7.15(0.260/5/3).<br><br> I do not understand the reasons for such behavior it has the bot.<br>Can someone help me at least unsettime who putting bot?<br><br>Sorry for my bad english :S<br><br><strong class="text-strong">Edit</strong>: <br> <span style="text-decoration:underline">I installed another clean version </span>of <strong class="text-strong">Windrop</strong> - eggdrop v1.6.19+ctcpfix, on CYGWIN_NT-5.1 1.5.25(0.156/4/2)., to which <span style="text-decoration:underline">only I added this TCL</span>.<div class="codebox"><p>Code: </p><pre><code>bind pub o|o !addinvite invitedproc invited {n u h c t} {      newchaninvite $c $t invite 0 stickyputhelp "PRIVMSG $c :$t has been added to the autoinvite database"      }</code></pre></div>The bot is still behaving the same way.<br><strong class="text-strong">New Conclusion</strong>:<br> The problem is in the invoked command or Windrop, really do not understand and I am a newbie in TCL.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Wed Apr 08, 2015 8:35 pm</p><hr />
]]></content>
	</entry>
	</feed>
