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

	<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-02-02T18:35:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-02-02T18:35:00-04:00</updated>

		<published>2002-02-02T18:35:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4269#p4269</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4269#p4269"/>
		<title type="html"><![CDATA[Swear Script picking up spaces in this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4269#p4269"><![CDATA[
The script seems overly complex for what its doing and I haven't got time to work out all of it. However this part jumps out at me.<br><blockquote class="uncited"><div>On 2002-02-02 14:51, VampireMan wrote:<br><br>   set saidtxt [lrange $rest 0 end]<br>   set said_txt [split $saidtxt]<br>   </div></blockquote>This is wrong. For starters you're using lrange on the string $rest. Secondly, there is never any point to use lrange $string 0 end - its a nullop (unless its used incorrectly as it is here). Type the character { on the channel on its own to see why this is bad (unmached open brace in list). Then you've got an incorretly formed list ($saidtext) which you're putting through split. Why you'd want to do this I don't know (you'd end up with a list within a list). Simply set said_txt [split $rest] should do.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Sat Feb 02, 2002 6:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-02-02T17:51:00-04:00</updated>

		<published>2002-02-02T17:51:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4268#p4268</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4268#p4268"/>
		<title type="html"><![CDATA[Swear Script picking up spaces in this script]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4268#p4268"><![CDATA[
Basicly we have written this swear script for our network , but the bot seems to pick up empty spaces as one of the keywords , it there a way round this ?<br><br>bind pubm - * censor<br><br>proc censor {nick host hand chan rest } {<br>   global botnick<br>   if { $nick == $botnick } {<br>      return 0<br>      }<br>   set badwords "test1 test2* etc* help"<br>   set saidtxt [lrange $rest 0 end]<br>   set bad_words [split $badwords]<br>   set said_txt [split $saidtxt]<br>   set runningA 1<br>   set detected 0<br>   set said_pos 0<br>   set badlength [llength $bad_words]<br>   set saidlength [llength $said_txt]<br>   while { $runningA == 1 } {<br>       set saidchk [lindex $said_txt $said_pos ]<br>       set slist [join [list $saidchk] ]<br>       set runningB 1<br>       set bad_pos 0<br>       while { $runningB == 1 } {<br>           set badchk [lindex $bad_words $bad_pos ]<br>           set blist [join [list $badchk ] ]<br>               if { [string match $blist $slist] } {<br>               set swearword $slist<br>               set runningA 0<br>               set runningB 0<br>               set detected 1<br>               }<br>               if { $bad_pos == $badlength } {<br>  set runningB 2<br>               } else {<br>                  incr bad_pos<br>               }<br>           }<br>       incr said_pos<br>       if { $said_pos == $saidlength } {<br>          set runningA 0<br>         }<br>     }<br>    if { $detected } {<br>      set cenlog [open ./censor/censor.log a+]<br>      puts $cenlog "$nick said $swearword on $chan [time] [date]"<br>      close $cenlog<br>        punish $nick $host $hand $chan<br>        }<br>   return 0<br>}<br><p>Statistics: Posted by Guest — Sat Feb 02, 2002 5:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
