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

	<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>2012-12-06T16:58:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-12-06T16:58:38-04:00</updated>

		<published>2012-12-06T16:58:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100376#p100376</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100376#p100376"/>
		<title type="html"><![CDATA[Irc channel into MySql database?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100376#p100376"><![CDATA[
Try this one, kinda old but should work:<div class="codebox"><p>Code: </p><pre><code># Author: tomekk# e-mail:  tomekk/@/tomekk/./org# home page: http://tomekk.org/## Version 0.1## This file is Copyrighted under the GNU Public License.# http://www.gnu.org/copyleft/gpl.html# channel_name = channel table name in databaseset channels_tables { #chan1 #chan2 }# SQL userset sql_user "myuser"# SQL passset sql_pass "mypass"# SQL server hostset sql_host "localhost"# SQL databaseset sql_dbase "mydbname"##############################################################package require mysqltclbind pubm - "*" eat_meproc eat_me { nick uhost hand chan arg } {        global channels_tables sql_user sql_pass sql_host sql_dbase        foreach channel_table $channels_tables {                if {$channel_table == $chan} {                        set mysql_hand [::mysql::connect -host $sql_host -user $sql_user -password $sql_pass]                        ::mysql::use $mysql_hand $sql_dbase                        set escaped_nick [::mysql::escape $mysql_hand $nick]                        set escaped_arg [::mysql::escape $mysql_hand $arg]                        ::mysql::sel $mysql_hand "INSERT INTO `$channel_table` (`id`, `nick`, `text`) VALUES(NULL, '$escaped_nick', '$escaped_arg')"                        ::mysql::close $mysql_hand                }        }}putlog "mysqlchan.tcl ver 0.1 by tomekk loaded"</code></pre></div>table structure:<div class="codebox"><p>Code: </p><pre><code>CREATE TABLE `#chan1` (`id` INT NOT NULL AUTO_INCREMENT ,`nick` VARCHAR( 32 ) NOT NULL ,`text` TEXT NOT NULL ,PRIMARY KEY ( `id` )) ENGINE = MYISAM ;</code></pre></div>Generally - it should work, but there can be problems with char encoding.<br>Try it.<br><br>/hint/<br>lsearch can be used instead of foreach, but anyway - this should be not a problem<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Thu Dec 06, 2012 4:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Hugo2]]></name></author>
		<updated>2012-12-06T15:57:33-04:00</updated>

		<published>2012-12-06T15:57:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100375#p100375</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100375#p100375"/>
		<title type="html"><![CDATA[Irc channel into MySql database?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100375#p100375"><![CDATA[
Yes, I want every entry in the channel to go to the mysql database.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12153">Hugo2</a> — Thu Dec 06, 2012 3:57 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tomekk]]></name></author>
		<updated>2012-12-06T15:47:14-04:00</updated>

		<published>2012-12-06T15:47:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100374#p100374</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100374#p100374"/>
		<title type="html"><![CDATA[Irc channel into MySql database?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100374#p100374"><![CDATA[
Whole channel text into mysql table?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10332">tomekk</a> — Thu Dec 06, 2012 3:47 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Hugo2]]></name></author>
		<updated>2012-12-06T15:33:37-04:00</updated>

		<published>2012-12-06T15:33:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=100372#p100372</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=100372#p100372"/>
		<title type="html"><![CDATA[Irc channel into MySql database?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=100372#p100372"><![CDATA[
Hello! <br>I have been looking for an eggdrop script that reads one or more channels and puts it into a MySql database. It will  read/copy from an IRC channel and add it to a MySql database. Is there anyone who could help me with this? Or know if there is anything simular to this here on the forums? I've been looking like crazy, but I dont find anything. If you help me, I am forever grateful and can certainly give something in return.<br><br>/ Hugo2<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12153">Hugo2</a> — Thu Dec 06, 2012 3:33 pm</p><hr />
]]></content>
	</entry>
	</feed>
