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

	<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>2008-09-09T16:18:04-04:00</updated>

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

		<entry>
		<author><name><![CDATA[mayatekla]]></name></author>
		<updated>2008-09-09T16:18:04-04:00</updated>

		<published>2008-09-09T16:18:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85113#p85113</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85113#p85113"/>
		<title type="html"><![CDATA[compile problems, mod with mysql]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85113#p85113"><![CDATA[
[solved]<br><br>It seems list_delete is defined in eggdrops users.h as well as mysql's my_list.h<br><br>so for a nice solution:<br><div class="codebox"><p>Code: </p><pre><code>#define MODULE_NAME "al"#define MAKING_AL#define list_delete egg_list_delete#include "src/mod/module.h"#undef list_delete#include &lt;mysql.h&gt;</code></pre></div>reorganisation of the includes, redefine eggdrops list_delete to egg_list_delete then undef list_delete before including mysql.h<br><br><br>Evil things like this give me headaches<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10195">mayatekla</a> — Tue Sep 09, 2008 4:18 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mayatekla]]></name></author>
		<updated>2008-09-09T11:56:07-04:00</updated>

		<published>2008-09-09T11:56:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85109#p85109</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85109#p85109"/>
		<title type="html"><![CDATA[compile problems, mod with mysql]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85109#p85109"><![CDATA[
oh, for reference:<br><div class="codebox"><p>Code: </p><pre><code>/* * * * **/#define MODULE_NAME "al"#define MAKING_AL#include "src/mod/module.h"#include &lt;mysql.h&gt;#include &lt;stdio.h&gt;#undef globalstatic Function *global = NULL;static void do_list();static int al_expmem(){  return 0;}static int pub_al(char *nick, char *host, char *hand, char *channel, char *text){    dprintf(DP_HELP, "PRIVMSG %s :Test :: %s :: %s :: %s :: %s :: %s", nick, nick, host, hand, channel, text);    do_list(nick, text);    return 0;}static int msg_al(char *nick, char *host, struct userrec *u, char *text){    dprintf(DP_SERVER, "PRIVMSG %s : Test :: %s :: %s :: %s", nick, nick, host, text);    do_list(nick, text);    return 0;}static void do_list(char *nick, char *text){    dprintf(DP_SERVER, "PRIVMSG %s : Test :: %s :: %s", nick, nick, text);/* * SQL stuff start */     MYSQL *conn;    MYSQL_RES *res;    MYSQL_ROW row;    char *server = "localhost";    char *user = "eggdrop-xxxx";    char *password = "xxxxxxx"; /* set me first */    char *database = "eggdrop_al";    conn = mysql_init(NULL);    /* Connect to database */    if (!mysql_real_connect(conn, server, user, password, database, 0, NULL, 0)) {dprintf(DP_SERVER, "PRIVMSG %s : There was an error of some kind please report to an owner: %s\n", nick, mysql_error(conn));exit(1);    }    /* send SQL query */    if (mysql_query(conn, "SELECT * FROM `eggdrop_al`.`denylist`")) {dprintf(DP_SERVER, "PRIVMSG %s : There was an error of some kind please report to an owner: %s\n", nick, mysql_error(conn));exit(1);    }    res = mysql_use_result(conn);    /* output table name */dprintf(DP_SERVER, "PRIVMSG %s :id :: nick :: date :: reason :: by:\n");    while ((row = mysql_fetch_row(res)) != NULL)dprintf(DP_SERVER, "PRIVMSG %s :%s  %s  %s  %s  %s\n", nick, row[0], row[1], row[2], row[3], row[4]);    /* close connection */    mysql_free_result(res);    mysql_close(conn); /* * SQL stuff end */}static cmd_t al_pub[] = {  /* command  flags  function     tcl-name */  {"!list", "", pub_al, NULL},  {NULL, NULL, NULL, NULL}  /* Mark end. */};static cmd_t al_msg[] = {  {"!list", "", msg_al, NULL},  {NULL, NULL, NULL, NULL}};static void al_report(int idx, int details){  if (details) {    int size = al_expmem();    dprintf(idx, "    Using %d byte%s of memory\n", size,            (size != 1) ? "s" : "");  }}static char *al_close(){  //Context;    p_tcl_bind_list H_temp;        if ((H_temp = find_bind_table("pub")))rem_builtins(H_temp, al_pub);    if ((H_temp = find_bind_table("msg")))rem_builtins(H_temp, al_msg);   module_undepend(MODULE_NAME);  return NULL;}EXPORT_SCOPE char *al_start();static Function al_table[] = {  (Function) al_start,  (Function) al_close,  (Function) al_expmem,  (Function) al_report,};char *al_start(Function *global_funcs){  /* Assign the core function table. After this point you use all normal   * functions defined in src/mod/modules.h   */  global = global_funcs;  Context;  /* Register the module. */  module_register(MODULE_NAME, al_table, 1, 0);  if (!module_depend(MODULE_NAME, "eggdrop", 106, 0)) {    module_undepend(MODULE_NAME);    return "This module requires Eggdrop 1.6.0 or later.";  }    p_tcl_bind_list H_temp;    if ((H_temp = find_bind_table("msg")))add_builtins(H_temp, al_msg);    if ((H_temp = find_bind_table("pub")))add_builtins(H_temp, al_pub);  return NULL;}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10195">mayatekla</a> — Tue Sep 09, 2008 11:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mayatekla]]></name></author>
		<updated>2008-09-09T11:53:02-04:00</updated>

		<published>2008-09-09T11:53:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85108#p85108</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85108#p85108"/>
		<title type="html"><![CDATA[compile problems, mod with mysql]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85108#p85108"><![CDATA[
ok, I have been trying to compile this for the last couple days but i cant for the life of me work out whats going wrong... from the error message it seems to be saying its a problem with an inlude of an included header which should be perfectly correct.... <br><div class="codebox"><p>Code: </p><pre><code>make[2]: Entering directory `/home/xxxxxxxxxxxx/IRC/eggdropStuff/eggdropSource/eggdrop1.6.19/src/mod/al.mod'gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H   `(mysql_config --cflags)` -DMAKING_MODS -c .././al.mod/al.cIn file included from /usr/include/mysql/mysql.h:76,                 from .././al.mod/al.c:13:/usr/include/mysql/my_list.h:31: error: expected identifier or ‘(’ before ‘int’/usr/include/mysql/my_list.h:31: error: expected ‘)’ before ‘global’make[2]: *** [../al.o] Error 1make[2]: Leaving directory `/home/xxxxxxxxxxxx/IRC/eggdropStuff/eggdropSource/eggdrop1.6.19/src/mod/al.mod'make[1]: *** [al.mod_so] Error 2make[1]: Leaving directory `/home/xxxxxxxxxxxx/IRC/eggdropStuff/eggdropSource/eggdrop1.6.19/src/mod'make: *** [modules] Error 2</code></pre></div>anyone have any clue whats going on here or what to do with it??<br><br>[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10195">mayatekla</a> — Tue Sep 09, 2008 11:53 am</p><hr />
]]></content>
	</entry>
	</feed>
