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

	<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>2006-10-30T06:17:28-04:00</updated>

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

		<entry>
		<author><name><![CDATA[keikoz]]></name></author>
		<updated>2006-10-30T06:17:28-04:00</updated>

		<published>2006-10-30T06:17:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67560#p67560</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67560#p67560"/>
		<title type="html"><![CDATA[Module segfaulting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67560#p67560"><![CDATA[
Ok, it is working.<br><br>Thank you very much <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=7411">keikoz</a> — Mon Oct 30, 2006 6:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2006-10-29T21:45:03-04:00</updated>

		<published>2006-10-29T21:45:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67550#p67550</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67550#p67550"/>
		<title type="html"><![CDATA[Module segfaulting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67550#p67550"><![CDATA[
Well, it's because you don't import the function table from the irc-module, which is required to use H_pub bindings...<br><br>This should take care of that issue:<div class="codebox"><p>Code: </p><pre><code>char *testmod_start(Function *global_funcs) {  global = global_funcs;  module_register(MODULE_NAME, testmod_table, 0, 1);  if (!(irc_funcs = module_depend(MODULE_NAME, "irc", 1, 0))) {    module_undepend(MODULE_NAME);    return "This module requires the irc module to be loaded";  }  if (!module_depend(MODULE_NAME, "eggdrop", 106, 0)) {    module_undepend(MODULE_NAME);    return "This module requires Eggdrop 1.6.0 or later.";  }  add_builtins(H_pub, hi_pub);  return NULL;}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sun Oct 29, 2006 9:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[keikoz]]></name></author>
		<updated>2006-10-29T21:19:08-04:00</updated>

		<published>2006-10-29T21:19:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=67547#p67547</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=67547#p67547"/>
		<title type="html"><![CDATA[Module segfaulting]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=67547#p67547"><![CDATA[
Hi. I'm trying to understand how to build eggdrop modules. It is quite hard... Actually, i dont understand why this code doenst work (i have a segfault launching the bot): <br><div class="codebox"><p>Code: </p><pre><code>#define MODULE_NAME "testmod"#define MAKING_TESTMOD#define TEST_MAJORV 0#define TEST_MINORV 1#include "../module.h"#include "../irc.mod/irc.h"#undef globalstatic Function *global = NULL;static Function *irc_funcs = NULL;char *testmod_start();static int print_hi(char *nick, char *host, char *hand,                    char *channel, char *text) {  /*  dprintf(DP_STDOUT, "He told hello\n");*/  return 0;}static cmd_t hi_pub[] = {  {"!hi", "", print_hi, NULL},  {0, 0, 0, 0}};static int testmod_expmem () {  return 0;}static void testmod_report (int idx, int details) {  if (details) {    int size = testmod_expmem();    dprintf(idx, "    Using %d byte%s of memory\n", size, size != 1 ? "s" : "");  }}static char *testmod_close () {  rem_builtins(H_pub, hi_pub);  module_undepend(MODULE_NAME);  return NULL;}static Function testmod_table[] = {  (Function) testmod_start,  (Function) testmod_close,  (Function) testmod_expmem,  (Function) testmod_report,};char *testmod_start(Function *global_funcs) {  global = global_funcs;  module_register(MODULE_NAME, testmod_table, 0, 1);  if (!module_depend(MODULE_NAME, "eggdrop", 106, 0)) {    module_undepend(MODULE_NAME);    return "This module requires Eggdrop 1.6.0 or later.";  }  add_builtins(H_pub, hi_pub);  return NULL;}</code></pre></div>Some help would be really appreciated ...[/code]<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7411">keikoz</a> — Sun Oct 29, 2006 9:19 pm</p><hr />
]]></content>
	</entry>
	</feed>
