Pass through token too

This commit is contained in:
Neale Pickett 2014-06-13 04:41:45 +00:00
parent d07c27135d
commit e31feafae8
1 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,8 @@
#include "cgi.h"
char const *botdir = "/home/neale/bot/zinc";
void
jputchar(char c)
{
@ -54,6 +56,8 @@ main(int argc, char *argv[])
setenv("sender", val, true);
} else if (0 == strcmp(key, "text")) {
setenv("text", val, true);
} else if (0 == strcmp(key, "token")) {
setenv("token", val, true);
}
}
@ -66,7 +70,7 @@ main(int argc, char *argv[])
setenv("command", "PRIVMSG", true);
chdir("/home/neale/bot/zinc");
chdir(botdir);
{
FILE *p = popen("./handler", "r");
int newlines = 0;