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

	<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>2007-01-29T05:27:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Craig]]></name></author>
		<updated>2007-01-29T05:27:01-04:00</updated>

		<published>2007-01-29T05:27:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=70046#p70046</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=70046#p70046"/>
		<title type="html"><![CDATA[bigbadword tcl :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=70046#p70046"><![CDATA[
ok thanks and other<br><div class="codebox"><p>Code: </p><pre><code>set triggerchar "!" ### Thanks to ppslim for this filter ### proc swear:filter {str} { #   regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str    regsub -all -nocase {[^a-z,0-9@:/\s\|]} $str "" str    return $str } proc swear:filter2 {str} { #   regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str    regsub -all -nocase {[^a-z,0-9*?@:/\s\|]} $str "" str    return $str }bind pubm - "* *" badword:pubm:check #####here starts the script###### ####Procedure that puts a new line in the file of triggers for the channel where the trigger was written bind pub - !badword pub:Badwordproc pub:Badword { nick uhost handle chan arg } { set BadWordType [lindex $arg 0]putlog "$BadWordType"if { $BadWordType != "add" &amp;&amp; $BadWordType != "del" &amp;&amp; $BadWordType != "list" } {puthelp "NOTICE $nick : :error: Failed to edit trigger, use add, del or list. ex.: !badwords add *kurv* 6 ..."return 0}## if { $chan = "#eMule-Polish-Chat" &amp;&amp; ![isop $nick $chan] } {##puthelp "Notice $nick : Please, rehalfop/op yourself to edit BadWord list."##return 0## }## if { $chan = "#eMule-Help" &amp;&amp; ![ishalfop $nick $chan] &amp;&amp; ![isop $nick $chan] } {##puthelp "Notice $nick : Please, rehalfop/op yourself to edit BadWord list."##return 0## }if { $BadWordType == "add" } {set file "[string trimleft $chan #]_badwords.txt" set write [open $file a] set word [lindex $arg 1]set type [lindex $arg 2]putlog "The word $word and the level $type. :D"set reason [lindex $arg 3 end] if { $type != "1" &amp;&amp; $type != "2" &amp;&amp; $type != "3" &amp;&amp; $type != "4" &amp;&amp; $type != "5" &amp;&amp; $type != "6" &amp;&amp; $type != "7" &amp;&amp; $type != "8" } {puthelp "NOTICE $nick error: Invaild level type. Try with, 1, 2, 3, 4, 5 or 6."close $writereturn 0}if { $word == "" || $type == "" || $reason == "" } {puthelp "NOTICE $nick Ooops? You lost something?!"close $write return 0 } puts $write "$word#$reasonź$type" close $write putserv "NOTICE $nick :$word should be added to BadWord list for $chan with level $type." ## The End of procedure##} elseif { $BadWordType == "del" } {######################################################################################################set file [string trimleft $chan #]_badwords.txt set tempfile [string trimleft $chan #].badwords.bak set readfirst [open $file r] set linenumb 0 set count 0 set badword [lindex $arg 1]putquick "NOTICE $nick :Start: Removing badword from list." while { ![eof $readfirst] } { gets $readfirst line set helpwanted [string range $line 0 [expr [string first # $line]-1]] if { $badword != $helpwanted } { if { $linenumb==0 } { set writetemp [open $tempfile w] puts $writetemp $line close $writetemp incr linenumb } else { set writetemp [open $tempfile a] puts $writetemp $line close $writetemp incr linenumb }} else {incr count putquick "NOTICE $nick :($count):!addbadword $helpwanted [string range $line [expr [string first # $line]+1] end]" } }close $readfirst set readfirst2 [open $tempfile r] set linenumb2 0 while { ![eof $readfirst2] } { gets $readfirst2 line if { [string first # $line] != -1 } { if { $linenumb2==0 } { set writetemp [open $file w] puts $writetemp $line close $writetemp incr linenumb2 } else { set writetemp [open $file a] puts $writetemp $line close $writetemp } } } if { $linenumb2==0 } { set writetemp [open $file w] close $writetemp }    close $readfirst2 putserv "NOTICE $nick :End: BadWord should be deleted."       #########################################################      #########################################################} elseif { $BadWordType == "list" } {set read [open [string trimleft $chan #]_badwords.txt r]set text ""while { ![eof $read] } {gets $read lineset text "$text [lindex [split $line #] 0]"}close $readset finish [string range $text 1 [expr [string length $text]-2]]set long [split $finish]if { [llength $long] &gt; 30 } {for { set c 0} { $c&lt;[llength $long] } { incr c 30 } {if { $c==0 } {putserv "Notice $nick : BadWord List: 4[lrange $long $c [expr $c+29]]"} else {putserv "NOTICE $nick : 4[lrange $long $c [expr $c+29]]"}}} else {putserv "NOTICE $nick :4$finish"puthelp "NOTICE $nick :End of BadWords. "}}}bind pub - !addexcept badword:pub:except proc badword:pub:except { nick uhost handle chan arg } {    if { [isop $nick $chan] || [ishalfop $nick $chan] } {       set dsfile "excepts_[string trimleft $chan #]_badwords.txt"       set dswrite [open $dsfile a]       set dsword [lindex $arg 0]       puts $dswrite "$dsword#"       close $dswrite       putquick "NOTICE $nick : Slowo $dsword zostało dodane do listy złych słów kanału $chan."    } } ####Procedure that shows in the chan the text or the action associated with the trigger written in the channel proc badword:pubm:check {nick uhost handle chan arg} { global triggerchar dontdoit## if { [isop $nick $chan] || [ishalfop $nick $chan] || [isvoice $nick $chan] } { ##putlog "used isop/hop/vop"##return 0 ## } if {[string match "*@eMule-Polish.MindForge.org" $uhost]} {  putlog "is hosted" return 0 }if { ![file exists [string trimleft $chan #]_badwords.txt] } {return 0}set input [swear:filter2 $arg]set readbw [open [string trimleft $chan #]_badwords.txt r] while { ![eof $readbw] } {  putlog "i do something"gets $readbw line set helpwanted [string range $line 0 [expr [string first # $line]-1]] set message [string range $line [expr [string first # $line]+1] [expr [string first ź $line]-1]] set typeof  [string range $line [expr [string first ź $line]+1] end] if { ([string match -nocase "* $helpwanted *" $input] == 1 &amp;&amp; $helpwanted != "") || ([string match -nocase "$helpwanted" $input] == 1 &amp;&amp; $helpwanted != "") } {if { ![onchan eedupa #eMule-Help] &amp;&amp; $typeof == 7 } { BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}## if { ![onchan "[eMule]" #eMule-Polish] &amp;&amp; $typeof == 6 } { ##BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $input##return 0## }if { $typeof == 4 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}if { $typeof == 3 || $typeof == 2 } {if { [file exists excepts_[string trimleft $chan #]_badwords.txt] } {set read [open excepts_[string trimleft $chan #]_badwords.txt r]while { ![eof $read] } {  gets $read line set searchword [string range $line 0 [expr [string first # $line]-1]]if { ([string match -nocase "* $searchword *" $input] == 1 &amp;&amp; $searchword != "") || ([string match -nocase "$searchword" $input] == 1 &amp;&amp; $searchword != "") } {putlog "Szukam innego chaczy"return 0} else {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}close $read} else {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}if { $typeof == 8 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}if { $typeof == 1 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}if { $typeof == 5 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}}}proc next { nick uhost chan arg helpwanted message typeof input } {if { $typeof == 3 || $typeof == 2 } {if { [file exists excepts_[string trimleft $chan #]_badwords.txt] } {set read [open excepts_[string trimleft $chan #]_badwords.txt r]while { ![eof $read] } {  gets $read line set searchword [string range $line 0 [expr [string first # $line]-1]]if { ([string match -nocase "* $searchword *" $input] == 1 &amp;&amp; $searchword != "") || ([string match -nocase "$searchword" $input] == 1 &amp;&amp; $searchword != "") } {putlog "Szukam innego chaczy"return 0} else {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}close $read} else {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}if { $typeof == 8 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}if { $typeof == 1 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}if { $typeof == 5 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}proc BadWordKick { nick uhost chan arg helpwanted message typeof input } {global BadwordWarn        set whost *!*@[lindex [split $uhost "@"] end]             ##### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #####    # 1. Warez bez wyjątków.//////    # 2. Offtopic z wyjątkiem.///////    # 3. Linki z wyjątkiem.-/+    # 4. Linki bez wyjątku.-......///////    # 5. Offtopic bez wyjątku.    # 6. W zastepwswie za [eMule]-.......////////    # 7. Za badx-.........//////    # 8. bejsbol-/////    #### ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #####    ###### Warez bez wyjaatkow    if {$typeof == 1} {                if {![info exists BadwordWarn($uhost)]} {                   putserv "PRIVMSG $chan : $nick NoWarez: Na kanale obowiazuje zakaz podawania nazw gier, filmow, plikow objetych prawem autorskim."                   putserv "NOTICE $nick : $nick: Jesli chcesz znalesc dany plik wejdz w emule\/zakladka szukaj i wpisz jego nazwe. Nastepnie zaznacz ten ktory ma najwieksza dostepnosc zrodel (metoda szukania - serwer globalny badz kad)"  putserv "NOTICE $nick : $nick: Możesz również wejśc na kanał ogólnotematyczny i tam poszukac odpowiedzi na twoje pytanie. Aby tam wejść wpisz: /join #eMule-Polish-chat Pamiętaj aby przez join nie stawiać spacji !"                  set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }             } elseif {$typeof == 2} {     ###### Offtopic z wyjatkiem               if {![info exists BadwordWarn($uhost)]} {                   putserv "PRIVMSG $chan : $nick kanał #eMule-Polish przeznaczony jest tylko do rozmów na temat eMule! Jeśli chcesz porozmawiać na inne tematy wejdź na -Chat."   putserv "NOTICE $nick : $nick: Aby tam wejść wpisz: /join #eMule-Polish-Chat Pamiętaj aby między / nie stawiać żadnej spacji!"                  set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }             } elseif {$typeof == 3} {     ###### Linki z wyjatkiem               if {![info exists BadwordWarn($uhost)] || $BadwordWarn($uhost) == 1} {                  putquick "KICK $chan $nick $message ($helpwanted) "   set BadwordWarn($uhost) 2                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)              }       } elseif {$typeof == 4} {      ##### Linki bez wyjatku (ftp)               if {![info exists BadwordWarn($uhost)] || $BadwordWarn($uhost) == 1} {                  putquick "KICK $chan $nick $message ($helpwanted) "   set BadwordWarn($uhost) 2                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)              }       } elseif {$typeof == 5} {      ##### Offtopic bez wyjatku               if {![info exists BadwordWarn($uhost)]} {                   putserv "PRIVMSG $chan : $nick kanał #eMule-Polish przeznaczony jest tylko do rozmów na temat eMule! Jeśli chcesz porozmawiać na inne tematy wejdź na -Chat."   putserv "NOTICE $nick : $nick: Aby tam wejść wpisz: /join #eMule-Polish-Chat Pamiętaj aby między / nie stawiać żadnej spacji!"                  set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }       } elseif {$typeof == 6} {      #### w zastepstwie za [emule]               if {![info exists BadwordWarn($uhost)] || $BadwordWarn($uhost) == 1} {                  putquick "KICK $chan $nick $message ($helpwanted) "   set BadwordWarn($uhost) 2                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)              }        } elseif {$typeof == 7} {       #### w zastepstwie za badx               if {![info exists BadwordWarn($uhost)] || $BadwordWarn($uhost) == 1} {                  putquick "KICK $chan $nick $message ($helpwanted) "   set BadwordWarn($uhost) 2                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)              }      } elseif {$typeof == 8} {      ####bejsbol        if {![info exists BadwordWarn($uhost)]} {                   putserv "PRIVMSG $chan : $nick Nie wolno tu walić bejsbolem!"   putserv "NOTICE $nick : $nick: Aby tam wejść wpisz: /join #eMule-Polish-Chat Pamiętaj aby między / nie stawiać żadnej spacji!"                  set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }        }}</code></pre></div>in pubm:check betwen if $typeof == 2 | 3 .. }<br>how to do it compare found badword with except list?<br>Like in badword list is added *http://*<br>In except list *lol*<br>Someone says: blabla bla <a href="http://lol/" class="postlink">http://lol/</a> bla bla <a href="http://sss/" class="postlink">http://sss/</a><br><br>it compare <a href="http://lol/" class="postlink">http://lol/</a> with except list, if except word was in that then it search for another badwords,<br>it found <a href="http://sss/" class="postlink">http://sss/</a> and comparing, it was not excepted, then go to BadWordKick blabla<br>search for other badwords with typeof 2 3, no one found then search for typeof 8 1 5<br><br>if you dont understand just say i will try to explain it other method -.-<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7403">Craig</a> — Mon Jan 29, 2007 5:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-11-05T15:35:50-04:00</updated>

		<published>2006-11-05T15:35:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67760#p67760</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67760#p67760"/>
		<title type="html"><![CDATA[bigbadword tcl :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67760#p67760"><![CDATA[
Basically, you close your proc-body too early with one } too many in your nested if-statements, while constructing the body of BadWordKick.<br><br>My guess is just above <div class="codebox"><p>Code: </p><pre><code>} elseif {$typeof == 4} {</code></pre></div>Solution? Go through that proc, keep track of { and }, and make sure there's always atleast one more { than } until the end of the proc...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Nov 05, 2006 3:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Craig]]></name></author>
		<updated>2006-11-05T14:27:32-04:00</updated>

		<published>2006-11-05T14:27:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67755#p67755</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67755#p67755"/>
		<title type="html"><![CDATA[bigbadword tcl :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67755#p67755"><![CDATA[
[19:15] Tcl error in file 'eggdrop.conf':<br>[19:15] wrong # args: should be "proc name args body"<br>    while executing<br>"proc BadWordKick { nick uhost chan arg helpwanted message typeof input } {<br>        global BadwordWarn<br>        set whost *!*@[lindex [split $uhost "@"] end]<br>..."<br>    (file "scripts/boom.tcl" line 197)<br>    invoked from within<br>"source scripts/boom.tcl"<br>    (file "eggdrop.conf" line 187)<br>[19:15] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7403">Craig</a> — Sun Nov 05, 2006 2:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[metroid]]></name></author>
		<updated>2006-11-05T14:18:15-04:00</updated>

		<published>2006-11-05T14:18:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67754#p67754</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67754#p67754"/>
		<title type="html"><![CDATA[bigbadword tcl :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67754#p67754"><![CDATA[
Supply a proper errormessage first.<br><blockquote class="uncited"><div> "wrong args should be.. blablabla" </div></blockquote>Doesn't actually help anyone <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5078">metroid</a> — Sun Nov 05, 2006 2:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Craig]]></name></author>
		<updated>2006-11-05T14:16:44-04:00</updated>

		<published>2006-11-05T14:16:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67752#p67752</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67752#p67752"/>
		<title type="html"><![CDATA[bigbadword tcl :P]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67752#p67752"><![CDATA[
hey. I need help. I've got something wrong in this script.. it says me "wrong args should be.. blablabla"<br><br>here is script:<div class="codebox"><p>Code: </p><pre><code>set triggerchar "!" ### Thanks to ppslim for this filter ### proc swear:filter {str} { #   regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str    regsub -all -nocase {[^a-z,0-9@:/\s\|]} $str "" str    return $str } proc swear:filter2 {str} { #   regsub -all -- {\003[0-9]{0,2}(,[0-9]{0,2})?|\017|\037|\002|\026|\006|\007} $str "" str    regsub -all -nocase {[^a-z,0-9*?@:/\s\|]} $str "" str    return $str }bind pubm - "* *" badword:pubm:check #####here starts the script###### ####Procedure that puts a new line in the file of triggers for the channel where the trigger was written bind pub - !addwword badword:pub:add proc badword:pub:add { nick uhost handle chan arg } { if { [isop $nick $chan] || [ishalfop $nick $chan] } { set file "[string trimleft $chan #]_badwords.txt" set write [open $file a] set word [lindex $arg 0]set type [lindex $arg 1] set reason [lindex $arg 2 end] if { $type != "1" &amp;&amp; $type != "2" &amp;&amp; $type != "3" &amp;&amp; $type != "4" &amp;&amp; $type != "5" &amp;&amp; $type != "6" } {puthelp "NOTICE $nick error: Invaild level type. Try with, 1, 2, 3, 11, 21 or 31."close $writereturn 0}if { $word == "" || $type == "" || $reason == "" } { close $write return 0 } puts $write "$word#$reasonź$type" close $write putquick "NOTICE $nick :$word added to BadWord list for $chan with level $type." } } bind pub - !addexcept badword:pub:except proc badword:pub:except { nick uhost handle chan arg } {    if { [isop $nick $chan] || [ishalfop $nick $chan] } {       set dsfile "excepts_[string trimleft $chan #]_badwords.txt"       set dswrite [open $dsfile a]       set dsword [swear:filter2 $arg]       puts $dswrite "$dsword#"       close $dswrite       putquick "NOTICE $nick : Slowo $dsword zostało dodane do listy złych słów kanału $chan."    } } ####This procedure will be in charge of removing triggers for the chan where the command was written. bind pub - !remwword badword:pub:rem proc badword:pub:rem { nick uhost handle chan badword } {     if { $chan != "#emulsfgsfe-help" } {    if { [isop $nick $chan] || [ishalfop $nick $chan ] } {       set file [string trimleft $chan #]_badwords.txt       set tempfile emule-polish_badwords.bak       set readfirst [open $file r]       set linenumb 0       set count 0       putquick "NOTICE $nick :Start: Usuwanie złego słowa."       while { ![eof $readfirst] } {          gets $readfirst line          set helpwanted [string range $line 0 [expr [string first # $line]-1]]          if { $badword != $helpwanted } {             if { $linenumb==0 } {                set writetemp [open $tempfile w]                puts $writetemp $line                close $writetemp                incr linenumb             } else {                set writetemp [open $tempfile a]                puts $writetemp $line                close $writetemp                incr linenumb             }          } else {             incr count             putquick "NOTICE $nick :($count):!addbadword $helpwanted [string range $line [expr [string first # $line]+1] end]"          }       }       close $readfirst       set readfirst2 [open $tempfile r]       set linenumb2 0       while { ![eof $readfirst2] } {          gets $readfirst2 line          if { [string first # $line] != -1 } {             if { $linenumb2==0 } {                set writetemp [open $file w]                puts $writetemp $line                close $writetemp                incr linenumb2             } else {                set writetemp [open $file a]                puts $writetemp $line                close $writetemp             }          }       }       if { $linenumb2==0 } {          set writetemp [open $file w]          close $writetemp       }          close $readfirst2       putquick "NOTICE $nick :End: Usunięto złe słowo."    }     } }        ####Procedure that will get all the triggers from the file and present them to the user who asked for the list of possible commands for the chan. bind pub - !listwword badword:pub:list proc badword:pub:list { nick uhost handle chan badword } {     if { $chan != "#emule-fsgsdfhelp" } {    if { [isop $nick $chan] || [ishalfop $nick $chan ] } {       set read [open [string trimleft $chan #]_badwords.txt r]       set text ""       while { ![eof $read] } {          gets $read line          set text "$text [lindex [split $line #] 0]"       }       close $read       set finish [string range $text 1 [expr [string length $text]-2]]       set long [split $finish]       if { [llength $long] &gt; 30 } {          for { set c 0} { $c&lt;[llength $long] } { incr c 30 } {             if { $c==0 } {                putquick "NOTICE $nick : Złe słowa kanału $chan: 4[lrange $long $c [expr $c+29]]"             } else {                putquick "NOTICE $nick : 4[lrange $long $c [expr $c+29]]"             }          }       } else {          putquick "NOTICE $nick : Lista złych słów: 4$finish"       }    }     } }    ####Procedure that shows in the chan the text or the action associated with the trigger written in the channel proc badword:pubm:check {nick uhost handle chan arg} { global triggercharif { [isop $nick $chan] || [ishalfop $nick $chan] || [isvoice $nick $chan] } { putlog "used isop/hop/vop"return 0 } if {[string match "*@eMule-Polish.MindForge.org" $uhost]} {  putlog "is hosted" return 0 }if { ![file exists [string trimleft $chan #]_badwords.txt] } {return 0}set input "[swear:filter $arg]"set readbw [open [string trimleft $chan #]_badwords.txt r] while { ![eof $readbw] } {  putlog "i do something"gets $readbw line set helpwanted [string range $line 0 [expr [string first # $line]-1]] set message [string range $line [expr [string first # $line]+1] [expr [string first ź $line]-1]] set typeof  [string range $line [expr [string first ź $line]+1] end] if { ([string match -nocase "* $helpwanted *" $input] == 1 &amp;&amp; $helpwanted != "") || ([string match -nocase "$helpwanted" $input] == 1 &amp;&amp; $helpwanted != "") } {if { $typeof == 4 || $typeof == 5 || $typeof == 6 } {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputputlog "odeslalem"close $readbwreturn 0} else {if { [file exists excepts_[string trimleft $chan #]_badwords.txt] } {set read [open excepts_[string trimleft $chan #]_badwords.txt r]while { ![eof $read] } {  gets $read line set searchword [string range $line 0 [expr [string first # $line]-1]]if { ([string match -nocase "* $searchword *" $input] == 1 &amp;&amp; $searchword != "") || ([string match -nocase "$searchword" $input] == 1 &amp;&amp; $searchword != "") } {return 0} else {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}close $read} else {BadWordKick $nick $uhost $chan $arg $helpwanted $message $typeof $inputreturn 0}}}}}proc BadWordKick { nick uhost chan arg helpwanted message typeof input } {global BadwordWarn        set whost *!*@[lindex [split $uhost "@"] end]             if {$typeof == 1} {                if {![info exists BadwordWarn($uhost)]} {                   putquick "PRIVMSG $chan : $nick No Warez : Na kanale obowiazuje zakaz podawania nazw gier, filmow, plikow objetych prawem autorskim."                   putquick "NOTICE $nick : $nick: Leż na #chat Jesli chcesz znalesc dany plik wejdz w emule/zakladka szukaj i wpisz jego nazwe. Nastepnie zaznacz ten ktory ma najwieksza dostepnosc zrodel (metoda szukania - serwer globalny badz kad)"                   set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }             } elseif {$typeof == 2} {                if {![info exists BadwordWarn($uhost)]} {                   putquick "PRIVMSG $chan : $nick Wypierdalaj na #emule-polish-chat :PPP"                   putquick "NOTICE $nick : $nick: rozumiemy sie?!!"                   set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }             } elseif {$typeof == 3} {                if {![info exists BadwordWarn($uhost)] || $BadwordWarn($uhost) == 1} {                  putquick "KICK $chan $nick $message ($helpwanted) "   set BadwordWarn($uhost) 2                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                   }                }       } elseif {$typeof == 4} {       if {![info exists BadwordWarn($uhost)]} {                   putquick "PRIVMSG $chan : $nick No Warez : Na kanale obowiazuje zakaz podawania nazw gier, filmow, plikow objetych prawem autorskim."                   putquick "NOTICE $nick : $nick: Leż na #chat Jesli chcesz znalesc dany plik wejdz w emule/zakladka szukaj i wpisz jego nazwe. Nastepnie zaznacz ten ktory ma najwieksza dostepnosc zrodel (metoda szukania - serwer globalny badz kad)"                   set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }       } elseif {$typeof == 5} {       if {![info exists BadwordWarn($uhost)]} {                   putquick "PRIVMSG $chan : $nick Wypierdalaj na #emule-polish-chat :PPP"                   putquick "NOTICE $nick : $nick: rozumiemy sie?!!"                   set BadwordWarn($uhost) 1                } elseif {$BadwordWarn($uhost) == 1} {                   set BadwordWarn($uhost) 2                   putquick "KICK $chan $nick $message ($helpwanted) "                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }      } elseif {$typeof == 6} {               if {![info exists BadwordWarn($uhost)] || $BadwordWarn($uhost) == 1} {                  putquick "KICK $chan $nick $message ($helpwanted) "   set BadwordWarn($uhost) 2                } elseif {$BadwordWarn($uhost) == 2} {                   putquick "MODE $chan +b $whost"                   putquick "KICK $chan $nick $message ($helpwanted) "                   unset BadwordWarn($uhost)                }}</code></pre></div>can someone correct it for me ? THANKS ...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7403">Craig</a> — Sun Nov 05, 2006 2:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
