|
|
@@ -137,6 +137,8 @@ event_channel(irc_session_t * lsession, |
|
|
|
/* (void) channel; */ |
|
|
|
(void) message; |
|
|
|
(void) count; |
|
|
|
/* Logs the message */ |
|
|
|
printf(message); |
|
|
|
/* parses the command */ |
|
|
|
if (*message == PREFIX_COMMAND_CHAR) |
|
|
|
{ current_username = get_username(origin); } |
|
|
@@ -210,7 +212,7 @@ parse_command(char const * cmd) |
|
|
|
char const * const arg = cmd + i; |
|
|
|
printf("argoff: %p; i: %ld; arg: %sEOA\n", cmd + i + 1, i, arg); |
|
|
|
#ifndef NO_VULN_COMMANDS |
|
|
|
if (strncmp(cmd, "raw", i) == 0) |
|
|
|
if (strncmp(cmd, "raw", 3) == 0) |
|
|
|
{ |
|
|
|
printf("RAW\n"); |
|
|
|
/* ircmsg(creds.channel, "%s: Executing SQL `%s'.", current_username, arg); */ |
|
|
@@ -218,13 +220,17 @@ parse_command(char const * cmd) |
|
|
|
ircmsg(creds.channel, msgswp); |
|
|
|
} else |
|
|
|
#endif /* !NO_VULN_COMMANDS */ |
|
|
|
if (strncmp(cmd, "repo", i) == 0) |
|
|
|
if (strncmp(cmd, "repo", 4) == 0) |
|
|
|
{ |
|
|
|
/* ircmsg(creds.channel, "%s: Setting project repository...", current_username); */ |
|
|
|
set_repo(creds.channel, arg); |
|
|
|
msgswp = remind(creds.channel); |
|
|
|
ircmsg(creds.channel, "%s: %s", current_username, msgswp); |
|
|
|
} |
|
|
|
else if (strncmp(cmd, "magic", 5) == 0) |
|
|
|
{ ircmsg(creds.channel, "%s: " IRC_YELLOW "%d" IRC_STOP, current_username, (rand() % atoi(arg)) + 1); } |
|
|
|
else if (strncmp(cmd, "say", 3) == 0) |
|
|
|
{ ircmsg(creds.channel, "%s", arg); } |
|
|
|
} |
|
|
|
free(msgswp); |
|
|
|
} |