src/modules.c File Reference

#include <ctype.h>
#include "main.h"
#include "modules.h"
#include "tandem.h"
#include "md5/md5.h"
#include "users.h"
Include dependency graph for modules.c:

Go to the source code of this file.

Functions

struct chanset_t *(*) struct (global[93]))
 char ((char *)(global[112]))[]
int int(*) int int(*) int (global[170]))
int int(*) int int(*)(*) int (global[102]))
int int(*) int int(*)(*)(*) int (global[258]))
int int(*) int int(*)(*)(*)(*) int (global[106]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*) 
int (global[226]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*) 
int (global[225]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*)(*) 
int (global[98]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*)(*)(*) 
int (global[227]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*)(*)(*)(*) 
int (global[244]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*)(*)(*)(*)(*) 
int (global[104]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*)(*)(*)(*)(*)(*) 
int (global[105]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*)(*)(*)(*)(*)(*)(*) 
int (global[283]))
int int(*) int int(*)(*)(*)(*)
int int int int int(*)(*)(*)(*)(*)(*)(*)(*)(*) 
int (global[284]))
time_t time_t(*) int (global[205]))
 int (global[132])()
 int ((void(*)(struct user_entry *)) global[144])()
 int ((void(*)(struct userrec *, struct user_entry *)) global[145])()
static int ((int(*)(char *, char *)) global[3])(char *name
void null_func ()
char * charp_func ()
int minus_func ()
int false_func ()
static void null_share (int idx, char *x)
void(*)(*(Function **)(global[161]))
void 
(*)(struct chanset_t *, char, char, char *) ()
int(*)(*(Function **)(global[218]))
int 
(*)(char *, char *) (const char *, const char *)
int(*)(*(Function **)(global[219]))
int 
(*)(char *, char *, int *) (const char *, const char *, int)
void init_modules (void)
int expmem_modules (int y)
 int ((int(*)(char *, Function *, int, int)) global[4])(char *name

Variables

struct dcc_t *struct global [92] = 0
struct userrec *struct *(* struct )(global[95]))
char char char char char char
char char char char char 
version []
char char char char char char
char char char char char char 
log_ts []
int int(* int )(global[107]))
int int(*) in egg_numver )
party_t *(* party_t )(global[260]))
tand_t *(* tand_t )(global[259]))
Tcl_Interp *(* Tcl_Interp )(global[128]))
static char * newname
char moddir [121] = "modules/"
struct hook_entryhook_list [16]
void(* encrypt_pass )(char *, char *)=0
char *(* encrypt_string )(char *, char *)=0
char *(* decrypt_string )(char *, char *)=0
void(*(* Function )(global[68])))() = null_func
void(* sharein )(int, char *) = null_share
void(* qserver )(int, char *, int) = (void (*)(int, char *, int)) null_func
int(* match_noterej )(struct userrec *, char *)
int(* rfc_toupper )(int) = _rfc_toupper
int(* rfc_tolower )(int) = _rfc_tolower
void(* dns_hostbyip )(IP) = block_dns_hostbyip
void(* dns_ipbyhost )(char *) = block_dns_ipbyhost
module_entrymodule_list
dependancydependancy_list = 0
Function global_table []
Functionfuncs
Function int major

Function Documentation

int(* )(*(Function**)(global[218]))int (*)(char *, char *) ( const char *  ,
const char *   
)
int(* )(*(Function**)(global[219]))int (*)(char *, char *, int *) ( const char *  ,
const char *  ,
int   
)
void(* )(*(Function**)(global[161]))void (*)(struct chanset_t *, char, char, char *) (  ) 
char ( (char *)(global[112])   ) 
char* charp_func (  ) 

Definition at line 137 of file modules.c.

References NULL.

00138 {
00139   return NULL;
00140 }

int expmem_modules ( int  y  ) 

Definition at line 601 of file modules.c.

References _module_entry::funcs, MODCALL_EXPMEM, _module_entry::name, _module_entry::next, _dependancy::next, hook_entry::next, and REAL_HOOKS.

Referenced by debug_mem_to_dcc(), and expected_memory().

00602 {
00603   int c = 0, i;
00604   module_entry *p;
00605   dependancy *d;
00606   struct hook_entry *q;
00607   Function *f;
00608 #ifdef STATIC
00609   struct static_list *s;
00610 
00611   for (s = static_modules; s; s = s->next)
00612     c += sizeof(struct static_list) + strlen(s->name) + 1;
00613 #endif
00614 
00615   for (i = 0; i < REAL_HOOKS; i++)
00616     for (q = hook_list[i]; q; q = q->next)
00617       c += sizeof(struct hook_entry);
00618 
00619   for (d = dependancy_list; d; d = d->next)
00620     c += sizeof(dependancy);
00621 
00622   for (p = module_list; p; p = p->next) {
00623     c += sizeof(module_entry);
00624     c += strlen(p->name) + 1;
00625     f = p->funcs;
00626     if (f && f[MODCALL_EXPMEM] && !y)
00627       c += (int) (f[MODCALL_EXPMEM] ());
00628   }
00629   return c;
00630 }

Here is the caller graph for this function:

int false_func (  ) 

Definition at line 147 of file modules.c.

00148 {
00149   return 0;
00150 }

void init_modules ( void   ) 

Definition at line 583 of file modules.c.

References egg_numver, _module_entry::funcs, _module_entry::major, _module_entry::minor, _module_entry::name, _module_entry::next, nmalloc, NULL, and REAL_HOOKS.

Referenced by main().

00584 {
00585   int i;
00586 
00587   module_list = nmalloc(sizeof(module_entry));
00588   module_list->name = nmalloc(8);
00589   strcpy(module_list->name, "eggdrop");
00590   module_list->major = (egg_numver) / 10000;
00591   module_list->minor = (egg_numver / 100) % 100;
00592 #ifndef STATIC
00593   module_list->hand = NULL;
00594 #endif
00595   module_list->next = NULL;
00596   module_list->funcs = NULL;
00597   for (i = 0; i < REAL_HOOKS; i++)
00598     hook_list[i] = NULL;
00599 }

Here is the caller graph for this function:

int ( (int(*)(char *, Function *, int, int))  global[4]  ) 
static int ( (int(*)(char *, char *))  global[3]  )  [static]
int ( (void(*)(struct userrec *, struct user_entry *))  global[145]  ) 
int ( (void(*)(struct user_entry *))  global[144]  ) 
int ( global  [132]  ) 
time_t time_t(*) int ( global  [205]  ) 
Type Constraints
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*)(*)(*)(*)(*)(*)(*)(*) int ( global  [284]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*)(*)(*)(*)(*)(*)(*) int ( global  [283]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*)(*)(*)(*)(*)(*) int ( global  [105]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*)(*)(*)(*)(*) int ( global  [104]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*)(*)(*)(*) int ( global  [244]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*)(*)(*) int ( global  [227]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*)(*) int ( global  [98]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*)(*) int ( global  [225]  ) 
int int(*) int int(*)(*)(*)(*) int int int int int(*) int ( global  [226]  ) 
Type Constraints
int int(*) int int(*)(*)(*)(*) int ( global  [106]  ) 
int int(*) int int(*)(*)(*) int ( global  [258]  ) 
int int(*) int int(*)(*) int ( global  [102]  ) 
int int(*) int int(*) int ( global  [170]  ) 
Type Constraints
int minus_func (  ) 

Definition at line 142 of file modules.c.

00143 {
00144   return -1;
00145 }

void null_func (  ) 

Definition at line 133 of file modules.c.

00134 {
00135 }

static void null_share ( int  idx,
char *  x 
) [static]

Definition at line 157 of file modules.c.

References dprintf, LOG_BOTS, putlog, STAT_GETTING, STAT_OFFERED, STAT_SHARE, and dcc_t::status.

00158 {
00159   if ((x[0] == 'u') && (x[1] == 'n')) {
00160     putlog(LOG_BOTS, "*", "User file rejected by %s: %s", dcc[idx].nick, x + 3);
00161     dcc[idx].status &= ~STAT_OFFERED;
00162     if (!(dcc[idx].status & STAT_GETTING)) {
00163       dcc[idx].status &= ~STAT_SHARE;
00164     }
00165   } else if ((x[0] != 'v') && (x[0] != 'e')) {
00166     dprintf(idx, "s un Not sharing userfile.\n");
00167   }
00168 }

struct chanset_t*(*) struct ( global  [93]  )  [read]

Variable Documentation

char*(* decrypt_string)(char *, char *)=0

Definition at line 187 of file modules.c.

Referenced by mainloop(), and tcl_modules().

void(* dns_hostbyip)(IP) = block_dns_hostbyip

Referenced by dcc_dnshostbyip(), and tcl_dnshostbyip().

void(* dns_ipbyhost)(char *) = block_dns_ipbyhost

Referenced by dcc_dnsipbyhost(), and tcl_dnsipbyhost().

int int(*) in egg_numver)

Definition at line 91 of file modules.c.

void(* encrypt_pass)(char *, char *)=0

Referenced by main(), and pass_set().

char*(* encrypt_string)(char *, char *)=0

Definition at line 632 of file modules.c.

void(* (* Function)(global[68])))() = null_func
struct userrec *struct userrec *char global (  )  = 0 [read]

Definition at line 84 of file modules.c.

Definition at line 193 of file modules.c.

struct hook_entry* hook_list[16]

Definition at line 155 of file modules.c.

const char int [read]
char char char char char char char char char char char char log_ts[]

Definition at line 87 of file modules.c.

Definition at line 632 of file modules.c.

int(* match_noterej)(struct userrec *, char *)
Initial value:
    (int (*)(struct userrec *, char *)) false_func

Referenced by add_note().

char moddir[121] = "modules/"

Definition at line 109 of file modules.c.

Definition at line 186 of file modules.c.

char* newname

Definition at line 106 of file modules.c.

party_t*(* party_t)(global[260]))
void(* qserver)(int, char *, int) = (void (*)(int, char *, int)) null_func
int(* rfc_tolower)(int) = _rfc_tolower
int(* rfc_toupper)(int) = _rfc_toupper
void(* sharein)(int, char *) = null_share

Referenced by bot_share().

struct chanset_t*(* struct)(global[93])) ( global  [95]  )  [read]
tand_t*(* tand_t)(global[259]))
Tcl_Interp*(* Tcl_Interp)(global[128]))
char char char char char char char char char char char version[]

Definition at line 87 of file modules.c.

Referenced by do_arg(), help_subst(), and main().


Generated on 7 Sep 2016 for Eggdrop by  doxygen 1.6.1