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

	<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>2002-09-19T14:43:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[mike-c]]></name></author>
		<updated>2002-09-19T14:43:50-04:00</updated>

		<published>2002-09-19T14:43:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11128#p11128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11128#p11128"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11128#p11128"><![CDATA[
OK, I removed all other scripts from the config, and started it with stdragon's method in place.<br><br>IT WORKED! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_lol.gif" width="15" height="15" alt=":lol:" title="Laughing"><br><br>I'm assuming another similar script was interfering, but I will sort that out...<br><br>Thanks guys, you've made my day <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"> <br><br>Cheers,<br><br>Mike<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1644">mike-c</a> — Thu Sep 19, 2002 2:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mike-c]]></name></author>
		<updated>2002-09-19T14:30:19-04:00</updated>

		<published>2002-09-19T14:30:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11126#p11126</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11126#p11126"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11126#p11126"><![CDATA[
OK, this is very weird... I realise it shouldn't be line 2, which I got afer a .rehash... so I did a .restart, and it still showed as line 2 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_confused.gif" width="15" height="15" alt=":-?" title="Confused"> (Yes, I'm sure it is the right file)<br><br>I did remove the first one...<br><br>I'm trying a complete shutdown &amp; startup now..<br><br>Mike<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1644">mike-c</a> — Thu Sep 19, 2002 2:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-19T14:27:57-04:00</updated>

		<published>2002-09-19T14:27:57-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11125#p11125</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11125#p11125"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11125#p11125"><![CDATA[
You replaced the one line, but you must have forgotten to delete the first one.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Sep 19, 2002 2:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darko``]]></name></author>
		<updated>2002-09-19T14:27:50-04:00</updated>

		<published>2002-09-19T14:27:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11124#p11124</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11124#p11124"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11124#p11124"><![CDATA[
I've just taught of something. If stdragon's solutions doesn't help, try my regsub but dont escape quotes at all... just remove them. (I assume this will not affect functionality, because you never actualy use that sstring for output.)<br><br>regsub -all \" $text "" text<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1881">darko``</a> — Thu Sep 19, 2002 2:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-19T14:27:47-04:00</updated>

		<published>2002-09-19T14:27:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11123#p11123</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11123#p11123"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11123#p11123"><![CDATA[
THis seems odd.<br><br>Can you paste your new script.<br><br>Some things to check. Are you editing the correct file?<br>Are you doing .rehash?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Sep 19, 2002 2:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mike-c]]></name></author>
		<updated>2002-09-19T14:25:31-04:00</updated>

		<published>2002-09-19T14:25:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11122#p11122</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11122#p11122"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11122#p11122"><![CDATA[
Ok, I replaced that line, and it still errors.  Here is the output of '.tcl putlog $errorInfo'...<br><div class="codebox"><p>Code: </p><pre><code>list element in quotes followed by "," instead of space    while executing"join $text"    (procedure "handle_lamer" line 2)    invoked from within"handle_lamer $_raw1 $_raw2 $_raw3"Tcl: </code></pre></div>I hope this is of some use.<br><br>Cheers,<br><br>Mike<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1644">mike-c</a> — Thu Sep 19, 2002 2:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-19T14:11:55-04:00</updated>

		<published>2002-09-19T14:11:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11118#p11118</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11118#p11118"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11118#p11118"><![CDATA[
Ok delete the first line (set text [join $text]) and change "set text [lrange $text 1 end]" to "set text [join [lrange $text 1 end]]"<br><br>Also, when you're looking at errors, it's helpful if you type ".tcl putlog $errorInfo" right after the error. Then include that output in your post.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Sep 19, 2002 2:11 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mike-c]]></name></author>
		<updated>2002-09-19T13:42:34-04:00</updated>

		<published>2002-09-19T13:42:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11113#p11113</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11113#p11113"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11113#p11113"><![CDATA[
Nope, I still get the same error......<br><div class="codebox"><p>Code: </p><pre><code>foo "bar", foobar</code></pre></div>causes<div class="codebox"><p>Code: </p><pre><code>Tcl error [handle_lamer]: list element in quotes followed by "," instead of space</code></pre></div>This is really annoying me <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><br><br>Cheers,<br><br>Mike<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1644">mike-c</a> — Thu Sep 19, 2002 1:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[darko``]]></name></author>
		<updated>2002-09-19T13:25:05-04:00</updated>

		<published>2002-09-19T13:25:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11111#p11111</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11111#p11111"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11111#p11111"><![CDATA[
Umm, just try to escape unnececery quotes by removing the first line in handle_lamer that goes [join $text] blah.. and replace it with<br><br>regsub -all \" $text \\" text<br><br>I haven't tried putting it in the script myself but it should help.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1881">darko``</a> — Thu Sep 19, 2002 1:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mike-c]]></name></author>
		<updated>2002-09-18T18:24:31-04:00</updated>

		<published>2002-09-18T18:24:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=11076#p11076</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=11076#p11076"/>
		<title type="html"><![CDATA[Still no solution...]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=11076#p11076"><![CDATA[
Ok, I've been playing with this for months now, and the TCL FAQ entry on the main forum page reminded me of it... Here is the full code I have.  I would really appreciate it if someone could offer a solution.<br><div class="codebox"><p>Code: </p><pre><code>bind raw -|- "NOTICE" handle_lamerbind raw -|- "PRIVMSG" handle_lamer# Ban time for kickbanset flood_time 60# Percentage of CAPS allowed in string (0 - 1)set capsp 0.8# Percentage of !?!?! characters allowed in string (0 - 1)set screamp 0.5# Allowed color/control code count (0=not allowed at all)set numcolor 0global lamersproc del_floodvars {key} {    global lamers    array get lamers    catch {unset lamers($key!wt)}    catch {unset lamers($key!w2)}    catch {unset lamers($key!w3)}    return 0}proc handle_lamer {nick keyword text} {    set text [join $text]    global lamers flood_time capsp screamp numcolor    set nick [split $nick !]    set nick [lindex $nick 0]    set text [split $text]    set chan [lindex $text 0]    if {![validchan $chan]} { return 0 }    if {([isop $nick $chan])||([nick2hand $nick]!="*")} { return 0 }    set text [lrange $text 1 end]    set n [md5 $nick]    set screams [regexp -all -- {[!,?]} $text]    set caps [regexp -all -- {[A-Z,Å,Ä,Ö]} $text]     set colors [regexp -all -- "\003" $text]    incr colors [regexp -all -- "\026" $text]    incr colors [regexp -all -- "\033" $text]    set strlen [string length $text]    set retval 0    if {![info exists lamers($n!wt)]} {set lamers($n!wt) [md5 $text]set lamers($n!w2) 1utimer $flood_time "del_floodvars $n"if {($colors&gt;$numcolor)||(([expr $caps/$strlen.0]&gt;$capsp)||([expr $screams/$strlen.0]&gt;$screamp)&amp;&amp;($strlen&gt;3))} {    set lamers($n!w3) 1    putserv "NOTICE $nick :Colours, control codes, and excess CAPS are forbidden" -next} else {    set lamers($n!w3) 0}    } else {        if {[utimerexists "del_floodvars $n"]==""} { utimer $flood_time "del_floodvars $n" }if {$lamers($n!wt)==[md5 $text]} {    set lc $lamers($n!w2)    incr lc    set lamers($n!w2) $lc    if {$lc==2} {putserv "NOTICE $nick :Please do not repeat" -next    } elseif {$lc==3} {putserv "KICK $chan $nick :Do not repeat - Final Warning" -nextset retval 1    } elseif {$lc&gt;3} {newchanban $chan [maskhost [getchanhost $nick $chan]] "Sentinel" "Repetition warnings ignored, banned."putserv "KICK $chan $nick :Repeating is not allowed" -nextputserv "MODE $chan +b [maskhost [getchanhost $nick $chan]]" -nextset retval 1    }} else {    set lamers($n!wt) [md5 $text]    set lamers($n!w2) 1}if {($colors&gt;$numcolor)||(([expr $caps/$strlen.0]&gt;$capsp)||([expr $screams/$strlen.0]&gt;$screamp)&amp;&amp;($strlen&gt;3))} {            set lc $lamers($n!w3)            incr lc            set lamers($n!w3) $lc            if {$lc==2} {                putserv "KICK $chan $nick :Colours, control codes, and excess CAPS are forbidden - Final Warning" -nextset retval 1            } elseif {$lc&gt;2} {                newchanban $chan [maskhost [getchanhost $nick $chan]] "Sentinel" "Colours, control codes, and excess CAPS are forbidden"                putserv "KICK $chan $nick :Colours/control codes/CAPS warning ignored, banned." -next                putserv "MODE $chan +b [maskhost [getchanhost $nick $chan]]" -nextset retval 1    }}    }    return $retval}</code></pre></div><br>Thanks,<br><br>Mike<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1644">mike-c</a> — Wed Sep 18, 2002 6:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-05T12:57:13-04:00</updated>

		<published>2002-09-05T12:57:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10529#p10529</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10529#p10529"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10529#p10529"><![CDATA[
Eh who knows, it's hard to say without all the code involved. You shouldn't do [join $text] unless $text has already been split in the past. I'm sure you would have included that if it had been, so removing that line was the correct thing to do. If it makes the script break, the error ie elsewhere.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Sep 05, 2002 12:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mike-c]]></name></author>
		<updated>2002-09-05T12:37:48-04:00</updated>

		<published>2002-09-05T12:37:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10528#p10528</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10528#p10528"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10528#p10528"><![CDATA[
Hi,<br><br>I removed the line<br><div class="codebox"><p>Code: </p><pre><code>set text [join $text]</code></pre></div>and now the script doesn't do anything... it's as though it's not even loaded <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><br><br>Thanks for your ideas.<br><br>Cheers,<br><br>Mike<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1644">mike-c</a> — Thu Sep 05, 2002 12:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-05T12:31:48-04:00</updated>

		<published>2002-09-05T12:31:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10527#p10527</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10527#p10527"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10527#p10527"><![CDATA[
Just delete the line that says [join $text]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Sep 05, 2002 12:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mike-c]]></name></author>
		<updated>2002-09-05T12:22:21-04:00</updated>

		<published>2002-09-05T12:22:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10526#p10526</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10526#p10526"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10526#p10526"><![CDATA[
Hi,<br><br>Thanks for your replies... I think the method suggested (split) is already in place...<br><div class="codebox"><p>Code: </p><pre><code>proc handle_lamer {nick keyword text} {    set text [join $text]    set nick [split $nick !]    set nick [lindex $nick 0]    set text [split $text]    set chan [lindex $text 0]    set text [lrange $text 1 end]</code></pre></div>I'll have a read through that other thread, and see if I can find a solution there.<br><br>Cheers,<br><br>Mike<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1644">mike-c</a> — Thu Sep 05, 2002 12:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-09-05T12:15:49-04:00</updated>

		<published>2002-09-05T12:15:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10525#p10525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10525#p10525"/>
		<title type="html"><![CDATA[Tcl Errors - Quotation Marks]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10525#p10525"><![CDATA[
Find places that say lindex $text 1, and change it to lindex [split $text] 1<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Sep 05, 2002 12:15 pm</p><hr />
]]></content>
	</entry>
	</feed>
