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

	<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>2015-05-13T08:56:41-04:00</updated>

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

		<entry>
		<author><name><![CDATA[DragonHeart]]></name></author>
		<updated>2015-05-13T08:56:41-04:00</updated>

		<published>2015-05-13T08:56:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104089#p104089</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104089#p104089"/>
		<title type="html"><![CDATA[Amazing TCL - need help on some parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104089#p104089"><![CDATA[
[18:25] * Quits: submsvguyy (~indecent@59.90.153.245) (Quit: k-lined: autokilled)<br>[18:25] * Arun sets mode: +b *!*@59.90.153.245<br><br>My bot nick is Snapdragon, NO ERRORS this time, but no action by the bot either!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12529">DragonHeart</a> — Wed May 13, 2015 8:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-05-13T08:43:45-04:00</updated>

		<published>2015-05-13T08:43:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104088#p104088</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104088#p104088"/>
		<title type="html"><![CDATA[Amazing TCL - need help on some parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104088#p104088"><![CDATA[
<blockquote class="uncited"><div>...<br>[18:07] &lt;Snapdragon&gt; [12:37:24] Tcl error [nt_quit]: can't read "c": no such variable</div></blockquote><br>You said that you already fixed that once - correct?<br><br>I expect that you have already fixed it by now, but here it is:<br><div class="codebox"><p>Code: </p><pre><code>if {(![channel get $chan newflood]) || (![botisop $chan]) || ([matchattr $hand of|of])} {return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10420">willyw</a> — Wed May 13, 2015 8:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragonHeart]]></name></author>
		<updated>2015-05-13T08:37:45-04:00</updated>

		<published>2015-05-13T08:37:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104087#p104087</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104087#p104087"/>
		<title type="html"><![CDATA[Amazing TCL - need help on some parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104087#p104087"><![CDATA[
[18:07] &lt;Snapdragon&gt; [12:37:20] Tcl error [nt_quit]: can't read "c": no such variable<br>[18:07] &lt;Snapdragon&gt; [12:37:24] Tcl error [nt_quit]: can't read "c": no such variable<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12529">DragonHeart</a> — Wed May 13, 2015 8:37 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[willyw]]></name></author>
		<updated>2015-05-13T07:53:08-04:00</updated>

		<published>2015-05-13T07:53:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104083#p104083</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104083#p104083"/>
		<title type="html"><![CDATA[Re: Amazing TCL - need help on some parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104083#p104083"><![CDATA[
<blockquote class="uncited"><div>The problem comes in Bad Quit ban part!<br><br>Error in dcc showing:<br><br>[16:11] &lt;SeaGold&gt; [10:41:22] Tcl error [nt_quit]: can't read "c": no such variable<br>[16:14] &lt;SeaGold&gt; [10:44:35] Tcl error [nt_quit]: can't read "c": no such variable<br><br><strong class="text-strong">I tried changing $c in the last part to $chan</strong><br>Then, it showed me<br><br>[16:16] &lt;SeaGold&gt; [10:46:49] Tcl error [nt_quit]: can't read "h": no such <br>variable<br>...</div></blockquote>Find this: <div class="codebox"><p>Code: </p><pre><code>proc nt_quit {nick uhost hand chan reason } {  global nt_chans nt_quitmsgs  if {(![channel get $chan newflood]) || (![botisop $c]) || ([matchattr $h of|of])} {return 0} </code></pre></div>Change:<br>matchattr $h<br>to:<br>matchattr $hand<br><br><br>I suspect that you also changed h to hand .    <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=10420">willyw</a> — Wed May 13, 2015 7:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[DragonHeart]]></name></author>
		<updated>2015-05-13T07:02:05-04:00</updated>

		<published>2015-05-13T07:02:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104081#p104081</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104081#p104081"/>
		<title type="html"><![CDATA[Amazing TCL - need help on some parts]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104081#p104081"><![CDATA[
The problem comes in Bad Quit ban part!<br><br>Error in dcc showing:<br><br>[16:11] &lt;SeaGold&gt; [10:41:22] Tcl error [nt_quit]: can't read "c": no such variable<br>[16:14] &lt;SeaGold&gt; [10:44:35] Tcl error [nt_quit]: can't read "c": no such variable<br><br><strong class="text-strong">I tried changing $c in the last part to $chan</strong><br>Then, it showed me<br><br>[16:16] &lt;SeaGold&gt; [10:46:49] Tcl error [nt_quit]: can't read "h": no such <br>variable<br><br>please assist me... Im stuck here, its a bit urgent.<br><div class="codebox"><p>Code: </p><pre><code>################################################################################### Screen Freeze# Consecutive Alphanumeric Host Flood                           # Consecutive Unresolved Host Flood# Bad Quit ban# # .chanset #india +newflood# v3.0 By nANDu (#shockers)# Note: set uh 2:2 &lt;- Is a rigorous setting,# Change it to 3:2 if u want it to be permissive.  ######################################################################################setudef flag newflood# Set Screen Freeze Check Timeset sft 3# Set Screen Freeze Ban Mask Typeset sfb 2# Set alphanumeric host flood x times in y secondsset alpnum 3:2# Consecutive Unresolved Host Flood x:y# EXAMPLE: set uh 2:2set uh 2:2bind join -|- * nandu:floodbind pubm -|- * screen:freezebind notc -|- * freeze:noticebind part -|- * screen:freezeproc nandu:flood {n u h c} {  global sf fldmr sft alpnum adrf acdrf sfb uh urhf curhf  if {(![channel get $c newflood]) || (![botisop $c]) || ([matchattr $h of|of])} {return 0}  if {![info exists fldmr($c)]} { set fldmr($c) 0 }  set n [string tolower $n] ; set c [string tolower $c]  scan $u %\[^@\]@%s ident host   set sf($n) 1 ; utimer $sft [list unset:sf $n]  set alphanumeric [regexp {^[A-Za-z0-9\-\_\.]+\.[A-Za-z]{2,4}$} $host]  if {($alphanumeric == 0)||([string match "Guest?????" "$n"])} {     set acdrf($c) 0    } else {    if {![info exists adrf($c)]} { set adrf($c) "" }    if {$alphanumeric == $adrf($c)} {      incr acdrf($c)      utimer [lindex [split $alpnum :] 1] [list acdrf:dec $c]      if {$acdrf($c) &gt;= [lindex [split $alpnum :] 0]} {        if {$fldmr($c) == 0} {          putquick "MODE $c +MR-k alphanumeric.host.flood" -next          set fldmr($c) 1          timer 1 [list flood:unlock $c]          return 0          }      }       } else {      set adrf($c) $alphanumeric      set acdrf($c) 1      utimer [lindex [split $alpnum :] 1] [list acdrf:dec $c]    }  }  set urh [string match "~*" "$ident"]  if {$urh == 0 || [string match "Guest?????" "$n"]} {     set curhf($c) 0     } else {    if {![info exists urhf($c)]} { set urhf($c) "" }    if {$urh == $urhf($c)} {      incr curhf($c)      utimer [lindex [split $uh :] 1] [list curhf:dec $c]      if {$curhf($c) &gt;= [lindex [split $uh :] 0]} {        if {$fldmr($c) == "0"} {          putquick "MODE $c +MR-k unresolved.host.flood" -next          timer 1 [list flood:unlock $c]          set fldmr($c) 1          return 0        }      }      } else {      set urhf($c) $urh      set curhf($c) 1      utimer [lindex [split $uh :] 1] [list curhf:dec $c]    }  }}proc acdrf:dec {c} {  global acdrf  incr acdrf($c) -1  if {$acdrf($c) &lt; 0} {set acdrf($c) 0}  return 0}proc curhf:dec {c} {  global curhf  incr curhf($c) -1  if {$curhf($c) &lt; 0} {set curhf($c) 0}  return 0}proc screen:freeze {n u h c t} {  global sf fldmr sfb  if {(![channel get $c newflood]) || (![botisop $c]) || ([matchattr $h of|of])} {return 0}  if {![info exists fldmr($c)]} { set fldmr($c) 0 }  set n [string tolower $n] ; set c [string tolower $c] ; set ip [lindex [split $u @] 1]  if {[info exists sf($n)]} {    set strip [ctrl:filter $t]    set txtlen [string length $strip]    if {$txtlen &gt; 25} {      if {$fldmr($c) == 0} {        putquick "MODE $c +MR-k screen.freeze" -next        flood:ban $n $u $c $sfb 10        putquick "KICK $c $n :\[exp/flood\] Screen Freeze?.. Gimme With Extra Cheeze!"        set fldmr($c) 1        timer 1 [list flood:unlock $c]          } else {        flood:ban $n $u $c $sfb 10        putquick "KICK $c $n :\[exp/flood\] Screen Freeze?.. Gimme With Extra Cheeze!"      }      unset sf($n)    }  }}proc freeze:notice {nick uhost handle text dest} {  global botnick  set chan [string tolower $dest]  if {$dest == $botnick || [string index $chan 0] == "@" || $nick == "ChanServ"} {return 0}  screen:freeze $nick $uhost $handle $chan $text}proc unset:sf {n} {  global sf  if {[info exists sf($n)]} {     unset sf($n)  }  return 0}proc ctrl:filter {str} {  regsub -all -- {\003([0-9]{1,2}(,[0-9]{1,2})?)?|\002|\017|\026|\037|\006|\007} $str "" str  return $str} array set sf {}array set fldmr {}############################## BAN/UNBAN STUFF ###############################################proc flood:ban {nick uhost channel type bantime} {  set uhost [string trimleft $uhost "~"]  set testuhost $uhost  set bmask [flood:banmask $nick!$uhost $type]  putquick "MODE $channel +b $bmask" -next  if {$bantime != "0"} {timer $bantime [list flood:unban $channel $bmask]}  return 0}proc flood:unban {channel bmask} {  if {[ischanban $bmask [string tolower $channel]]} {putserv "MODE $channel -b $bmask"}}proc flood:banmask [list name [list type 12]] {  if {[scan $name {%[^!]!%[^@]@%s} nick user host]!=3} {    error "Usage: flood:banmask &lt;nick!user@host&gt; \[type\]"  }  if {![string is int -strict $type] || $type &lt; 0 || $type &gt; 29} {    error "Invalid ban type."  }  set ip [string match {*[0-9]} $host]  if {$type&lt;10||$ip} {    if {[string match {[3489]} [expr {$type%10}]]} {      if $ip {        set host [join [lrange [split $host .] 0 2] .].*        } elseif {[string match *.*.* $host]} {        set host *.[join [lrange [split $host .] end-1 end] .]      }    }    } elseif {$type&gt;19} {    regsub -all {[0-9]+} $host * host    } else {    regsub -all {[0-9]} $host ? host  }  set type [expr {$type%10}]  if [string match {[1368]} $type] {    set user *[string trimleft $user ~]    } elseif {[string match {[2479]} $type]} {    set user *  }  if [string match {[01234]} $type] {    set nick *  }  return $nick!$user@$host}#########################################################################proc flood:unlock {chan} {  global fldmr  set cmode [getchanmode $chan]  set fldmr($chan) 0  if {[string match "*R*M*" "$cmode"]} {putserv "MODE $chan -MR" ; return 0}  if {[string match "*M*" "$cmode"]} {putserv "MODE $chan -M" ; return 0}  if {[string match "*R*" "$cmode"]} {putserv "MODE $chan -R" ; return 0}  return 0}foreach t [timers] {  if {[lindex $t 1] == "flood:unlock"} {killtimer [lindex $t end]}}foreach t [utimers] {  if {[lindex $t 1] == "acdrf:dec"} {killutimer [lindex $t end]}  if {[lindex $t 1] == "curhf:dec"} {killutimer [lindex $t end]}}set chans [channels]set chans [split [string tolower $chans]]foreach c $chans {  set fldmr($c) 0  set adrf($c) ""  set acdrf($c) 0  set urhf($c) ""  set curhf($c) 0}################## Bad Quit Ban ##############bind sign - * nt_quitset nt_quitmsgs {  "*k-lined:*"  "*ftp:*"  "*join #*"  "*Excess Flood*"  "*killed*autokilled*"  "*SendQ exceeded*"}# Set Bad quit channels here (type in lower case)proc nt_quit {nick uhost hand chan reason } {  global nt_chans nt_quitmsgs  if {(![channel get $chan newflood]) || (![botisop $c]) || ([matchattr $h of|of])} {return 0}  set reason [string tolower $reason]  set banquitmask [lindex [split $uhost @] 1]  foreach quitmsg $nt_quitmsgs {    if {[string match $quitmsg $reason]} {      putquick "MODE $chan +b *!*@$banquitmask" -next      return 0    }  }  return 0}putlog "Screen Freeze, (Alphanumeric / Unresolved) Host Flood Loaded v3.0"putlog "Bad Quit banner loaded - nANDu v3.0"#### EOF #### fcuk.u</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12529">DragonHeart</a> — Wed May 13, 2015 7:02 am</p><hr />
]]></content>
	</entry>
	</feed>
