Browse Source

mk parsed commands call api functions

pull/3/head
anon 10 months ago
parent
commit
fd5b813644
1 changed files with 16 additions and 3 deletions
  1. +16
    -3
      src/parse.c

+ 16
- 3
src/parse.c View File

@@ -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 <random janny>",
current_username, arg); }
{
ircmsg("%s: Submitting project link '%s' to <random janny>",
current_username, arg);
}
}
free(msgswp);
}