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

	<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>2018-05-17T11:40:31-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2018-01-29T06:57:52-04:00</updated>

		<published>2018-01-29T06:57:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106626#p106626</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106626#p106626"/>
		<title type="html"><![CDATA[Data Output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106626#p106626"><![CDATA[
Sorry for the late answer. You can achieve this directly from the select with:<div class="codebox"><p>Code: </p><pre><code>SELECT owner, group_concat(botname) AS bots FROM bots GROUP BY owner</code></pre></div>and the result is:<div class="codebox"><p>Code: </p><pre><code>owner / botsalterego / PREvision,dapreDarkSide / DarkSideMaTr1X / MaTr1XTurQ / AddFeeD,KaNE,PR3,|PR3|,TRiAD</code></pre></div>Your code becomes:<div class="codebox"><p>Code: </p><pre><code>proc dupe:owners {nick uhost hand chan text} {global mysql_ otable_ chan_ db_handle bopen bdiv bclose   if {![mysqlsel $db_handle "SELECT owner, group_concat(botname) AS bots FROM bots GROUP BY owner"]} {putnow "PRIVMSG $chan_(addbot) :No results found\."return}mysqlmap $db_handle {owner bots} {putnow "PRIVMSG $chan :${bopen}\00303OWNERS\003${bclose} \00314$owner owns [join [split $bots ","] ", "]\003"}     }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Jan 29, 2018 6:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[COBRa]]></name></author>
		<updated>2018-05-17T11:40:31-04:00</updated>

		<published>2017-12-29T06:16:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=106529#p106529</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=106529#p106529"/>
		<title type="html"><![CDATA[Data Output]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=106529#p106529"><![CDATA[
Hi guys just scripted a small proc to display bots and owners from a database it outputs like this atm<br><div class="codebox"><p>Code: </p><pre><code>[9:48am] &lt;~TurQ&gt; !owners[9:48am] &lt;+ClonE&gt; [OWNERS] *** owns *******[9:48am] &lt;+ClonE&gt; [OWNERS] *** owns ****[9:48am] &lt;+ClonE&gt; [OWNERS] *** owns ****[9:48am] &lt;+ClonE&gt; [OWNERS] **** owns ****[9:48am] &lt;+ClonE&gt; [OWNERS] *** owns ***</code></pre></div>if possible i would to output it like this<br><div class="codebox"><p>Code: </p><pre><code>[OWNERS] owner1 owns bot1, bot2, bot3 [OWNERS] owner2 owns bot1, bot2</code></pre></div> <br><br>so it would be one owner per line instead of multiple lines<br>here is my proc so far<br><div class="codebox"><p>Code: </p><pre><code>##################################### !owners      ######################################################proc dupe:owners { nick uhost hand chan arg } {global mysql_ otable_ chan_ db_handle bopen bdiv bclose   if {![mysqlsel $db_handle "SELECT `id` , `owner` , `botname` FROM `bots`"]} {putnow "PRIVMSG $chan_(addbot) :No results found\."; return 0}                      mysqlmap $db_handle {id owner botname} {                putnow "PRIVMSG $chan :${bopen}\00303OWNERS\003${bclose} \00314$owner owns $botname\003"    }          }</code></pre></div>many thx in advance<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12170">COBRa</a> — Fri Dec 29, 2017 6:16 am</p><hr />
]]></content>
	</entry>
	</feed>
