]>
Commit | Line | Data |
---|---|---|
e986e18b | 1 | #include <stdio.h>\r |
2 | #include <string.h>\r | |
3 | #include <time.h>\r | |
4 | \r | |
5 | #include "../nick/nick.h"\r | |
6 | #include "../localuser/localuserchannel.h"\r | |
7 | #include "../core/hooks.h"\r | |
8 | #include "../core/schedule.h"\r | |
9 | #include "../lib/array.h"\r | |
10 | #include "../lib/base64.h"\r | |
11 | #include "../lib/irc_string.h"\r | |
12 | #include "../lib/splitline.h"\r | |
13 | \r | |
14 | #include "qabot.h"\r | |
15 | \r | |
16 | int qabot_showhelp(nick* np, char* arg) {\r | |
17 | if (!ircd_strcmp(arg, "showcommands")) {\r | |
18 | sendnoticetouser(qabot_nick, np, "Syntax: showcommands");\r | |
19 | sendnoticetouser(qabot_nick, np, "Display commands the bot provides.");\r | |
20 | }\r | |
21 | else if (!ircd_strcmp(arg, "help")) {\r | |
22 | sendnoticetouser(qabot_nick, np, "Syntax: help <command>");\r | |
23 | sendnoticetouser(qabot_nick, np, "View help for a particular command.");\r | |
24 | }\r | |
25 | else if (!ircd_strcmp(arg, "hello")) {\r | |
26 | sendnoticetouser(qabot_nick, np, "Syntax: hello");\r | |
27 | sendnoticetouser(qabot_nick, np, "Create the initial user account on the bot.");\r | |
28 | }\r | |
29 | else if (!ircd_strcmp(arg, "save")) {\r | |
30 | sendnoticetouser(qabot_nick, np, "Syntax: save");\r | |
31 | sendnoticetouser(qabot_nick, np, "Save the user and bot databases.");\r | |
32 | }\r | |
33 | else if (!ircd_strcmp(arg, "listbots")) {\r | |
34 | sendnoticetouser(qabot_nick, np, "Syntax: listbots");\r | |
35 | sendnoticetouser(qabot_nick, np, "List currently added bots.");\r | |
36 | }\r | |
37 | else if (!ircd_strcmp(arg, "listusers")) {\r | |
38 | sendnoticetouser(qabot_nick, np, "Syntax: listusers");\r | |
39 | sendnoticetouser(qabot_nick, np, "List currently added users.");\r | |
40 | }\r | |
41 | else if (!ircd_strcmp(arg, "showbot")) {\r | |
42 | sendnoticetouser(qabot_nick, np, "Syntax: showbot <nick>");\r | |
43 | sendnoticetouser(qabot_nick, np, "Show information about a particular bot.");\r | |
44 | }\r | |
45 | else if (!ircd_strcmp(arg, "addbot")) {\r | |
46 | sendnoticetouser(qabot_nick, np, "Syntax: addbot <nick> <user> <host> <public chan> <question chan> <staff chan>");\r | |
47 | sendnoticetouser(qabot_nick, np, "Add a new bot.");\r | |
48 | }\r | |
49 | else if (!ircd_strcmp(arg, "delbot")) {\r | |
50 | sendnoticetouser(qabot_nick, np, "Syntax: delbot <nick>");\r | |
51 | sendnoticetouser(qabot_nick, np, "Delete a bot.");\r | |
52 | }\r | |
53 | else if (!ircd_strcmp(arg, "adduser")) {\r | |
54 | sendnoticetouser(qabot_nick, np, "Syntax: adduser <nick|#authname> <flags>");\r | |
55 | sendnoticetouser(qabot_nick, np, "Add a user. Flags may consist of:");\r | |
56 | sendnoticetouser(qabot_nick, np, "+a: administrator");\r | |
57 | sendnoticetouser(qabot_nick, np, "+d: developer");\r | |
58 | sendnoticetouser(qabot_nick, np, "+s: staff");\r | |
59 | }\r | |
60 | else if (!ircd_strcmp(arg, "deluser")) {\r | |
61 | sendnoticetouser(qabot_nick, np, "Syntax: deluser <nick|#authname>");\r | |
62 | sendnoticetouser(qabot_nick, np, "Delete a user.");\r | |
63 | }\r | |
64 | else if (!ircd_strcmp(arg, "changelev")) {\r | |
65 | sendnoticetouser(qabot_nick, np, "Syntax: changelev <nick|#authname> <flags>");\r | |
66 | sendnoticetouser(qabot_nick, np, "Change a user's level. Flags may consist of:");\r | |
67 | sendnoticetouser(qabot_nick, np, "+a: administrator");\r | |
68 | sendnoticetouser(qabot_nick, np, "+d: developer");\r | |
69 | sendnoticetouser(qabot_nick, np, "+s: staff");\r | |
70 | }\r | |
71 | else if (!ircd_strcmp(arg, "whois")) {\r | |
72 | sendnoticetouser(qabot_nick, np, "Syntax: whois <nick|#authname>");\r | |
73 | sendnoticetouser(qabot_nick, np, "Display information about a particular user.");\r | |
74 | }\r | |
75 | else if (!ircd_strcmp(arg, "status")) {\r | |
76 | sendnoticetouser(qabot_nick, np, "Syntax: status");\r | |
77 | sendnoticetouser(qabot_nick, np, "Display some status information.");\r | |
78 | }\r | |
79 | else {\r | |
80 | sendnoticetouser(qabot_nick, np, "No such command.");\r | |
81 | return CMD_ERROR;\r | |
82 | }\r | |
83 | \r | |
84 | return CMD_OK;\r | |
85 | }\r |