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

	<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>2016-09-21T12:58:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-21T12:58:51-04:00</updated>

		<published>2016-09-21T12:58:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105450#p105450</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105450#p105450"/>
		<title type="html"><![CDATA[Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105450#p105450"><![CDATA[
I believe  caesar's corrections are logicals.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Wed Sep 21, 2016 12:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-21T00:49:44-04:00</updated>

		<published>2016-09-21T00:49:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105449#p105449</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105449#p105449"/>
		<title type="html"><![CDATA[Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105449#p105449"><![CDATA[
Move the<div class="codebox"><p>Code: </p><pre><code>if {[matchattr $handle $bad(flags) $channel]} { continue } </code></pre></div>outside the <em class="text-italics">foreach</em> loop and make it return instead of <em class="text-italics">continue</em>. Also, in <em class="text-italics">newchanban</em> the the time is in minutes, not in seconds so you don't need the [expr $bad(time) * 60]<blockquote class="uncited"><div>lifetime is specified in minutes. If lifetime is not specified, ban-time usually 60) is used. Setting the lifetime to 0 makes it a permanent ban.</div></blockquote><div class="codebox"><p>Code: </p><pre><code>if {[matchattr $handle $bad(flags) $channel]} returnforeach realname [string tolower $bad(fullnames)] {if {[string match $realname [string tolower $fullname]]} {newchanban $channel $banmask $botnick $bad(reason) $bad(time)break}}</code></pre></div>I added a <em class="text-italics">break</em> so if a match has been found you don't need to proceed any further with trying to match the rest of banned real names with what the user has, cos he was already found using one he/she shouldn't and was banned for it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Wed Sep 21, 2016 12:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-20T14:08:55-04:00</updated>

		<published>2016-09-20T14:08:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105448#p105448</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105448#p105448"/>
		<title type="html"><![CDATA[Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105448#p105448"><![CDATA[
Thanks for the input caesar.<br>I had undergone some small correction.<br><div class="codebox"><p>Code: </p><pre><code>foreach realname [string tolower $bad(fullnames)] {if {[string match $realname [string tolower $fullname]]} {if {[matchattr $handle $bad(flags) $channel]} { continue }newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]} else {continue}}</code></pre></div>In this way it has worked properly.<br>Not if I'm being very repetitive with the <span style="color:blue">continue</span> command, but it works for me .<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue Sep 20, 2016 2:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Arnold_X-P]]></name></author>
		<updated>2016-09-20T12:24:28-04:00</updated>

		<published>2016-09-20T12:24:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105447#p105447</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105447#p105447"/>
		<title type="html"><![CDATA[Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105447#p105447"><![CDATA[
hi caesar ..<br>the correct thing of that time as he would be a friend, with its suggestions for this tcl.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8327">Arnold_X-P</a> — Tue Sep 20, 2016 12:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2016-09-20T01:10:06-04:00</updated>

		<published>2016-09-20T01:10:06-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105446#p105446</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105446#p105446"/>
		<title type="html"><![CDATA[Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105446#p105446"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>  foreach realname [string tolower $bad(fullnames)] {if {[string match $realname [string tolower $fullname]]} {if {[matchattr $handle $bad(flags) $channel]} { return 0 }newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]}} </code></pre></div>The <em class="text-italics">matchattr</em> check should be outside of the <em class="text-italics">foreach</em> loop. You should use <em class="text-italics">continue</em> when inside the loop you wish to continue with the loop or <em class="text-italics">break</em> when want to stop, not <em class="text-italics">return</em>.<br><br>You can get the nick from the reply with something crazy like:<div class="codebox"><p>Code: </p><pre><code>set realName [lindex [split [lassign $arguments bot nick user host] :] 1]</code></pre></div>inside the <em class="text-italics">badfullnames</em> and will get the bot's nick and nick, user (ident), host and his real name from the person it whois-ed with just one line.<br><br>If the bot dose a whois on user X and shortly member Y joins and if the raw 311 reply is late then the <em class="text-italics">::nnick</em> will be replaced in the <em class="text-italics">badrealname</em> proc before it's seen by the <em class="text-italics">badfullnames</em> proc, so when the reply comes it will see member Y instead of X.<br><br>Haven't tested anything, just saying from what could happen in theory.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Sep 20, 2016 1:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-19T13:36:19-04:00</updated>

		<published>2016-09-19T13:36:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105445#p105445</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105445#p105445"/>
		<title type="html"><![CDATA[Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105445#p105445"><![CDATA[
Work perfectly!  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> <br><br>Thanks, <strong class="text-strong">BLaCkShaDoW</strong>.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Mon Sep 19, 2016 1:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BLaCkShaDoW]]></name></author>
		<updated>2016-09-19T13:21:16-04:00</updated>

		<published>2016-09-19T13:21:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105444#p105444</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105444#p105444"/>
		<title type="html"><![CDATA[badrealname 1.2]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105444#p105444"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>####################################################################### # # BadFullname vers 1.1 # # #                                    BLaCkShaDoW Productions ####################################################################### ####################################################################### # #On join, if a user`s realname contains any of the restricted words #that are written in this script, the BoT will ban the user :) #Contains protection for users who have access on the boT :) # #      TO ACTIVATE TYPE IN DCC .chanset #canal +badfullname ####################################################################### #Here You can set the words that are forbidden set bad(fullnames) { "*Radio Pepe*" } #Here you can set the reason for the kick / ban set bad(reason) "Bad Fullname" #Here you can set the time for the ban (hours) set bad(time) "2" #Here you can set the flags that are excepted set bad(flags) "n|n"######################################################################## #                         Here starts the config # # ####################################################################### setudef flag badfullname set Autor "BLaCkShaDoW" set vers "1.1" bind join -|- "* *" badrealname proc badrealname {nick host hand chan} { global botnick badset ::cchan $chan set ::nnick $nick set ::hhost $host if { [channel get $chan badfullname] } { if {![botisop $chan]} { return 0 } if {[onchan $nick $chan]} { putserv "WHOIS $nick $nick" bind RAW - 311 badfullnames } } } proc badfullnames { from keyword arguments } { global botnick badset channel $::cchan set nickname $::nnick set host $::hhost set handle "[nick2hand $nickname]" set fullname [string range [join [lrange $arguments 5 end]] 1 end] if {[onchan $nickname $channel]} {          set ident [string tolower [lindex [split $host "@"] 0]]          set banmask  $nickname!$ident@[lindex [split [getchanhost $nickname $channel] "@"] 1]    }   foreach realname [string tolower $bad(fullnames)] { if {[string match $realname [string tolower $fullname]]} { if {[matchattr $handle $bad(flags) $channel]} { return 0 } newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60] } } unbind RAW - 311 badfullnames } putlog "Bad Fullname $vers by $Autor Loaded !"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10416">BLaCkShaDoW</a> — Mon Sep 19, 2016 1:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-19T09:38:07-04:00</updated>

		<published>2016-09-19T09:38:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105443#p105443</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105443#p105443"/>
		<title type="html"><![CDATA[Re: badrealname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105443#p105443"><![CDATA[
<blockquote class="uncited"><div>You should try the *unmodified* version. Do not try to modify, just add the tcl and activate it with the specific flag on the chan you desire.</div></blockquote>Ok , it works.<br>What I have to change for the Ban is the type nick!ident@host ?<br>Currently, the BAN gives it to the virtual IP (host) *!*@host.bla.bla<br><br>Thus , I give the user the opportunity to change your fullname is and can enter immediately.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Mon Sep 19, 2016 9:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BLaCkShaDoW]]></name></author>
		<updated>2016-09-19T02:10:59-04:00</updated>

		<published>2016-09-19T02:10:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105442#p105442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105442#p105442"/>
		<title type="html"><![CDATA[badrealname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105442#p105442"><![CDATA[
You should try the *unmodified* version. Do not try to modify, just add the tcl and activate it with the specific flag on the chan you desire.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10416">BLaCkShaDoW</a> — Mon Sep 19, 2016 2:10 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-19T00:15:48-04:00</updated>

		<published>2016-09-19T00:15:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105441#p105441</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105441#p105441"/>
		<title type="html"><![CDATA[Re: badrealname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105441#p105441"><![CDATA[
<blockquote class="uncited"><div>try this one<br><br><a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1574" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1574</a></div></blockquote>Why not work?<br>I activated the script for the party line <div class="codebox"><p>Code: </p><pre><code>.chanset #mychanel +badfullname</code></pre></div><blockquote class="uncited"><div>channel set #mychanel +udef-flag-badfullname</div></blockquote><strong class="text-strong">Tcl error [badrealname]: can not find channel named "#mychanel"</strong><div class="codebox"><p>Code: </p><pre><code>######################################################################### BadFullname vers 1.1# ##                                    BLaCkShaDoW Productions################################################################################################################################################On join, if a user`s realname contains any of the restricted words #that are written in this script, the BoT will ban the user :)#Contains protection for users who have access on the boT :)##      TO ACTIVATE TYPE IN DCC .chanset #canal +badfullname########################################################################Here You can set the words that are forbiddenset bad(fullnames) {"*Radio Pepe*"}#Here you can set the reason for the kick / banset bad(reason) "Bad Fullname"#Here you can set the time for the ban (hours)set bad(time) "2"#Here you can set the flags that are exceptedset bad(flags) "n|n"set mychan "#mychanel"#########################################################################                         Here starts the config#########################################################################setudef flag badfullnameset Autor "BLaCkShaDoW"set vers "1.1"bind join -|- "* *" badrealnameproc badrealname {nick host hand chan} { global botnick mychanif {$chan != $mychan} { return }set ::cchan $chanset ::nnick $nickset ::hhost $hostif { [chan get $chan badfullname] } {if {![botisop $chan]} { return 0 }if {[onchan $nick $chan]} {putserv "WHOIS $nick $nick"putlog "doing WHOIS to $nick..."bind RAW - 311 badfullnames}}}proc badfullnames { from keyword arguments } {global botnick bad mychanset channel $::cchanif {$channel != $mychan} { return }set nickname $::nnickset host $::hhostset handle "[nick2hand $nickname]"set fullname [string range [join [lrange $arguments 5 end]] 1 end]if {[onchan $nickname $channel]} {    set banmask *!*@[lindex [split [getchanhost $nickname $channel] "@"] 1] }  foreach realname [string tolower $bad(fullnames)] {if {[string match $realname [string tolower $fullname]]} {if {[matchattr $handle $bad(flags) $channel]} { return 0 }newchanban $channel $banmask $botnick $bad(reason) [expr $bad(time) * 60]}}unbind RAW - 311 badfullnames}putlog "Bad Fullname $vers by $Autor Loaded !"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Mon Sep 19, 2016 12:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BLaCkShaDoW]]></name></author>
		<updated>2016-09-18T12:13:43-04:00</updated>

		<published>2016-09-18T12:13:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105440#p105440</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105440#p105440"/>
		<title type="html"><![CDATA[badrealname]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105440#p105440"><![CDATA[
try this one<br><br><a href="http://www.egghelp.org/cgi-bin/tcl_archive.tcl?mode=download&amp;id=1574" class="postlink">http://www.egghelp.org/cgi-bin/tcl_arch ... ad&amp;id=1574</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10416">BLaCkShaDoW</a> — Sun Sep 18, 2016 12:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2016-09-15T14:32:26-04:00</updated>

		<published>2016-09-15T14:32:26-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105438#p105438</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105438#p105438"/>
		<title type="html"><![CDATA[Re: Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105438#p105438"><![CDATA[
<blockquote class="uncited"><div>Ones I found a script to ban certain RealNames (no nicks).<br>I do not remember that post was published and can not find it.<br>If someone remembers a script to control RealNames users on joining the channel, thank you.</div></blockquote>I believe AllProtection does.<br><br>Visit this thread:<br><a href="http://forum.egghelp.org/viewtopic.php?t=9721&amp;start=1305" class="postlink">http://forum.egghelp.org/viewtopic.php? ... start=1305</a><br><br>and ask the author of AP about it.<br>He is active again.   He just released a new version today.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Thu Sep 15, 2016 2:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2016-09-15T13:24:45-04:00</updated>

		<published>2016-09-15T13:24:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105437#p105437</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105437#p105437"/>
		<title type="html"><![CDATA[Ban certain Realnames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105437#p105437"><![CDATA[
Ones I found a script to ban certain RealNames (no nicks).<br>I do not remember that post was published and can not find it.<br>If someone remembers a script to control RealNames users on joining the channel, thank you.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Thu Sep 15, 2016 1:24 pm</p><hr />
]]></content>
	</entry>
	</feed>
