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

	<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-04-26T02:16:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-04-26T02:16:38-04:00</updated>

		<published>2015-04-26T02:16:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103946#p103946</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103946#p103946"/>
		<title type="html"><![CDATA[Braces, brackets or backslash in the nicknames]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103946#p103946"><![CDATA[
I make a new post because the issue is to solve a portion of code that have been solved in other post.<br><br>In this <a href="http://forum.egghelp.org/viewtopic.php?p=61004" class="postlink">TCL</a>, for some reason the author decided to clean than nicks, the characters '{} [] \\'<br><br>For this purpose he used this process:<div class="codebox"><p>Code: </p><pre><code>proc charfilter {x {y ""} } {  for {set i 0} {$i &lt; [string length $x]} {incr i} {    switch -- [string index $x $i] {      "\"" {append y "\\\""}      "\\" {append y "\\\\"}      "\[" {append y "\\\["}      "\]" {append y "\\\]"}      "\}" {append y "\\\}"}      "\{" {append y "\\\{"}      default {append y [string index $x $i]}    }  }  return $y} </code></pre></div>When we add a nick with !addison command, the nick is added differently (if it contains braces, brackets or backslash).<br>Example.<blockquote class="uncited"><div>&lt;oper&gt; !addison {fosforito}<br>&lt;bot&gt; Done. Successfully added \{fosforito\}.</div></blockquote>Then when I want to remove that nick, bot tells me that is not found in the database.<blockquote class="uncited"><div>&lt;oper&gt; !delison {fosforito}<br>&lt;bot&gt; Nickname fosforito not found in the database!</div></blockquote>And if I try to remove the nick, the same way the bot added,the bot tells me that eliminated him, but in reality it does not eliminate the nick follows the archive database. <blockquote class="uncited"><div>&lt;oper&gt; !delison \{fosforito\}<br>&lt;bot&gt; Nickname {fosforito} erased from the database!</div></blockquote><blockquote class="uncited"><div>&lt;oper&gt;!list<br>&lt;bot&gt;Added in the database: \{fosforito\}</div></blockquote>I had a hard time understanding how this code, it may be because of my lack of experience.<br>Anyway, I could solve the other characters such as hyphens (-_-), but I could with whom I have discussed them.<div class="codebox"><p>Code: </p><pre><code>regsub -all "$who" $nicknames "" nicknames</code></pre></div>Anyone is encouraged to analyze the code and see if you can find a solution?<br><br>EDIT: Solved! see this <a href="http://forum.egghelp.org/viewtopic.php?t=19949" class="postlink">post.</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Sun Apr 26, 2015 2:16 am</p><hr />
]]></content>
	</entry>
	</feed>
