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

	<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>2008-12-09T12:38:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2008-12-09T12:38:18-04:00</updated>

		<published>2008-12-09T12:38:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86151#p86151</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86151#p86151"/>
		<title type="html"><![CDATA[annoy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86151#p86151"><![CDATA[
<blockquote class="uncited"><div>This test script works with all standard chars, even [ ] { }, but not with my language special  chars like ç, ñ, ¿, á ...etc<br><br>I guess what happens is what you said, but I don't know what  does it exactly mean, and if it can be fixed <blockquote class="uncited"><div>Maybe your channel code page is diffrent from bot code page, don't know.<br>I don't think so that can be because code page is wrong.</div></blockquote>I'm lost in Space  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"></div></blockquote>Sometimes problems with code page are rly crazy, I had once a problem with code page in one polish script with special polish UTF chars, but anyway<br><br>U want to allow only ASCII chars, like abcde ABCD etc etc, [] ! {} all without special language char?<br><br>U can always check letter ASCII code, if it is bigger than 127 then you know that is some other char, f.e. special language char.<br><br><a href="http://www.asciitable.com/" class="postlink">http://www.asciitable.com/</a><br><br>little code which can be helpful:<div class="codebox"><p>Code: </p><pre><code>set char "á"scan $char "%c" intputs $int</code></pre></div>This will return "225" (cause á code is 225) and this is biggerr than 127 then this is not "normal" char.<br><br>Or try to do this i normal way, find char unicode code or some other code page and test it.<br><br>Try it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Tue Dec 09, 2008 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Torrevado]]></name></author>
		<updated>2008-12-09T12:19:22-04:00</updated>

		<published>2008-12-09T12:19:22-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86150#p86150</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86150#p86150"/>
		<title type="html"><![CDATA[annoy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86150#p86150"><![CDATA[
This test script works with all standard chars, even [ ] { }, but not with my language special  chars like ç, ñ, ¿, á ...etc<br><br>I guess what happens is what you said, but I don't know what  does it exactly mean, and if it can be fixed <blockquote class="uncited"><div>Maybe your channel code page is diffrent from bot code page, don't know.<br>I don't think so that can be because code page is wrong.</div></blockquote>I'm lost in Space  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_cry.gif" width="15" height="15" alt=":cry:" title="Crying or Very sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8047">Torrevado</a> — Tue Dec 09, 2008 12:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2008-12-08T19:22:41-04:00</updated>

		<published>2008-12-08T19:22:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86137#p86137</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86137#p86137"/>
		<title type="html"><![CDATA[annoy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86137#p86137"><![CDATA[
hmm, its working for me:<div class="codebox"><p>Code: </p><pre><code>[tomekk@zonk]:/home/temp# ./test.tcl çpassed</code></pre></div>Maybe your channel code page is diffrent from bot code page, don't know. <br>I don't think so that can be because code page is wrong.<br><br>Write some simple script with one "if" and one special char like "ç" and test it.<br><br>like:<div class="codebox"><p>Code: </p><pre><code>bind pub - !test test_procproc test_proc {n u h c a} {      set char "ç"      if {$char == $a} {          putquick "PRIVMSG $c :working...."      }}</code></pre></div>and run "!test ç" (or some other special char, exept [ ] {} ! ? etc, use some language special char)<br><br>:&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Mon Dec 08, 2008 7:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Torrevado]]></name></author>
		<updated>2008-12-08T17:14:02-04:00</updated>

		<published>2008-12-08T17:14:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86136#p86136</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86136#p86136"/>
		<title type="html"><![CDATA[annoy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86136#p86136"><![CDATA[
Thanks, it fixed "[", "]", "{" and "}" chars, but nothing to do with others (¿ ¡ á é í ó ú ñ ...etc)  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8047">Torrevado</a> — Mon Dec 08, 2008 5:14 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2008-12-08T14:56:24-04:00</updated>

		<published>2008-12-08T14:56:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86135#p86135</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86135#p86135"/>
		<title type="html"><![CDATA[annoy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86135#p86135"><![CDATA[
what a long IF <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br><br>try to escape these two chars:<div class="codebox"><p>Code: </p><pre><code>($letter == "[") || ($letter == "]")</code></pre></div>this should be like this:<div class="codebox"><p>Code: </p><pre><code>($letter == "\[") || ($letter == "\]")</code></pre></div>:&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Mon Dec 08, 2008 2:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Torrevado]]></name></author>
		<updated>2008-12-08T13:24:25-04:00</updated>

		<published>2008-12-08T13:24:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=86134#p86134</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=86134#p86134"/>
		<title type="html"><![CDATA[annoy check]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=86134#p86134"><![CDATA[
Hi, I'm trying to modify channel protection script by gozzip. What I want is to add some chars like "annoying". I did it this way, but it doesn't work:<br><div class="codebox"><p>Code: </p><pre><code>if {($letter == "?") || ($letter == "!") || ($letter == "$") || ($letter == "_") || ($letter == "*") || ($letter == "%") || ($letter == "¿") || ($letter == "¡") || ($letter == "ñ") || ($letter == "á") || ($letter == "é") || ($letter == "í") || ($letter == "ó") || ($letter == "ú") || ($letter == "[") || ($letter == "]") || ($letter == "{") || ($letter == "}") || ($letter == "&lt;") || ($letter == "&gt;") || ($letter == "|") || ($letter == "ç") || ($letter == ".") || ($letter == "¨")} {incr annoy; incr total_annoy}</code></pre></div>Entire proccess (original one) is:<div class="codebox"><p>Code: </p><pre><code>set annoy_count(z:z) 0set annoy_triggered(z:z) 0##CHECK_ANNOYproc check_annoy {nick uhost hand chan text} { #load some global variables global chanpro annoy_count annoy_triggered botnick annoy_ban_type  #set the annoy variables set annoy 0 set total_annoy 0 set triggered 0  #check if annoy-check is disabled, if so - return if {!$chanpro(annoy)} {return 0} #check if other bot is actually typing the word &lt;- Added to fix bugs if {[matchattr $hand +b]} {return 0} #check each char with a loop foreach word [split $text] {     foreach letter [split $word ""] {       if {($letter == "?") || ($letter == "!") || ($letter == "$") || ($letter == "_") || ($letter == "*") || ($letter == "%")} {incr annoy; incr total_annoy}    }        #checks if the length of the annoy is huge enough    if {$annoy &gt;= $chanpro(annoy_length)} {break} {set annoy 0} }  #set some vars again set total_string [expr [string length $text] - [regsub -all -- " " $text * *]] set percent [expr $total_annoy.0 / $total_string * 100] #check if the annoy was big enough if {$annoy &gt;= $chanpro(annoy_length)} {    set triggered 1 }  #check if the percentage was big enough, and string was long enough to count if {$total_string &gt;= $chanpro(annoy_minimum) &amp;&amp; $percent &gt;= $chanpro(annoy_percent)} {    set triggered 1 }  #check if we got a trigger if {!$triggered} {    return 0 } ##now, proceed to the actual actions the bot will take ##create a timer for the violation, kick/ban..    #checks if the user is an op, if so check if protect_ops is enabled if {([matchattr $hand o|o $chan] || [isop $nick $chan]) &amp;&amp; $chanpro(protect_ops)} {    putserv "[subst $chanpro(op_method)] :[subst $chanpro(op_annoy)]"    return 0 }  #check if the dude has triggered before if {![info exists annoy_count($uhost:$chan)]} {    set annoy_count($uhost:$chan) 0 }    #increase the variable thar tracks number of offences incr annoy_count($uhost:$chan)    #check if we allready have a timer set, and kill it if so (prevent error msgs and bad timers) if {[info exists annoy_triggered($uhost:$chan)]} {killtimer $annoy_triggered($uhost:$chan); list unset annoy_triggered($uhost:$chan)}    #set our timer, bound to a variable.. set annoy_triggered($uhost:$chan) [timer $chanpro(remember) [list unset annoy_count($uhost:$chan)]] timer $chanpro(remember) [list unset annoy_triggered($uhost:$chan)]    #check what offencenr this was, and act from it if {$annoy_count($uhost:$chan) == 1} {putserv "[subst $chanpro(warning_method)] :[subst $chanpro(warn_annoy)]"} if {$annoy_count($uhost:$chan) == 2} {putserv "KICK $chan $nick :[subst $chanpro(kick_annoy)]"} if {$annoy_count($uhost:$chan) == 3} {    set bmask [annoy:masktype $nick!$uhost $annoy_ban_type]    newchanban $chan $bmask $botnick [subst $chanpro(ban_annoy)] $chanpro(ban_time_annoy)    putserv "KICK $chan $nick :[subst $chanpro(ban_annoy)]"    set annoy_count($uhost:$chan) 2    putloglev o * "*** Kickban $nick from $chan for doing $chanpro(ban_annoy)" }} ;#end proc</code></pre></div>Thanks <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=8047">Torrevado</a> — Mon Dec 08, 2008 1:24 pm</p><hr />
]]></content>
	</entry>
	</feed>
