From fd5b813644bffe8d68b7ca94910955ec6d673bc4 Mon Sep 17 00:00:00 2001 From: anon Date: Thu, 3 Aug 2023 12:43:03 +0200 Subject: [PATCH] mk parsed commands call api functions --- src/parse.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/parse.c b/src/parse.c index 09b21a3..122060d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -65,7 +65,11 @@ parse_command(char * cmd) else if (strcmp(cmd, "next") == 0) { ircmsg("%s: No future assignments", current_username); } else if (strcmp(cmd, "dump") == 0) - { ircmsg("%s: All projects", current_username); } + { + ircmsg("%s: All projects:", current_username); + msgswp = dump(); + ircmsg(msgswp); + } else if (strcmp(cmd, "reroll") == 0) { ircmsg("%s: No more rerolls possible", current_username); } } @@ -80,9 +84,18 @@ parse_command(char * cmd) msgswp = raw(arg); ircmsg(msgswp); } + else if (strcmp(cmd, "set_repo") == 0) + { + ircmsg("%s: Setting project repository...", current_username); + set_repo(creds.channel, arg); + msgswp = remind(creds.channel); + ircmsg("%s: %s", current_username, msgswp); + } else if (strcmp(cmd, "submit") == 0) - { ircmsg("%s: Submitting project link '%s' to ", - current_username, arg); } + { + ircmsg("%s: Submitting project link '%s' to ", + current_username, arg); + } } free(msgswp); }