Go Back

0 /*

1 * ISC License

2 * Copyright (c) 2023 RMF <rawmonk@firemail.cc>

3 */

4 int command_quit(struct client *client, const char* ptr, size_t len);

5 int command_close(struct client *client, const char* ptr, size_t len);

6 int command_open(struct client *client, const char* ptr, size_t len);

7 int command_search(struct client *client, const char* ptr, size_t len);

8 int command_gencert(struct client *client, const char* ptr, size_t len);

9 int command_forget(struct client *client, const char* ptr, size_t len);

10 int command_newtab(struct client *client, const char* ptr, size_t len);

11 int command_download(struct client *client, const char* ptr, size_t len);

12 int command_add(struct client *client, const char* args, size_t len);

13 int command_help(struct client *client, const char* args, size_t len);

14

15 struct command {

16 char name[MAX_CMD_NAME];

17 int (*command)(struct client*, const char*, size_t);

18 };

19

20 static struct command commands[] = {

21 {"qa", command_quit},

22 {"q", command_close},

23 {"o", command_open},

24 {"s", command_search},

25 {"add", command_add},

26 {"nt", command_newtab},

27 {"tabnew", command_newtab},

28 {"gencert", command_gencert},

29 {"forget", command_forget},

30 {"download", command_download},

31 {"help", command_help},

32 };

33