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

	<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>2002-01-31T17:50:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-31T17:50:00-04:00</updated>

		<published>2002-01-31T17:50:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=4234#p4234</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=4234#p4234"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=4234#p4234"><![CDATA[
I dont really see a need for it since there are already TCL Libraries to access MySQL Databases. My main hub tcl has been using MySQL to store information since day one.<br><br>_________________<br>MacGOD<br>#BotCity TCL Coder.<br><br>&lt;font size=-1&gt;[ This Message was edited by: MacGOD on 2002-01-31 14:52 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Thu Jan 31, 2002 5:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-20T19:22:00-04:00</updated>

		<published>2002-01-20T19:22:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3909#p3909</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3909#p3909"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3909#p3909"><![CDATA[
Personally, I think the mysql mod will be very usefull. My website uses mysql extensivly, and it will be very handy to share infomation between the site and the bot.<br><br>I dont have much to contribute, but I thought I would add my words of encouragement because I am very excited about the project and can already think up a million and one uses <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br>Keep up the good work!<p>Statistics: Posted by Guest — Sun Jan 20, 2002 7:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yourname]]></name></author>
		<updated>2002-01-20T08:21:00-04:00</updated>

		<published>2002-01-20T08:21:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3899#p3899</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3899#p3899"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3899#p3899"><![CDATA[
Errmmm, looks like i'll wait for 1.0 <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":razz:" title="Razz"><br><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13">Yourname</a> — Sun Jan 20, 2002 8:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-20T07:20:00-04:00</updated>

		<published>2002-01-20T07:20:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3898#p3898</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3898#p3898"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3898#p3898"><![CDATA[
<blockquote class="uncited"><div>On 2002-01-20 02:35, Yourname wrote:<br>tajson, pal, i'd request you to make a good one (the mod) i hope you get a stable release soon.<br><br>And why dont u try to incorporate webseen into the mod too?.. that'd give an edge. As well as the goodies gseen offers (bseen doesnt have so many) This will make ppl use MySQL more than these scripts.</div></blockquote>The module is stable now. I just have to make a new tarball and upload it.<br>This module is a data collector, it doesn't include any userfunctions and will newer do. If you want a webseen, use the data collected by this module. It's up to third party modules/scripts to take the credit. I did an example for ppslim who asked the same question, it's a simple webstatistics in real-time. Check my homepage (source is online).<br><p>Statistics: Posted by Guest — Sun Jan 20, 2002 7:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yourname]]></name></author>
		<updated>2002-01-20T05:35:00-04:00</updated>

		<published>2002-01-20T05:35:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3895#p3895</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3895#p3895"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3895#p3895"><![CDATA[
Why? whats about uptime.mod? Does it also use MySQL?<br><br>tajson, pal, i'd request you to make a good one (the mod) i hope you get a stable release soon.<br><br>And why dont u try to incorporate webseen into the mod too?.. that'd give an edge. As well as the goodies gseen offers (bseen doesnt have so many) This will make ppl use MySQL more than these scripts.<br><br>Wish you luck guyz.. you cud add thegoodies after stabilizing the mod first <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"><br><br><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13">Yourname</a> — Sun Jan 20, 2002 5:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-19T23:54:00-04:00</updated>

		<published>2002-01-19T23:54:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3878#p3878</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3878#p3878"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3878#p3878"><![CDATA[
I just want to say that the next mysql.mod release seems stable in the logging part wich is the main purpose of the module. I will start adding the cool features after that wich also will do the sometimes hard job for other scripts, like keep track of wich users that are currently in the channel in a mysql table.<br><br>I also want to thank the betatesters (you know who you are) wich helped me with feedback and ideas. Thanks!<br><p>Statistics: Posted by Guest — Sat Jan 19, 2002 11:54 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-01-19T22:23:00-04:00</updated>

		<published>2002-01-19T22:23:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3875#p3875</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3875#p3875"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3875#p3875"><![CDATA[
Good question indeed, do shell providers allow MySQL?<br><br>Well, for ones that provide you with a MySQL DB with the account, I supose they do.<br><br>As for others, unknown, you would have to ask.<br><br>But then again, what about the uptime.mod - Did any1 bother to ask the shell provider about using this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Sat Jan 19, 2002 10:23 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yourname]]></name></author>
		<updated>2002-01-19T15:19:00-04:00</updated>

		<published>2002-01-19T15:19:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3857#p3857</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3857#p3857"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3857#p3857"><![CDATA[
Hmmmm, so i see that mysqlseen has more advantages than the other ones, i.e bseen, gseen.<br><br>Ok, but then do the other shells allow usage of MySQL?<br>And if the mod is made, what about the scripts that will be using them..Im sure even that needs to be very well coded.<br><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13">Yourname</a> — Sat Jan 19, 2002 3:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-01-15T11:23:00-04:00</updated>

		<published>2002-01-15T11:23:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3820#p3820</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3820#p3820"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3820#p3820"><![CDATA[
if gseen returns too many matches, then a Tcl using seen data from the MySQL.mod would certainly return too many matches.<br><br>Instead of searching a list (bseen) or a struct (faster gseen), it uses it's own mini programing language to locate and return records.<br><br>The bseen ans gseen issue is easily solved. It only needs to return the top 6 results (EG the latest 6 events recorded).<br><br>The advantage of mysql oin seen scripts.<br><br>For a start, it only requires one snapshot <br>of data, instead of each bot doing it's own logging.<br><br>Only one bot required to write to file, avoiding conflicts.<br><br>If data logging script is coded correctly, it is possible to log channel accross networks, or even channels that some bots where never intended for. Providing a much more complete seen database.<br><br>No memory requirments. Data is logged to file, by a server designed to do the task, rather than a thought up data format. There is no need to store seen info in local memory.<br><br>Ability to colect and store info not even intented for seen purposes, yet retrievable by other bots too, without the requiremnet of sending files. With MySQL selects, you limit the results returned, instead of having to search a file yourself, or transfer the whole file to a local file, just to search. This is usful if you are using very large datasources (20MB +).<br><br>Ability to interact with other systems, and web programs, without the need to create your own parsers. EG, webseen, the module addon for gseen, allows gseen results to be returned as a searched webpage. This is more memory consuming for eggdrop, as it has to search, enconde and handle http transactions. PHP, perl, Tcl and many other MySQL able (addons maybe needed) languages can simply query the database, and the information is then rediliy available, gurenteeing 100% pure HTTP headers, and 0 extra load on eggdrop.<br><br>There are hundreds of advantages. SOme of them may not be suited, or just seem like there is no reason, but the general idea is, that this information is sharable.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Jan 15, 2002 11:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Yourname]]></name></author>
		<updated>2002-01-15T02:53:00-04:00</updated>

		<published>2002-01-15T02:53:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3815#p3815</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3815#p3815"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3815#p3815"><![CDATA[
<blockquote class="uncited"><div>And you can also use thesame information to do !online, !top10, webstats and much much more. It's not just seen, its the information. What you do with it is up to you.</div></blockquote>Well, but then gseen.mod by G`Quann also works the same way, except for that !online thingie or so... but then sometimes gseen sez Returned too many matches... thats one thing i dislike about it.<br><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=13">Yourname</a> — Tue Jan 15, 2002 2:53 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-13T00:57:00-04:00</updated>

		<published>2002-01-13T00:57:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3761#p3761</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3761#p3761"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3761#p3761"><![CDATA[
<blockquote class="uncited"><div>On 2002-01-10 18:24, blackwidow wrote:<br>two errors, one of them critical:<br><br>gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H  -I/usr/local/mysql/include  -DMAKING_MODS -c .././mysql.mod/mysql.c .././mysql.mod/mysql.c:27:25: mysql/mysql.h: No such file or directory</div></blockquote>Point --with-mysql to the directory that contains include/mysql.h.<br>Like /usr/local/mysql, /usr, /usr/local etc...<br><blockquote class="uncited"><div>error 2, I can't get past:<br><br>gcc -pipe -shared -nostartfiles -L/usr/local/mysql/lib/mysql -lmysqlclient -o ../../../mysql.so ../mysql.o<br>/usr/bin/ld: cannot find -lmysqlclient</div></blockquote>If not in --with-mysql path, you can export it into $LD_LIBRARY_PATH and/or by adding it into /etc/ld.so.conf<br><br>I (with the help of ppslim) are working on a better configure script that will do this work better.<br><p>Statistics: Posted by Guest — Sun Jan 13, 2002 12:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-10T21:36:00-04:00</updated>

		<published>2002-01-10T21:36:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3694#p3694</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3694#p3694"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3694#p3694"><![CDATA[
ok, I figured out my second error. I changed the makefile to look in /usr/local/mysql/lib instead of /usr/local/mysql/lib/mysql. odd.<p>Statistics: Posted by Guest — Thu Jan 10, 2002 9:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-10T21:24:00-04:00</updated>

		<published>2002-01-10T21:24:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3693#p3693</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3693#p3693"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3693#p3693"><![CDATA[
two errors, one of them critical:<br><br>gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H  -I/usr/local/mysql/include  -DMAKING_MODS -c .././mysql.mod/mysql.c .././mysql.mod/mysql.c:27:25: mysql/mysql.h: No such file or directory<br><br>I fixed this by creating a mysql directory under /usr/local/mysql/include and copying /usr/local/mysql/include/mysql.h into it.<br><br>error 2, I can't get past:<br><br>gcc -pipe -shared -nostartfiles -L/usr/local/mysql/lib/mysql -lmysqlclient -o ../../../mysql.so ../mysql.o<br>/usr/bin/ld: cannot find -lmysqlclient<br><br>I'm on a redhat 7.2 linux install, using mysql 3.23.43 and eggdrop 1.6.8.  thanks for any help you might have<p>Statistics: Posted by Guest — Thu Jan 10, 2002 9:24 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-01-03T12:16:00-04:00</updated>

		<published>2002-01-03T12:16:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3402#p3402</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3402#p3402"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3402#p3402"><![CDATA[
First before answering all the parts I must say - Thank you! This is what a community is all about and in specific OpenSource, helping each other.<br>I have never claimed to be an programmer, but since I didn't find some programs I wanted I just learned C. I started a couple of months ago with some basic C and here we are...<br><blockquote class="uncited"><div>Hi, I was looking in mysql.c and I noticed your question about mysql_expmem. You did the correct thing. The only thing the expmem function is supposed to report is the dynamic memory your module uses via nmalloc. Since you don't use nmalloc, the expected memory usage from eggdrop's point of view is 0.</div></blockquote>As I will say below (jumping in my answers when I'm writing), that is something I must study harder on.<br><blockquote class="uncited"><div>Here's a problem:<br><div class="codebox"><p>Code: </p><pre><code>char escape(char *string)  {    char *tmpString[2048];    Context;    mysql_real_escape_string(&amp;mysql, tmpString, string, (unsigned int)strlen(string));    snprintf(string, sizeof(tmpString), tmpString);    nfree(tmpString);    return *string;  }</code></pre></div>If tmpString is supposed to be a string, it should be declared<br>char tmpString[2048];<br>The * makes it an array of 2048 pointers, not characters. Also, it should not be nfree()'d, because it was not nmalloc()'d.</div></blockquote>Make sense to me...<br>And this with dynamic memory allocation is something I must study more on, I'm still on basic C programming.<br><blockquote class="uncited"><div>And, escape() should not modify its argument. When you call escape(nick); escape(host); escape(handle); escape(channel); etc. you are running the risk of a buffer overflow (if the escaped string is larger, it will overflow the nick/host/handle buffer) and you may corrupt future binds, because you are modifying the bind arguments.</div></blockquote>The escaped string is always larger when returned if it contains anything that must be escaped (like '%_) etc. A "'" will be escaped like "'". How to deal with that? <br>Make a copy?<br><blockquote class="uncited"><div>Your overall module structure is good. I'm curious, did you figure it all out yourself (like importing the H_* tables) or did you use a template or some tutorial? Several people on this forum have asked for a module tutorial. If you used one, that could be helpful to share <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":smile:" title="Smile"></div></blockquote>I looked at the woobie source and figured out with time. Its all there in the source somewhere, you just have to find it.<br>I am willing to learn, that is my secret. I just never give up.<br><blockquote class="uncited"><div>Finally, as sort of a feature suggestion.. once you have all the mysql code there, why not create some simple tcl commands to access them? Like mysql_connect, mysql_execute, etc. Then your module would be useful to everybody who wants to use mysql in their tcl scripts (but not necessarily for channel logging).</div></blockquote>Infact, that is something that will come in the feature. It's in my plans for the module. But I first want to do STABLE logging, that's the main purpose for me since I did this module for myself.<br><br>Edit: The script didn't like my escape example, it should be a backslash before the escaped character.<br><br>_________________<br><a href="http://joakim.gissberg.nu/" class="postlink">http://joakim.gissberg.nu/</a> | <a href="mailto:joakim@gissberg.nu">joakim@gissberg.nu</a><br><br>&lt;font size=-1&gt;[ This Message was edited by: tajson on 2002-01-03 09:26 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Thu Jan 03, 2002 12:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-01-03T10:01:00-04:00</updated>

		<published>2002-01-03T10:01:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=3401#p3401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=3401#p3401"/>
		<title type="html"><![CDATA[mysql.mod]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=3401#p3401"><![CDATA[
Hi, I was looking in mysql.c and I noticed your question about mysql_expmem. You did the correct thing. The only thing the expmem function is supposed to report is the dynamic memory your module uses via nmalloc. Since you don't use nmalloc, the expected memory usage from eggdrop's point of view is 0.<br><br>Here's a problem:<br><div class="codebox"><p>Code: </p><pre><code>char escape(char *string)  {    char *tmpString[2048];    Context;    mysql_real_escape_string(&amp;mysql, tmpString, string, (unsigned int)strlen(string));    snprintf(string, sizeof(tmpString), tmpString);    nfree(tmpString);    return *string;  }</code></pre></div>If tmpString is supposed to be a string, it should be declared<br>char tmpString[2048];<br>The * makes it an array of 2048 pointers, not characters. Also, it should not be nfree()'d, because it was not nmalloc()'d.<br><br>And, escape() should not modify its argument. When you call escape(nick); escape(host); escape(handle); escape(channel); etc. you are running the risk of a buffer overflow (if the escaped string is larger, it will overflow the nick/host/handle buffer) and you may corrupt future binds, because you are modifying the bind arguments.<br><br>Your overall module structure is good. I'm curious, did you figure it all out yourself (like importing the H_* tables) or did you use a template or some tutorial? Several people on this forum have asked for a module tutorial. If you used one, that could be helpful to share <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>Finally, as sort of a feature suggestion.. once you have all the mysql code there, why not create some simple tcl commands to access them? Like mysql_connect, mysql_execute, etc. Then your module would be useful to everybody who wants to use mysql in their tcl scripts (but not necessarily for channel logging).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Jan 03, 2002 10:01 am</p><hr />
]]></content>
	</entry>
	</feed>
