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

	<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>2010-10-30T10:50:26-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-10-30T10:50:26-04:00</updated>

		<published>2010-10-30T10:50:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94919#p94919</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94919#p94919"/>
		<title type="html"><![CDATA[auto banner]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94919#p94919"><![CDATA[
Not stupid at all. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>Put in the file like this:<br><br><a href="mailto:user@host.tld">user@host.tld</a><br><a href="mailto:someone@ip.blah.org">someone@ip.blah.org</a><br><a href="mailto:dude@blah.blah.blah">dude@blah.blah.blah</a><br><br>and so on, on different lines.<br><br>Edit: I also just realized I made a mistake above. Change this line: <div class="codebox"><p>Code: </p><pre><code>set host [getchanhost $nick $chan] </code></pre></div>to<div class="codebox"><p>Code: </p><pre><code>set host [string trim [getchanhost $nick $chan] ~]</code></pre></div>That will trim off any possible "~" before comparing.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Sat Oct 30, 2010 10:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[danter]]></name></author>
		<updated>2010-10-30T04:47:40-04:00</updated>

		<published>2010-10-30T04:47:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94916#p94916</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94916#p94916"/>
		<title type="html"><![CDATA[auto banner]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94916#p94916"><![CDATA[
And how should i write exceptions.txt??<br>On the same line or different line and with ";" or not <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>(sorry about stupid questions...)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11044">danter</a> — Sat Oct 30, 2010 4:47 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-10-29T22:18:21-04:00</updated>

		<published>2010-10-29T22:18:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94912#p94912</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94912#p94912"/>
		<title type="html"><![CDATA[auto banner]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94912#p94912"><![CDATA[
Okay, this is not tested, but let's see how it works for you... <br><div class="codebox"><p>Code: </p><pre><code>bind join * * join:banproc join:ban {nick host hand chan} { set host [getchanhost $nick $chan] set fs "exceptions.txt"   if {![file exists $fs]} {        close [open $fs w]   }   set fs [open $fs]   set data [split [read -nonewline $fs] \n]     close $fs   if {[lsearch $data "$host"] == -1} {       putserv "MODE $chan +b *!*@*.[join [lrange [split $host .] end-1 end] .]   } return}</code></pre></div>Now, if this works, this will search the file "exceptions.txt" in your eggdrop/  for the host set by [getchanhost $nick $chan]. Getchanhost returns the format "<a href="mailto:user@full.domain.tld">user@full.domain.tld</a>", so it will compare based on that. Note this is a simple example and not exactly ideal for all hosts, as the ip field can mess this up, as can the ident/user if the person changes it. What I would recommend, is that you create a custom flag for people, and then see if that flag exists when the person joins. If not, they get banned. Simpler, and will be as effective as the hosts you have added to your users. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> How we could do that is with something as simple as:<br><div class="codebox"><p>Code: </p><pre><code>bind join * * join:banproc join:ban {nick host hand chan} {  If {![matchattr $hand |A $chan]} {     set host [getchanhost $nick $chan]     putserv "MODE $chan +b *!*@*.[join [lrange [split $host .] end-1 end] .]"  } return}</code></pre></div>In this case, the flag "A" would be "authorized". But you can use whatever flag you want really.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Fri Oct 29, 2010 10:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[danter]]></name></author>
		<updated>2010-10-27T14:39:14-04:00</updated>

		<published>2010-10-27T14:39:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94882#p94882</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94882#p94882"/>
		<title type="html"><![CDATA[auto banner]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94882#p94882"><![CDATA[
I presume *!*@*.domain.name would be nice <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=11044">danter</a> — Wed Oct 27, 2010 2:39 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-10-27T10:33:31-04:00</updated>

		<published>2010-10-27T10:33:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94880#p94880</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94880#p94880"/>
		<title type="html"><![CDATA[auto banner]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94880#p94880"><![CDATA[
In what manner would you like them banned in? I assume you are looking for: *!*@*.domain.tld.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Wed Oct 27, 2010 10:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[danter]]></name></author>
		<updated>2010-10-27T04:26:20-04:00</updated>

		<published>2010-10-27T04:26:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94879#p94879</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94879#p94879"/>
		<title type="html"><![CDATA[auto banner]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94879#p94879"><![CDATA[
Hey,<br><br>I need script what will ban user from channel (only ban no kick) when he joins...<br>But i need to set host exceptions myself into some other file or somewhere...<br>Maybe someone can help me <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=11044">danter</a> — Wed Oct 27, 2010 4:26 am</p><hr />
]]></content>
	</entry>
	</feed>
