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

	<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>2003-11-06T17:20:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-11-06T17:20:42-04:00</updated>

		<published>2003-11-06T17:20:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29655#p29655</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29655#p29655"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29655#p29655"><![CDATA[
<blockquote class="uncited"><div>The @#dn occurs in case of an op notice (onotice). Just filter the destination of the notice and will work smoothly.</div></blockquote>I wouldn't like that, since this way they could spam the ops with notices... but... since both scripts don't handle really critical spamming it might be an idea.<br><br>btw. the [expr ...] is know solved, I just changed 5:2 to "5 2"...<br><br>but now I have a new problem...<div class="codebox"><p>Code: </p><pre><code>...  utimer [lindex $shortflood 1] [list shortflood_timer $uhost $chan) ]  return 0}proc shortflood_timer {uhost chan} {  global shortflooders  incr shortflooders($uhost:$chan) -1  if { $shortflooders($uhost:$chan) == 0 } {    unset shortflooders($uhost:$chan)  }}</code></pre></div>gives<div class="codebox"><p>Code: </p><pre><code>can't read "shortflooders(DeKus@p5xxxxxxx.dip0.t-ipconnect.de:#zeitenwandel))": no such element in array</code></pre></div>since it counts correct up, it should get as many count downs as count ups so it should end in 0 and the unset...<blockquote class="uncited"><div>[22:15:29] &lt;|4m3rb4||&gt; 1<br>[22:15:30] &lt;|4m3rb4||&gt; 2<br>[22:15:30] &lt;|4m3rb4||&gt; 3<br>[22:15:31] 4·8 StarZ|Clan added banmask: *!<a href="mailto:DeKus@p50840964.dip0.t-ipconnect.de">DeKus@p50840964.dip0.t-ipconnect.de</a><br>[22:15:31] 4&lt;4 kicked: |4m3rb4|| (StarZ|Clan: gebannt: 5m - extrem Flood (8 in 2 seconds)4)<br><br>[22:15:31] &lt;StarZ|Clan&gt; [22:15] Tcl error in script for 'timer707':<br>[22:15:31] &lt;StarZ|Clan&gt; [22:15] can't read "shortflooders(<a href="mailto:DeKus@p50840964.dip0.t-ipconnect.de">DeKus@p50840964.dip0.t-ipconnect.de</a>:#zeitenwandel))": no such element in array<br>[22:15:31] &lt;StarZ|Clan&gt; [22:15] Tcl error in script for 'timer708':<br>[22:15:31] &lt;StarZ|Clan&gt; [22:15] can't read "shortflooders(<a href="mailto:DeKus@p50840964.dip0.t-ipconnect.de">DeKus@p50840964.dip0.t-ipconnect.de</a>:#zeitenwandel))": no such element in array<br>[22:15:32] &lt;StarZ|Clan&gt; [22:15] Tcl error in script for 'timer711':<br>[22:15:32] &lt;StarZ|Clan&gt; [22:15] can't read "shortflooders(<a href="mailto:DeKus@p50840964.dip0.t-ipconnect.de">DeKus@p50840964.dip0.t-ipconnect.de</a>:#zeitenwandel))": no such element in array</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Nov 06, 2003 5:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-11-06T17:11:02-04:00</updated>

		<published>2003-11-06T17:11:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29652#p29652</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29652#p29652"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29652#p29652"><![CDATA[
The @#dn occurs in case of an op notice (onotice). Just filter the destination of the notice and will work smoothly.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Nov 06, 2003 5:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-11-06T17:16:40-04:00</updated>

		<published>2003-11-06T17:10:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29651#p29651</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29651#p29651"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29651#p29651"><![CDATA[
nvm <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=282">egghead</a> — Thu Nov 06, 2003 5:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-11-06T17:06:39-04:00</updated>

		<published>2003-11-06T17:06:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29650#p29650</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29650#p29650"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29650#p29650"><![CDATA[
*grabs backup from temp dir*<div class="codebox"><p>Code: </p><pre><code>bind notc -|- * handle_lamer_noticeproc handle_lamer_notice {nick uhost hand text chan} {  if { [validchan $chan] } { handle_lamer $nick $uhost $hand $chan "$text" }  return 0}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Nov 06, 2003 5:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-11-06T17:02:45-04:00</updated>

		<published>2003-11-06T17:02:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29648#p29648</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29648#p29648"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29648#p29648"><![CDATA[
Put the code of the handle_lamer_notice proc..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Nov 06, 2003 5:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-11-06T17:04:21-04:00</updated>

		<published>2003-11-06T16:58:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29647#p29647</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29647#p29647"/>
		<title type="html"><![CDATA[Re: syntax error in expression ... missing close parenthesis]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29647#p29647"><![CDATA[
<blockquote class="uncited"><div><div class="codebox"><p>Code: </p><pre><code>validchan $chan</code></pre></div></div></blockquote>was a nice idead from me... but did relault to this:<div class="codebox"><p>Code: </p><pre><code>[19:10] Tcl error [handle_lamer_notice]: illegal channel: @#dn</code></pre></div>and I don't know how to strip this @ easier...<br><br>PS: other function, same code ^^. played a bit with quakenets lamer.tcl <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy">.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Nov 06, 2003 4:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-11-06T17:01:18-04:00</updated>

		<published>2003-11-06T16:45:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29646#p29646</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29646#p29646"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29646#p29646"><![CDATA[
*headbang*<br>args, FU, *grmpf*<br>damn elseif...<br><br>hmm, strange seem he doens't like <div class="codebox"><p>Code: </p><pre><code>set overkill [expr [lindex $shortflood 0]+3]</code></pre></div> because of <div class="codebox"><p>Code: </p><pre><code>Tcl error [shortflood]: syntax error in expression "5:2+3": extra tokens at end of expression</code></pre></div>as egghead mentioned... looks strange, but works in repeat1.1.tcl...<br>set rp_bflood 10:600<br>...<br>[lindex $rp_bflood 0]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Nov 06, 2003 4:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-11-06T16:31:02-04:00</updated>

		<published>2003-11-06T16:31:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29643#p29643</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29643#p29643"/>
		<title type="html"><![CDATA[Re: syntax error in expression ... missing close parenthesis]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29643#p29643"><![CDATA[
<blockquote class="uncited"><div>[snip]<br>is there a better way to detect a string a valid channal then this?<div class="codebox"><p>Code: </p><pre><code>[validchan [string range $chan [string first # $chan] e]]</code></pre></div></div></blockquote><div class="codebox"><p>Code: </p><pre><code>validchan $chan</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Thu Nov 06, 2003 4:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-11-06T16:27:37-04:00</updated>

		<published>2003-11-06T16:27:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29642#p29642</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29642#p29642"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29642#p29642"><![CDATA[
Oups.. yes, mixed things a bit.. damn. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":o" title="Surprised"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Nov 06, 2003 4:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[egghead]]></name></author>
		<updated>2003-11-06T16:29:29-04:00</updated>

		<published>2003-11-06T16:21:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29641#p29641</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29641#p29641"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29641#p29641"><![CDATA[
no, the last one... (elseif { shortflooders($uhost:$chan) == $overkill })<br><br>and besides<br><div class="codebox"><p>Code: </p><pre><code>set shortflooders ""</code></pre></div>prohibits it from being an array (which will be your next problem).<br><br>Besides that <br><div class="codebox"><p>Code: </p><pre><code>set shortflood 5:2 </code></pre></div>is a weird combination with<br><div class="codebox"><p>Code: </p><pre><code>lindex $shortflood 0</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=282">egghead</a> — Thu Nov 06, 2003 4:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-11-06T16:20:02-04:00</updated>

		<published>2003-11-06T16:20:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29640#p29640</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29640#p29640"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29640#p29640"><![CDATA[
Yes. That one.. Why don't you use instead of the if and else line an switch thing? Also, in the <em class="text-italics">} elseif { shortflooders($uhost:$chan) == $overkill } {</em> check should be &gt;= insted of just equal.. If it's bigger than it then nothing will happen. <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=187">caesar</a> — Thu Nov 06, 2003 4:20 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-11-06T16:14:58-04:00</updated>

		<published>2003-11-06T16:14:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29639#p29639</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29639#p29639"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29639#p29639"><![CDATA[
are you talking about that line?<div class="codebox"><p>Code: </p><pre><code>if { $shortflooders($uhost:$chan) == [lindex $shortflood 0] } {</code></pre></div>thats first I thought, too. I also made a .restart to be sure it has been refreshed. same as without $ ^^.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Nov 06, 2003 4:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-11-06T16:06:55-04:00</updated>

		<published>2003-11-06T16:06:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29637#p29637</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29637#p29637"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29637#p29637"><![CDATA[
You're missing $ in front of your first variable in the expression<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Nov 06, 2003 4:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2003-11-06T16:48:15-04:00</updated>

		<published>2003-11-06T15:51:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=29634#p29634</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=29634#p29634"/>
		<title type="html"><![CDATA[syntax error in expression ... missing close p... [solved]]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=29634#p29634"><![CDATA[
I am having a strange error in a new written script :/<div class="codebox"><p>Code: </p><pre><code>Tcl error [shortflood]: syntax error in expression " shortflooders($uhost:$chan) == $overkill ": missing close parenthesis at end of function call</code></pre></div>I counted the braces, but couldn't find the misstake. The if-construct as it is is copied from repeat1.1.tcl<div class="codebox"><p>Code: </p><pre><code>if {$rp_bcount($uhost:$chan:$text) == [lindex $rp_bflood 0]}</code></pre></div>But I have an addional hint, I got the error even when a user excluded user writes something. I tested '.tcl putidx 16 [matchattr De_Kus of|of #zeitenwandel]' manually, and it return 1...<br><br>System:<br>eggdrop v1.6.15 (default stable windrop build from windrop.sourceforge.net)<br>OS: CYGWIN_NT-5.0 1.3.22(0.78/3/2)<br>Tcl version: 8.4.1 (header version 8.4.1)<br><br>since it's a little script I don't mind publishing it:<div class="codebox"><p>Code: </p><pre><code># Shortflood kick by De Kus## this script is intended to use as a second flood kick timer. you may# use it for any timers, but I recommed to use the builtin feature first!# Don't use it either, if you can use a server flood setting for the channel :)# lines in seconds before kickset shortflood 5:2# exclude flagsset shortfloodexclude fo|fo# kick causeset shortfloodkick "\001Flood\001 - limited to \0015\001 lines per \0012\001 seconds"## End of configuration#set shortflooders ""bind pubm -|- * shortfloodbind notc -|- * shortflood_notcproc shortflood_notc {nick uhost hand text chan} {  if { [validchan [string range $chan [string first # $chan] e]] } { shortflood $nick $uhost $hand $chan "$text" }  return 0}proc shortflood {nick uhost hand chan text} {  global shortflooders shortflood shortfloodexclude shortfloodkick  if { [matchattr $hand $shortfloodexclude $chan] } { return 0 }  if {![info exists shortflooders($uhost:$chan)]} {    set shortflooders($uhost:$chan) 0  }  incr shortflooders($uhost:$chan)  set overkill [expr [lindex $shortflood 0] + 3]  if { $shortflooders($uhost:$chan) == [lindex $shortflood 0] } {    putkick $chan $nick $shortfloodkick  } elseif { shortflooders($uhost:$chan) == $overkill } {    newchanban $chan "*!$uhost" shortflood "5m - extrem Flood ($overkill in [lindex $shortflood 1] seconds)" 5    putkick $chan $nick "Killed for extrem Flood ($overkill in [lindex $shortflood 1] seconds) - 5m Tempban"  }  utimer [lindex $shortflood 1] [list incr shortflooders($uhost:$chan) -1]  return 0}</code></pre></div>I would have a few addional questions:<br>do you think this much timer could significally use CPU? I mean for each line written one will be created...<br><br>is there a better way to detect a string a valid channal then this?<div class="codebox"><p>Code: </p><pre><code>[validchan [string range $chan [string first # $chan] e]]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Thu Nov 06, 2003 3:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
