/* include file that all modules must use (except mem.c) */ #define nmalloc(x) n_malloc((x),__FILE__,__LINE__) #define nfree(x) n_free((x),__FILE__,__LINE__) #define malloc(x) dont_use_old_malloc(x) #define free(x) dont_use_old_free(x) /* use this for debugging: */ #define debug console /* or this for no debugging: */ /* #define debug(x) ; */ #define MAXDCC 20 #define MAXQMSG 200 /* public structure of all the dcc connections */ struct dcc_t { int sock; unsigned long addr; unsigned int port; char nick[10]; char host[121]; char param[121]; unsigned char type; long used; /* sometimes type-cast to time_t */ unsigned short int status; int msgs_per_sec; /* used only in chat & files to stop flooding */ }; #define DCC_CHAT 1 /* dcc-chat: command mode */ #define DCC_CHAT_PASS 2 /* receiving password for dcc chat */ #define DCC_SEND 3 /* receiving file */ #define DCC_GET 4 /* sending file */ #define DCC_GET_PENDING 5 /* waiting for connect to send file */ #define DCC_TELNET 6 /* acceptor socket for telnet */ #define DCC_TELNET_ID 7 /* telnetter identifying self */ #define DCC_FILES 8 /* file subsystem */ #define DCC_EDIT 9 /* editing a file (masters) */ #define STAT_CONSOLE 1 /* show console info */ #define STAT_MASTER 2 /* is bot-master (full access) */ #define STAT_FILES 4 /* ??? not sure yet */ #define STAT_CHAT 8 /* in file-system but may return */ #define STAT_TALK 16 /* using enhanced 'talk' script */ #define STAT_BLIND 32 /* blinded from receiving party-line talk */ #define STAT_CR 64 /* send cr after linefeed (bad telnets) (UNUSED) */ #define STAT_ECHO 128 /* echo input (UNUSED) */ #define STAT_UNUSED 16384 /* (just a reminder: last avail) */ /* dcc chat: 'used' is time last msg received */ /* dcc chat/edit: 'used' is # lines, 'status' is current line # */ /* dcc chat pass: 'used' is time connected (expires after 3 minutes) */ /* dcc send: 'status' is length of file, 'used' is # bytes received so far */ /* dcc get pending: 'used' is time i offered (expires after 5 minutes) */ /* dcc get: 'status' is file length, 'used' is # bytes sent so far */ /* dcc telnet: 'port' is listening port */ /* dcc telnet id: 'used' is time connected (expires after 3 minutes) */ #define USER_OP 1 /* o bot will op the user */ #define USER_DEOP 2 /* d bot makes sure user never gets op */ #define USER_BAN 4 /* b user is banned */ #define USER_KICK 8 /* k user is auto-kicked */ #define USER_MASTER 16 /* m user has full bot access */ #define USER_FRIEND 32 /* f user exempt from revenge */ #define USER_XFER 64 /* x (unused) */ #define USER_IGNORE 128 /* i user ignored */ #define USER_TANDEM 256 /* t user is a tandem eggdrop-bot */ #define USER_PURGE 8192