Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
BitchX
GitHub Repository: BitchX/BitchX1.3
Path: blob/master/include/cdcc.h
1069 views
1
#ifndef _CDCC_H_
2
#define _CDCC_H_
3
4
#include <sys/types.h>
5
#include <sys/stat.h>
6
7
/* local commands */
8
extern double cdcc_minspeed;
9
10
typedef struct {
11
char *name;
12
int (*function)(char *args, char *rest);
13
char *help;
14
} local_cmd;
15
16
/* remote commands */
17
typedef struct {
18
char *name;
19
int (*function)(char *from, char *args);
20
char *help;
21
} remote_cmd;
22
23
/* offer pack type */
24
typedef struct packtype {
25
struct packtype *next;
26
int num;
27
char *file;
28
char *desc;
29
char *notes;
30
int numfiles;
31
int gets;
32
int server;
33
time_t timeadded;
34
unsigned long size;
35
double minspeed;
36
char *password;
37
} pack;
38
39
/* cdcc queue struct */
40
typedef struct queuetype {
41
struct queuetype *next;
42
char *nick;
43
char *file;
44
int numfiles;
45
time_t time;
46
char *desc;
47
char *command;
48
int num;
49
int server;
50
} queue;
51
52
/* local command parser */
53
void cdcc(char *, char *, char *, char *);
54
55
/* remote message command parser */
56
char *msgcdcc(char *, char *, char *);
57
58
/* send a file from the queue */
59
void dcc_sendfrom_queue (void);
60
61
void cdcc_timer_offer (void);
62
63
/* publicly list offered packs */
64
int l_plist(char *, char *);
65
66
int BX_get_num_queue(void);
67
int BX_add_to_queue(char *, char *, pack *);
68
69
#endif
70
71