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

	<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>2012-02-15T15:44:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-15T15:44:35-04:00</updated>

		<published>2012-02-15T15:44:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98805#p98805</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98805#p98805"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98805#p98805"><![CDATA[
Ok, rewrite, now it uses eggdrops internal invite list to do that things.<br>That means you can add/remove an invite with +invite/-invite<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|o +autoinvite pub:addinvitebind pub o|o -autoinvite pub:delinvitebind join - * join:chkinviteproc pub:addinvite {n u h c a} {   if {![isinvite $a $c]} {      newchaninvite $c $a $h "" 0 sticky      putnotc $n "$a has been added to the autoinvite database"   } {      putnotc $n "$a is already in the autoinvite database"   }}proc pub:delinvite {n u h c a} {   if {![isinvite $a $c]} {      putnotc $n "$a is not in the autoinvite database"   } {      killchaninvite $c $a      putnotc $n "$a was removed from the autoinvite database"   }}proc join:chkinvite {n u h c} {   foreach ic [channels] {      if {[onchan $n $ic]} {continue}      if {[matchinvite $n!$u $ic]} {         putserv "INVITE $n $ic"      }   }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Wed Feb 15, 2012 3:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PrE]]></name></author>
		<updated>2012-02-15T14:47:23-04:00</updated>

		<published>2012-02-15T14:47:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98802#p98802</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98802#p98802"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98802#p98802"><![CDATA[
wow thanks, I know am asking to much but not giving anything thing other then thanks but is it possible to set mode +I on the same host when the user is added/removed<br><br>so like<br>User added to autoinvite database<br>MODE +I *!*<a href="mailto:user@host.com">user@host.com</a><br><br>User removed from autoinvite database<br>MODE -I *!*<a href="mailto:user@host.com">user@host.com</a><br><br><br>i need this just so if the bot is down or not in the channel the user can still get in the channel.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11890">PrE</a> — Wed Feb 15, 2012 2:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-02-15T02:39:12-04:00</updated>

		<published>2012-02-15T02:39:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98796#p98796</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98796#p98796"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98796#p98796"><![CDATA[
Ahh.. I've checked again your code and you are you are right, my bad. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> I was thinking about something else. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_rolleyes.gif" width="15" height="15" alt=":roll:" title="Rolling Eyes"><br><br>@PrE : Sure. Repalce <em class="text-italics">join:chkinvite</em> with this:<div class="codebox"><p>Code: </p><pre><code>proc join:chkinvite {n u h c} {if {[isbotnick $n]} returnforeach ic [channels] {if {[onchan $n $ic]} continueforeach mask [channel get $c autoinvite] {if {![string match -nocase $n!$u $mask]} continueputserv "INVITE $n $ic"break}}}</code></pre></div>PS: I've upgraded to 8.5 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Feb 15, 2012 2:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PrE]]></name></author>
		<updated>2012-02-14T20:29:44-04:00</updated>

		<published>2012-02-14T20:29:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98795#p98795</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98795#p98795"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98795#p98795"><![CDATA[
the script works now awesome, btw is it possible to add host mask check rather then nick? because i don't want random ppl changing nicks to get in the channel...thanks though.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11890">PrE</a> — Tue Feb 14, 2012 8:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-14T11:06:03-04:00</updated>

		<published>2012-02-14T11:06:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98789#p98789</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98789#p98789"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98789#p98789"><![CDATA[
Ok, as you can see from my script, I treat the value of autoinvite as a list.<br>I use it to store what nicks should be invited to that channel.<br>Such a thing is much simpler than writing my own database with all the IO stuff.<br><br>An other solution is to use user defined flags (A-Z). Also effective, but it requires that every user that should be invited have a handle.<br><br>And ni stands for "not in", right.<br><br>Sorry for my offense, but your tip was to use a flag, and my script uses an other method, so it was useless and I've read more or less: "I don't understand what is going on, but do xyz, this is always good."<br><br>PS.: Tcl 8.5 has some very cool new features that I often use. Some of them are: dicts, extended expr syntax (eq, ne, in, ni), namespace ensebles.<br>I write my scripts always for 8.5 because 8.4 is imho not up-to-date. You can keep your old Tcl version, but then some (if not all) scripts from me won't work for you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Tue Feb 14, 2012 11:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-02-14T05:26:52-04:00</updated>

		<published>2012-02-14T05:26:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98787#p98787</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98787#p98787"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98787#p98787"><![CDATA[
<blockquote class="uncited"><div>[...]you should make autoinvite a flag (+autoinvite when active and -autoinvite when is disabled), not a string. [...]</div></blockquote>You clearly missed out that part.<br><br>My TCL version and knowledge is just fine. I've suggested that change merely to allow other members to easily understand the code.<br><br>Anyway, please take care of that attitude, there's no need to be an asshole and start insulting people.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Feb 14, 2012 5:26 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-13T14:59:02-04:00</updated>

		<published>2012-02-13T14:59:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98782#p98782</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98782#p98782"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98782#p98782"><![CDATA[
caesar: read the script and you _MIGHT_ get an idea why autoinvite is a string, not a flag.<br><br>And reinstall Tcl. 8.5 is out for years, and 8.6b2 is also stable enough to run eggdrop with it.<br><br>And what ni does. I suggest reading the manual for expr.<br><br>Please. I did not wrote that script for you, but you can modify it if you want to use it. But then LEARN TCL.<br><br>One last thing: to get what exact version of Tcl you have, execute tclsh and enter one of that commands:<div class="codebox"><p>Code: </p><pre><code>package provide Tclinfo patchlevel</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Mon Feb 13, 2012 2:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2012-02-13T13:50:20-04:00</updated>

		<published>2012-02-13T13:50:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98779#p98779</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98779#p98779"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98779#p98779"><![CDATA[
What is<div class="codebox"><p>Code: </p><pre><code>if {$a ni [channel get $c autoinvite]} { </code></pre></div>meant to do? "ni" means "not in" or what?<br><br>To check if a specific channel flag is active or not use the builtin <em class="text-italics">channel get</em> function like this:<div class="codebox"><p>Code: </p><pre><code>if {[channel get $c autoinvite]} {</code></pre></div>also, you should make autoinvite a <em class="text-italics">flag</em> (+autoinvite when active and -autoinvite when is disabled), not a <em class="text-italics">string</em>.<br><br>PS: My TCL version is 8.4 (just type <em class="text-italics">tclsh</em> in your shell then <em class="text-italics">puts $tcl_version</em> to see what version you have).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Feb 13, 2012 1:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-13T11:28:54-04:00</updated>

		<published>2012-02-13T11:28:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98777#p98777</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98777#p98777"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98777#p98777"><![CDATA[
Ok, it has the public triggers +autoinvite and -autoinvite.<br><br>Only ops (users with the o flag for either the channel or global) can use that commands.<br><br>And it requires at least Tcl 8.5.<br><br>Try it, if it does not work, please give me the error you receive on the partyline.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Mon Feb 13, 2012 11:28 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PrE]]></name></author>
		<updated>2012-02-13T11:15:44-04:00</updated>

		<published>2012-02-13T11:15:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98775#p98775</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98775#p98775"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98775#p98775"><![CDATA[
the script does not seem to work.... <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11890">PrE</a> — Mon Feb 13, 2012 11:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Johannes13]]></name></author>
		<updated>2012-02-13T11:31:08-04:00</updated>

		<published>2012-02-12T11:03:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98769#p98769</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98769#p98769"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98769#p98769"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>setudef str autoinvitebind pub o|o +autoinvite pub:addinvitebind pub o|o -autoinvite pub:delinvitebind join - * join:chkinviteproc pub:addinvite {n u h c a} {if {$a ni [channel get $c autoinvite]} {set tmp [channel get $c autoinvite]lappend tmp $achannel set $c autoinvite $tmpputnotc $n "$a has been added to the autoinvite database"} {putnotc $n "$a is already in the autoinvite database"}}proc pub:delinvite {n u h c a} {set tmp [channel get $c autoinvite]set pos [lsearch -exact $tmp $a]if {$pos == -1} {putnotc $n "$a is not in the autoinvite database"} {channel set $c autoinvite [lreplace $tmp $pos $pos]putnotc $n "$a was removed from the autoinvite database"}}proc join:chkinvite {n u h c} {foreach ic [channels] {if {[onchan $n $ic]} {continue}if {$n in [channel get $ic autoinvite]} {putserv "INVITE $n $ic"}}}</code></pre></div>May or may not work, might or might not be what you want <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>Edit: fixed some mistakes<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11381">Johannes13</a> — Sun Feb 12, 2012 11:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[PrE]]></name></author>
		<updated>2012-02-11T21:28:40-04:00</updated>

		<published>2012-02-11T21:28:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=98767#p98767</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=98767#p98767"/>
		<title type="html"><![CDATA[auto invite]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=98767#p98767"><![CDATA[
Anyone willing to code me a autoinvite script with a datebase?<br><br>like<br><br>.+adduserdb<br>it will add the use to db (list of people to be invited on join)<br><br>so when the user joins one of the channels the bot is in it check if the user is on invite list and if it is will invite the user to another chan<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11890">PrE</a> — Sat Feb 11, 2012 9:28 pm</p><hr />
]]></content>
	</entry>
	</feed>
