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

	<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>2015-05-16T01:56:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-16T01:56:42-04:00</updated>

		<published>2015-05-16T01:56:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104103#p104103</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104103#p104103"/>
		<title type="html"><![CDATA[string match spanish accents]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104103#p104103"><![CDATA[
I have fixed thanks to <strong class="text-strong">SpiKe^^</strong><br><div class="codebox"><p>Code: </p><pre><code>proc who_emit {nick uhost hand chan text} {global radiocanal nombreradio counfif {$chan != "$radiocanal"} {return 0}set who1 "Quien emite?"set who2 "Quien está emitiendo?"set who3 "Quien esta de dj?"set whof "?"if {(([lsearch -exact -ascii -nocase [lindex [split $text] 0 end] [lindex [split $who1] 0 end]] != -1) &amp;&amp; ([llength [split $text]] == 2) \&amp;&amp; ([string index $text end] == "$whof")) \|| (([lsearch -exact -ascii -nocase [lindex [split $text] 0 end] [lindex [split $who2] 0 end]] != -1) &amp;&amp; ([llength [split $text]] == 3) \&amp;&amp; ([string index $text end] == "$whof")) \|| (([lsearch -exact -ascii -nocase [lindex [split $text] 0 end] [lindex [split $who3] 0 end]] != -1) &amp;&amp; ([llength [split $text]] == 4) &amp;&amp; ([string index $text end] == "$whof")) } { if {[file exists dj]} {    set temp [open "dj" r]    set dj [gets $temp]set dj [lindex $dj 0]    close $temp}putmsg $chan [encoding convertfrom utf-8 "Our current DJ is $dj"}}</code></pre></div>The code is not case sensitive:<div class="codebox"><p>Code: </p><pre><code>-nocase</code></pre></div>I added a counter along the string, so I did not take as correct portions thereof:<div class="codebox"><p>Code: </p><pre><code>[llength [split $text]] ==</code></pre></div>I also added that work if the text has a question mark at the end, not to take any text expression but leads that sign.<div class="codebox"><p>Code: </p><pre><code>set whof "?" </code></pre></div>To make the text matched with Spanish accents, I used:<div class="codebox"><p>Code: </p><pre><code>-ascii</code></pre></div>In this example, the current DJ database is:<div class="codebox"><p>Code: </p><pre><code>[file exists dj]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sat May 16, 2015 1:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-05-10T08:16:28-04:00</updated>

		<published>2015-05-10T08:16:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104054#p104054</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104054#p104054"/>
		<title type="html"><![CDATA[string match spanish accents]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104054#p104054"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>bind pubm - * who_emitproc who_emit {nick uhost hand chan text} {global djif {($text eq "Quien esta emitiendo?") || ([string match "Quien está emitiendo?" $text]) {putmsg $chan "Emite Dj $dj"}}</code></pre></div>Not match the second condition for the accent "á" <blockquote class="uncited"><div>&lt;user&gt; Quien esta emitiendo?<br>&lt;bot&gt; Emite Dj Roger<br>&lt;user&gt; Quien está emitiendo?</div></blockquote>Besides accents, you can be fixed to coincide with additional question marks?<br>ie:<br>Quien está emitiendo??<br>or<br>Quien está emitiendo?????<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sun May 10, 2015 8:16 am</p><hr />
]]></content>
	</entry>
	</feed>
