implemented !help

This commit is contained in:
anon 2023-08-03 18:04:53 +02:00
parent 6dc73611a6
commit df85615460
2 changed files with 15 additions and 0 deletions

10
include/help.h Normal file
View File

@ -0,0 +1,10 @@
DECL const char help_msg[] =
IRC_COLOR_GREEN "!help " IRC_COLOR_TERMINATE " : this message\n"
IRC_COLOR_GREEN "!remind " IRC_COLOR_TERMINATE " : dump current assignment\n"
IRC_COLOR_GREEN "!reroll " IRC_COLOR_TERMINATE " : terminate current assignment early and get a new\n"
IRC_COLOR_GREEN "!set_repo <link>" IRC_COLOR_TERMINATE " : set project repository link (to be dumped on remind)\n"
IRC_COLOR_GREEN "!raw <sql> " IRC_COLOR_TERMINATE " : execute raw sql, so add/delete is covered without retarded interfaces\n"
IRC_COLOR_GREEN "!dump " IRC_COLOR_TERMINATE " : list all possible projects\n"
IRC_COLOR_GREEN "!request " IRC_COLOR_TERMINATE " : request personal project\n"
IRC_COLOR_GREEN "!remind " IRC_COLOR_TERMINATE " : dump the users current personal assignment\n"
;

View File

@ -23,6 +23,7 @@
#include "parse.h"
#include "error.h"
#include "help.h"
#define PARAMS_COUNT 5
@ -66,6 +67,10 @@ parse_command(char * cmd)
// XXX: maybe no?
//else if (strcmp(cmd, "next") == 0) // TODO: implement
//{ ircmsg("%s: No future assignments", current_username); }
else if (strcmp(cmd, "help") == 0)
{
ircmsg(help_msg);
}
else if (strcmp(cmd, "dump") == 0)
{
ircmsg("%s: All projects:", current_username);