| View previous topic :: View next topic |
| Author |
Message |
stilllearning Voice
Joined: 29 Jan 2006 Posts: 8
|
Posted: Sun Feb 19, 2006 10:56 pm Post subject: understanding woobie... |
|
|
Been reviewing woobie module and learning some C...
Have a few questions though...
- Why is module_start declared as a char?
/* This function table is exported and may be used by other modules and
* the core.
*
* The first four have to be defined (you may define them as NULL), as
* they are checked by eggdrop core.
*/
static Function woobie_table[] = {
(Function) woobie_start,
(Function) woobie_close,
(Function) woobie_expmem,
(Function) woobie_report,
};
- How would i define them as NULL?
Make a function and just put return NULL; ?
- How can I make my module kill/stop eggdrop from loading if sanity checking I implement fails? |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Feb 20, 2006 2:41 am Post subject: |
|
|
those are function pointers, so you can simply replace them with NULLs
terminating eggdrop from a module wouldn't be a correct behaviour, but you can do that by calling exit() _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
stilllearning Voice
Joined: 29 Jan 2006 Posts: 8
|
Posted: Mon Feb 20, 2006 10:08 am Post subject: |
|
|
| demond wrote: | those are function pointers, so you can simply replace them with NULLs
|
How would I write that? I mean the correct syntax |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Mon Feb 20, 2006 9:00 pm Post subject: |
|
|
you need to learn C before trying to modify C programs
refer to your C book, section "Function pointers" _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
|