lib/eggdrop/eggdrop.c File Reference

#include <eggdrop/eggdrop.h>

Go to the source code of this file.

Functions

int eggdrop_init (void)
int eggdrop_shutdown (void)
int eggdrop_event (const char *event)
int eggdrop_set_params (const char **params, int nparams)
const char * eggdrop_get_param (const char *key)

Variables

static const char rcsid [] = "$Id: eggdrop.c,v 1.27 2006-11-14 14:51:23 sven Exp $"
static bind_table_tBT_event = NULL
static const char ** eggparams = NULL
static int neggparams = 0


Function Documentation

int eggdrop_event ( const char *  event  ) 

Definition at line 68 of file eggdrop.c.

References bind_check(), and NULL.

Referenced by core_secondly(), disconnect_server(), got001(), got_hup(), got_quit(), got_term(), script_die(), and server_on_connect().

00069 {
00070   return bind_check(BT_event, NULL, event, event);
00071 }

const char* eggdrop_get_param ( const char *  key  ) 

Definition at line 82 of file eggdrop.c.

References eggparams, neggparams, and NULL.

00083 {
00084   int i, nparams;
00085 
00086   nparams = neggparams - 1;
00087   for (i = 0; i < nparams; i += 2) {
00088     if (!strcasecmp(eggparams[i], key)) return(eggparams[i+1]);
00089   }
00090   return(NULL);
00091 }

int eggdrop_init ( void   ) 

Definition at line 33 of file eggdrop.c.

References BIND_STACKABLE, bind_table_add(), botnet_init(), BTN_EVENT, config_init(), egg_net_init(), help_init(), logging_init(), MATCH_MASK, module_init(), partyline_init(), script_init(), timer_init(), and user_init().

Referenced by core_init().

00034 {
00035   BT_event = bind_table_add(BTN_EVENT, 1, "s", MATCH_MASK, BIND_STACKABLE); /* DDD  */
00036 
00037   config_init();
00038   timer_init();
00039   egg_net_init();
00040   logging_init();
00041   user_init();
00042   script_init();
00043   partyline_init();
00044   botnet_init();
00045   module_init();
00046   help_init();
00047 
00048   
00049   return 1;
00050 }

int eggdrop_set_params ( const char **  params,
int  nparams 
)

Definition at line 74 of file eggdrop.c.

References eggparams, and neggparams.

Referenced by do_args().

00075 {
00076   eggparams = params;
00077   neggparams = nparams;
00078   return(0);
00079 }

int eggdrop_shutdown ( void   ) 


Variable Documentation

bind_table_t* BT_event = NULL [static]

Definition at line 27 of file eggdrop.c.

const char** eggparams = NULL [static]

Definition at line 30 of file eggdrop.c.

Referenced by eggdrop_get_param(), and eggdrop_set_params().

int neggparams = 0 [static]

Definition at line 31 of file eggdrop.c.

Referenced by eggdrop_get_param(), and eggdrop_set_params().

const char rcsid[] = "$Id: eggdrop.c,v 1.27 2006-11-14 14:51:23 sven Exp $" [static]

Definition at line 21 of file eggdrop.c.


Generated on Sun Nov 30 18:43:34 2008 for eggdrop1.9 by  doxygen 1.5.6