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

	<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>2014-07-15T04:12:40-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Fire-Fox]]></name></author>
		<updated>2014-07-15T04:12:40-04:00</updated>

		<published>2014-07-15T04:12:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103004#p103004</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103004#p103004"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103004#p103004"><![CDATA[
Ahh 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=8230">Fire-Fox</a> — Tue Jul 15, 2014 4:12 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2014-07-15T03:30:18-04:00</updated>

		<published>2014-07-15T03:30:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103003#p103003</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103003#p103003"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103003#p103003"><![CDATA[
The:<div class="codebox"><p>Code: </p><pre><code>  ::mysql::endquery $con  ::mysql::close $con </code></pre></div>need to be moved one section down cos as are right now are in the else section.<br><br>Also, you can replace the first query with the second one that you should remove entirely.<div class="codebox"><p>Code: </p><pre><code>bind pub -|- !info infolistproc infolist {nick uhost handle chan text} {if {![channel get $chan infoList]} returnvariable dbInfoif {[scan $dbInfo %s%s%s%s hostname username password database] != 4} return       set con [::mysql::connect -host $hostname -user $username -password $password -db $database]set query [::mysql::query $con "SELECT info FROM infos ORDER BY info"]if {[::mysql::fetch $query]==""} {putquick "PRIVMSG $chan : \0034Nothing found! :-(\003"  } else {::mysql::map $query { info } {putquick "PRIVMSG $chan :\0037INFO\003: \0039$info\003"}}::mysql::endquery $con::mysql::close $con}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jul 15, 2014 3:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fire-Fox]]></name></author>
		<updated>2014-07-14T19:23:25-04:00</updated>

		<published>2014-07-14T19:23:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=103001#p103001</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=103001#p103001"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=103001#p103001"><![CDATA[
Here is the working version<br><div class="codebox"><p>Code: </p><pre><code>bind pub -|- !info infolistproc infolist {nick uhost handle chan text} {   if {![channel get $chan infoList]} return   variable dbInfo  if {[scan $dbInfo %s%s%s%s hostname username password database] != 4} return          set con [::mysql::connect -host $hostname -user $username -password $password -db $database]  set query [::mysql::query $con "SELECT info FROM infos"]  if {[::mysql::fetch $query]==""} {        putquick "PRIVMSG $chan : \0034Nothing found! :-(\003"  } else {        set query [::mysql::query $con "SELECT info FROM infos ORDER BY info"]        ::mysql::map $query { info } {        putquick "PRIVMSG $chan :\0037INFO\003: \0039$info\003"  }  ::mysql::endquery $con  ::mysql::close $con}  }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8230">Fire-Fox</a> — Mon Jul 14, 2014 7:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2014-07-14T14:23:47-04:00</updated>

		<published>2014-07-14T14:23:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102999#p102999</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102999#p102999"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102999#p102999"><![CDATA[
There's no need to escape your dbInfo variable cos that's considered safe so no need to sanitize it but rather the user input.<br><br>The error clearly states where's the problem and SpiKe^^ highlighted that in his first post.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jul 14, 2014 2:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fire-Fox]]></name></author>
		<updated>2014-07-14T06:22:10-04:00</updated>

		<published>2014-07-14T06:22:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102997#p102997</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102997#p102997"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102997#p102997"><![CDATA[
What will give me my login to the database <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"> <br><br>I'll post my setup when i get it to work <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=8230">Fire-Fox</a> — Mon Jul 14, 2014 6:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2014-07-13T17:19:24-04:00</updated>

		<published>2014-07-13T17:19:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102996#p102996</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102996#p102996"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102996#p102996"><![CDATA[
Exactly what information are you trying to send to the <strong class="text-strong">::mysql::escape</strong> proc?<br>I'm sure it's not the contents of <strong class="text-strong">$info</strong> because that variable does not exist yet.<br><br>Maybe you mean something more like...<div class="codebox"><p>Code: </p><pre><code>   set info [::mysql::escape $dbInfo]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Jul 13, 2014 5:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fire-Fox]]></name></author>
		<updated>2014-07-13T14:07:24-04:00</updated>

		<published>2014-07-13T14:07:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102995#p102995</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102995#p102995"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102995#p102995"><![CDATA[
Hey!<br><br>I have tried to put various places but havn't worked yet<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8230">Fire-Fox</a> — Sun Jul 13, 2014 2:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2014-07-13T12:21:07-04:00</updated>

		<published>2014-07-13T12:21:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102994#p102994</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102994#p102994"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102994#p102994"><![CDATA[
Believe this would be the problem line...<div class="codebox"><p>Code: </p><pre><code>   set info [::mysql::escape $info]</code></pre></div>You are trying to read <strong class="text-strong">$info</strong> before it exists.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Sun Jul 13, 2014 12:21 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Fire-Fox]]></name></author>
		<updated>2014-07-14T19:24:02-04:00</updated>

		<published>2014-07-13T08:52:12-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=102993#p102993</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=102993#p102993"/>
		<title type="html"><![CDATA[[SOLVED]What is wrong here]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=102993#p102993"><![CDATA[
can't read "info": no such variable<br><div class="codebox"><p>Code: </p><pre><code>proc infoDel {nick uhost handle chan text} {     if {![channel get $chan infoDel]} return    variable dbInfo    if {[scan $dbInfo %s%s%s%s hostname username password database] != 4} return          set info [::mysql::escape $info]   set con [::mysql::connect -host $hostname -user $username -password $password -db $database]    set query [::mysql::query $con "SELECT info FROM info WHERE info = '$info'"]    if {[::mysql::fetch $query]==""} {   putquick "PRIVMSG $chan : Nothing found"   } else {   set query [::mysql::query $con "SELECT info FROM info WHERE info = '$info'"]   putquick "PRIVMSG $chan :Info list $info"   }   ::mysql::endquery $con    ::mysql::close $con }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8230">Fire-Fox</a> — Sun Jul 13, 2014 8:52 am</p><hr />
]]></content>
	</entry>
	</feed>
