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

	<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>2005-01-12T16:03:23-04:00</updated>

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

		<entry>
		<author><name><![CDATA[CosmicD]]></name></author>
		<updated>2005-01-12T16:03:23-04:00</updated>

		<published>2005-01-12T16:03:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45331#p45331</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45331#p45331"/>
		<title type="html"><![CDATA[auto-add users (with host and basic flags) + expiration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45331#p45331"><![CDATA[
well thx all.. the reason i just put it like that that i just found out too late about the cleanusers... but thx <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=5772">CosmicD</a> — Wed Jan 12, 2005 4:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2005-01-12T12:30:28-04:00</updated>

		<published>2005-01-12T12:30:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45323#p45323</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45323#p45323"/>
		<title type="html"><![CDATA[auto-add users (with host and basic flags) + expiration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45323#p45323"><![CDATA[
Hey one suggestion I have is to prefix newly added users with something like... game_ so that when you "clean" the userfile, you don't delete your real users by mistake. I also put a +G flag on them to help even more. Furthermore, it's very simple to add this cleaning thing you're talking about automatically. Something like:<br><div class="codebox"><p>Code: </p><pre><code>bind join - * autoadd_join # proc autoadd_join {nick host hand chan} {     if {![validuser $hand]} {        set hand game_$nick        if {[validuser $hand]} {             putlog "Adding host to $hand.."             setuser $hand HOSTS [maskhost $host]        } {             putlog "Adding new user $hand.."             adduser $hand [maskhost $host]             chattr $hand +G        }     }    if {[matchattr $hand +G]} {      setuser $hand XTRA gamejoin [clock seconds]    }    return 0 }# I think this executes once per day or something.. I forget the syntaxbind time - "00 00 *" game_cleanupproc game_cleanup {args} {  # change cutoff to whatever you want... tcl is pretty good at  # understanding relative time  set cutoff [clock scan "2 weeks ago"]  foreach hand [userlist +G] {    set gamejoin [getuser $hand XTRA gamejoin]    # only delete users matching game_*    if {$gamejoin &lt; $cutoff &amp;&amp; [string match -nocase "game_*" $hand]} {      deluser $hand    }  }}</code></pre></div>Be sure to set your HANDLEN to be long enough, although it's not critical (user name will be truncated).<br><br>I didn't test this! But I wrote something similar to prune unused hosts from users.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Jan 12, 2005 12:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2005-01-12T07:51:21-04:00</updated>

		<published>2005-01-12T07:51:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45306#p45306</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45306#p45306"/>
		<title type="html"><![CDATA[security warning]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45306#p45306"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>        if {[validuser $nick] == 1} {            putlog "Adding host to $nick.."            setuser $nick HOSTS [maskhost $host]            return 1        }</code></pre></div></div></blockquote>This will allow anyone able to get a nick matching one of your handles to add their own host to that user record in your bot. This might lead to total/partial compromise of your system (depending on your flags/settings/other scripts)<br>I think it would be better to force the users to register with your bot before being able to play. (set learn-users 1; set default-flags ""; + *msg:hello bind should do) And just refuse people who are ![validuser] (telling them how to register)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Jan 12, 2005 7:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Alchera]]></name></author>
		<updated>2005-01-11T18:02:34-04:00</updated>

		<published>2005-01-11T18:02:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45288#p45288</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45288#p45288"/>
		<title type="html"><![CDATA[auto-add users (with host and basic flags) + expiration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45288#p45288"><![CDATA[
<blockquote class="uncited"><div>or I could just use the cleanusers.tcl by slennox</div></blockquote>Use cleanusers.tcl, it's absolutely brilliant for cleaning up user files.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3646">Alchera</a> — Tue Jan 11, 2005 6:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-01-11T10:18:03-04:00</updated>

		<published>2005-01-11T10:18:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45276#p45276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45276#p45276"/>
		<title type="html"><![CDATA[auto-add users (with host and basic flags) + expiration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45276#p45276"><![CDATA[
Well if there already was a script, why did you request for it. Just simply put a continuous timer to make it execute a loop after every interval of time you want (5secs, 10secs etc) so it is continuous and remove the public/dcc trigger binds. <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=4875">awyeah</a> — Tue Jan 11, 2005 10:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CosmicD]]></name></author>
		<updated>2005-01-11T10:01:59-04:00</updated>

		<published>2005-01-11T10:01:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45275#p45275</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45275#p45275"/>
		<title type="html"><![CDATA[auto-add users (with host and basic flags) + expiration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45275#p45275"><![CDATA[
wow,<br><br>or I could just use the cleanusers.tcl by slennox <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> hehe <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>thx <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=5772">CosmicD</a> — Tue Jan 11, 2005 10:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2005-01-11T09:39:31-04:00</updated>

		<published>2005-01-11T09:39:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45272#p45272</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45272#p45272"/>
		<title type="html"><![CDATA[auto-add users (with host and basic flags) + expiration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45272#p45272"><![CDATA[
Well adding a user with a flag on join is indeed a very simple task just 4-5 lines of code. However for the expiration part, that is indeed not very simple.<br><br>For this not join thing, you would have to make arrays and store nicks with userhost. However what if the same person joins with a different host? How will the bot recognize it then? if a persons other host is added. Since almost all isps have dynamic ip's.<br><br>You would probobaly have to make a timer execute every X secs say checking for joins for every nick with the host then check the user file, then delete that entry. But even as far as I know, this is not very simple as it seems. Because you would also have to store the last seen time as well of that nick, and if it exceeds your defined time then only expire the entry.<br><br>Take a look at some seen scripts, that can be a bit helpful. Like bass's seen script, because this will definately involve file manipulation.<br><br>Bans have a time limit to expire, (if not set '0' which is permanent). However users do not expire, they can only be deleted manually.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Tue Jan 11, 2005 9:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CosmicD]]></name></author>
		<updated>2005-01-11T08:03:09-04:00</updated>

		<published>2005-01-11T08:03:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45268#p45268</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45268#p45268"/>
		<title type="html"><![CDATA[auto-add users (with host and basic flags) + expiration]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45268#p45268"><![CDATA[
Hello,<br><br>How can I automaticly add users when they join a channel where my bot is on. (with their host and some basic flags that expire when they do not actively join channels that the bot is on for ,<br><br>I found a small add script, but still I have the problem of the expiration. I really looked hard but all "expire" related tcl's seem to be about ban expires, and not user expires..<br><br>I'd like to find a script that tells the bot that it has to delete the user if it doesnt join for x days (to keep the userlist from groing out of control)<br><br>the add script I have now is<br><div class="codebox"><p>Code: </p><pre><code>bind join - * autoadd_join#proc autoadd_join {nick host hand chan} {    if {$hand == "*"} {        if {[validuser $nick] == 1} {            putlog "Adding host to $nick.."            setuser $nick HOSTS [maskhost $host]            return 1        } {            putlog "Adding new user $nick.."            adduser $nick [maskhost $host]            return 2        }    }    return 0}</code></pre></div>Can someone add this expire thingy to it if they know how to do that ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5772">CosmicD</a> — Tue Jan 11, 2005 8:03 am</p><hr />
]]></content>
	</entry>
	</feed>
