egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

understanding woobie...

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Modules & Programming
View previous topic :: View next topic  
Author Message
stilllearning
Voice


Joined: 29 Jan 2006
Posts: 8

PostPosted: Sun Feb 19, 2006 10:56 pm    Post subject: understanding woobie... Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Feb 20, 2006 2:41 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
stilllearning
Voice


Joined: 29 Jan 2006
Posts: 8

PostPosted: Mon Feb 20, 2006 10:08 am    Post subject: Reply with quote

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
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Feb 20, 2006 9:00 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Modules & Programming All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber