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

	<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>2008-06-28T09:54:59-04:00</updated>

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

		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-06-28T09:54:59-04:00</updated>

		<published>2008-06-28T09:54:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83774#p83774</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83774#p83774"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83774#p83774"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pub o|o .ban pub:banbind pub o|o .unban pub:ubproc pub:ban {nick uhost hand chan text} {   if {[string length $text] &gt; 0} {      set tnick [lindex [split $text] 0]      if {[onchan $tnick $chan]} {         if {[llength [split $text]] == 1} { set reason banned } else { set reason [join [lrange [split $text] 1 end]] }         putserv "privmsg x :ban $chan $tnick 1 100 $reason"      } else { puthelp "notice $nick :I cannot ask X to ban $tnick. They are not on $chan." }   } else { puthelp "notice $nick :Please use proper format. Usage .ban &lt;nick&gt; \[&lt;reason&gt;\]" }}proc pub:ub {nick uhost hand chan text} {   if {[string length $text] &gt; 0} {      set tnick [lindex [split $text] 0]      putserv "privmsg x :unban $chan $tnick"   } else { puthelp "notice $nick :Please use proper format. Usage .ban &lt;nick&gt; \[&lt;reason&gt;\]" }}</code></pre></div>Norton goofed, he has it check ( if [botisop $chan] == 0 ) and then perform the banning or unbanning. Problem is, that equation will only be true when the bot is NOT opped, and will cry to X to do the banning when it isn't opped. If the bot is opped, this script will do absolutely nothing (except message you "algo falla" (aka, something went wrong)), not quite what you had in mind. This check is NOT necessary since using X the bot can be opped or unopped and it will work. This is how the code above is written, without needless checks. Also corrected norton's flawed string/list manipulations which will cause problems for you with nicknames/reasons containing special characters. This is a very simple script, I've removed the part where eggdrop tries to add bans to it's internal ban list and have it only set these via X (so if opped your eggdrop won't fight with X to kick/ban people). You might have a problem when removing bans, because the script doesn't check just asks X to remove the ban. There are better X manipulation scripts available, this is just something to show you how to fish correctly. You can give a man a fish, and feed him for a day. Or you can teach a man to fish, and feed him for a lifetime. Tcl is alot like fishing to me...The forum is akin to a very big lake filled with vast varieties of fish. This attracts many talented fisherman. The advice given by these fisherman is second to none, there is much you can learn from them. A script is a fish. Anyone can ask for a fish, it takes a true talented fisherman to bring one safely onto the shore without hooking it through the eye, or the gills or any other mangling of the fish.<br><br>Keep in mind to use this, you bot must have access level high enough to ban and be known and identified through X.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sat Jun 28, 2008 9:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danik]]></name></author>
		<updated>2008-06-28T08:11:50-04:00</updated>

		<published>2008-06-28T08:11:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83766#p83766</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83766#p83766"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83766#p83766"><![CDATA[
<blockquote class="uncited"><div>TRY!!<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|o .ban pub:banbind pub o|o .unban pub:ubproc pub:ban {nick uhost hand chan text} {  if {[botisop $chan] == 0} {    if {[string length $text] &gt; 0} {      set tnick [lindex $text 0]      if {[onchan $tnick $chan]} {        if {[string length [lindex $text 1]] == 0} { set reason banned } else { set reason [lrange $text 1 end] }      set maska *!*@[lindex [split [getchanhost $tnick $chan] @] 1]        putserv "PRIVMSG X :ban $chan $maska 1 100 $reason"        newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason 0      } else { puthelp "notice $nick :no such nick on channel!" }    } else { puthelp "NOTICE $nick :usage .ban &lt;nick&gt; reason" }  } else { puthelp "NOTICE $nick :algo falla" }}proc pub:ub {nick uhost hand chan text} {  if {[botisop $chan] == 0} {    if {[string length $text] &gt; 0} {      set tnick [lindex $text 0]putserv "PRIVMSG X :unban $chan $tnick"      if {[ischanban $tnick $chan]} { killchanban $chan $tnick } else { puthelp "NOTICE $nick :no such ban on $chan" }    } else { puthelp "NOTICE $nick :usa .ub &lt;nick!user@host&gt;" }  } else { puthelp "NOTICE $nick :Quitame el @" }}</code></pre></div></div></blockquote>I t doesn't work<br><br>[15:10:16] &lt;user&gt; .ban user test<br>[15:10:18] -botnick- algo falla<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9992">Danik</a> — Sat Jun 28, 2008 8:11 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-06-27T17:57:33-04:00</updated>

		<published>2008-06-27T17:57:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83757#p83757</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83757#p83757"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83757#p83757"><![CDATA[
TRY!!<br><div class="codebox"><p>Code: </p><pre><code>bind pub o|o .ban pub:banbind pub o|o .unban pub:ubproc pub:ban {nick uhost hand chan text} {  if {[botisop $chan] == 0} {    if {[string length $text] &gt; 0} {      set tnick [lindex $text 0]      if {[onchan $tnick $chan]} {        if {[string length [lindex $text 1]] == 0} { set reason banned } else { set reason [lrange $text 1 end] }      set maska *!*@[lindex [split [getchanhost $tnick $chan] @] 1]        putserv "PRIVMSG X :ban $chan $maska 1 100 $reason"        newchanban $chan *!*@[lindex [split [getchanhost $tnick $chan] @] 1] $nick $reason 0      } else { puthelp "notice $nick :no such nick on channel!" }    } else { puthelp "NOTICE $nick :usage .ban &lt;nick&gt; reason" }  } else { puthelp "NOTICE $nick :algo falla" }}proc pub:ub {nick uhost hand chan text} {  if {[botisop $chan] == 0} {    if {[string length $text] &gt; 0} {      set tnick [lindex $text 0]putserv "PRIVMSG X :unban $chan $tnick"      if {[ischanban $tnick $chan]} { killchanban $chan $tnick } else { puthelp "NOTICE $nick :no such ban on $chan" }    } else { puthelp "NOTICE $nick :usa .ub &lt;nick!user@host&gt;" }  } else { puthelp "NOTICE $nick :Quitame el @" }}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Fri Jun 27, 2008 5:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danik]]></name></author>
		<updated>2008-06-27T17:06:34-04:00</updated>

		<published>2008-06-27T17:06:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83756#p83756</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83756#p83756"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83756#p83756"><![CDATA[
I couldn't find the script I need on this link<br>I need (ban &amp; unban public command script))<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9992">Danik</a> — Fri Jun 27, 2008 5:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-06-27T16:56:23-04:00</updated>

		<published>2008-06-27T16:56:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83755#p83755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83755#p83755"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83755#p83755"><![CDATA[
<a href="http://forum.egghelp.org/viewtopic.php?t=15076&amp;highlight=unban" class="postlink">http://forum.egghelp.org/viewtopic.php? ... ight=unban</a><br><br>U should search in the forum before send a post.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Fri Jun 27, 2008 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danik]]></name></author>
		<updated>2008-06-27T16:10:30-04:00</updated>

		<published>2008-06-27T16:10:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83753#p83753</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83753#p83753"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83753#p83753"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind KICK - * CService:kick:by:X:revenge proc CService:kick:by:X:revenge { nick host hand chan target reason } {   global botnick   if {$hand == "X" &amp;&amp; ([isbotnick $target] || [matchattr [nick2hand $target $chan] mo|mo $chan])} {    set temp1 [lindex [split [lindex [split $reason] 0] "("] 1]    set username [lindex [split [lindex [split $temp1] 0] ")"] 0]    putserv "PRIVMSG X :SUSPEND $chan $username 5 D"    putserv "PRIVMSG X :UNBAN $chan $botnick"    puthelp "PRIVMSG X :INVITE $chan"   } }</code></pre></div>the blacklist witch use X undernet  to ban works now perfectly <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br>But does anybody know a public command, to add and remove bans from this list ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9992">Danik</a> — Fri Jun 27, 2008 4:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-06-18T09:51:39-04:00</updated>

		<published>2008-06-18T09:51:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83619#p83619</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83619#p83619"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83619#p83619"><![CDATA[
Paste the code.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Wed Jun 18, 2008 9:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danik]]></name></author>
		<updated>2008-06-18T09:02:54-04:00</updated>

		<published>2008-06-18T09:02:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83618#p83618</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83618#p83618"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83618#p83618"><![CDATA[
<blockquote class="uncited"><div>Don't think so, if so.. the bot need to have access to add bans in X</div></blockquote><br>the  egg has access to X Undernet but it doesn't have OP (@)<br><br>NOOP flag is active on the channel<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9992">Danik</a> — Wed Jun 18, 2008 9:02 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ztian299]]></name></author>
		<updated>2008-06-18T08:34:43-04:00</updated>

		<published>2008-06-18T08:34:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83616#p83616</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83616#p83616"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83616#p83616"><![CDATA[
Don't think so, if so.. the bot need to have access to add bans in X<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9874">ztian299</a> — Wed Jun 18, 2008 8:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danik]]></name></author>
		<updated>2008-06-18T02:29:57-04:00</updated>

		<published>2008-06-18T02:29:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83605#p83605</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83605#p83605"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83605#p83605"><![CDATA[
<blockquote class="uncited"><div>use lol.tcl<br><br>!ban *!*@host.domain time reason - !banmask *!*@host.domain time reason<br><br>0 = perm<br><br>when un user join and have ban, ur eggdrop put ban via X.</div></blockquote>Does this work even if the eggdrop doesn't have op (@) on the chan ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9992">Danik</a> — Wed Jun 18, 2008 2:29 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-06-17T18:24:13-04:00</updated>

		<published>2008-06-17T18:24:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83602#p83602</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83602#p83602"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83602#p83602"><![CDATA[
use lol.tcl<br><br>!ban *!*@host.domain time reason - !banmask *!*@host.domain time reason<br><br>0 = perm<br><br>when un user join and have ban, ur eggdrop put ban via X.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Tue Jun 17, 2008 6:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danik]]></name></author>
		<updated>2008-06-17T17:17:07-04:00</updated>

		<published>2008-06-17T17:17:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83601#p83601</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83601#p83601"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83601#p83601"><![CDATA[
<blockquote class="uncited"><div><a href="http://forum.egghelp.org/viewtopic.php?t=12577&amp;highlight=autoban" class="postlink">http://forum.egghelp.org/viewtopic.php? ... ht=autoban</a></div></blockquote>I added the script to the eggdrop but I can't figure out how to insert bans in it<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9992">Danik</a> — Tue Jun 17, 2008 5:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-06-17T16:35:23-04:00</updated>

		<published>2008-06-17T16:35:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83599#p83599</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83599#p83599"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83599#p83599"><![CDATA[
<a href="http://forum.egghelp.org/viewtopic.php?t=12577&amp;highlight=autoban" class="postlink">http://forum.egghelp.org/viewtopic.php? ... ht=autoban</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Tue Jun 17, 2008 4:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Danik]]></name></author>
		<updated>2008-06-17T16:07:41-04:00</updated>

		<published>2008-06-17T16:07:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83598#p83598</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83598#p83598"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83598#p83598"><![CDATA[
<blockquote class="uncited"><div><a href="http://forum.egghelp.org/viewtopic.php?t=13664&amp;highlight=blacklist" class="postlink">http://forum.egghelp.org/viewtopic.php? ... =blacklist</a><br><br>and add the line that ur need.</div></blockquote>Once again ... I need the eggdrop to use its access to  X Undernet to ban users that are in the blacklist<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9992">Danik</a> — Tue Jun 17, 2008 4:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Nor7on]]></name></author>
		<updated>2008-06-17T16:02:21-04:00</updated>

		<published>2008-06-17T16:02:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=83597#p83597</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=83597#p83597"/>
		<title type="html"><![CDATA[Blacklist Script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=83597#p83597"><![CDATA[
<a href="http://forum.egghelp.org/viewtopic.php?t=13664&amp;highlight=blacklist" class="postlink">http://forum.egghelp.org/viewtopic.php? ... =blacklist</a><br><br>and add the line that ur need.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8762">Nor7on</a> — Tue Jun 17, 2008 4:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
