1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
#ifndef _CDCC_H_
#define _CDCC_H_
/* local commands */
extern double cdcc_minspeed;
typedef struct {
char *name;
int (*function)(char *args, char *rest);
char *help;
} local_cmd;
/* remote commands */
typedef struct {
char *name;
int (*function)(char *from, char *args);
char *help;
} remote_cmd;
/* offer pack type */
typedef struct packtype {
struct packtype *next;
int num;
char *file;
char *desc;
char *notes;
int numfiles;
int gets;
int server;
time_t timeadded;
unsigned long size;
double minspeed;
char *password;
} pack;
/* cdcc queue struct */
typedef struct queuetype {
struct queuetype *next;
char *nick;
char *file;
int numfiles;
time_t time;
char *desc;
char *command;
int num;
int server;
} queue;
/* local command parser */
void cdcc(char *, char *, char *, char *);
/* remote message command parser */
char *msgcdcc(char *, char *, char *);
/* send a file from the queue */
void dcc_sendfrom_queue (void);
void cdcc_timer_offer (void);
/* publicly list offered packs */
int l_plist(char *, char *);
#endif
|