mirror of https://github.com/nealey/irc-bot
Pass through token too
This commit is contained in:
parent
d07c27135d
commit
e31feafae8
|
@ -6,6 +6,8 @@
|
||||||
|
|
||||||
#include "cgi.h"
|
#include "cgi.h"
|
||||||
|
|
||||||
|
char const *botdir = "/home/neale/bot/zinc";
|
||||||
|
|
||||||
void
|
void
|
||||||
jputchar(char c)
|
jputchar(char c)
|
||||||
{
|
{
|
||||||
|
@ -54,7 +56,9 @@ main(int argc, char *argv[])
|
||||||
setenv("sender", val, true);
|
setenv("sender", val, true);
|
||||||
} else if (0 == strcmp(key, "text")) {
|
} else if (0 == strcmp(key, "text")) {
|
||||||
setenv("text", val, true);
|
setenv("text", val, true);
|
||||||
}
|
} else if (0 == strcmp(key, "token")) {
|
||||||
|
setenv("token", val, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cgi_header("text/json");
|
cgi_header("text/json");
|
||||||
|
@ -66,7 +70,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
setenv("command", "PRIVMSG", true);
|
setenv("command", "PRIVMSG", true);
|
||||||
|
|
||||||
chdir("/home/neale/bot/zinc");
|
chdir(botdir);
|
||||||
{
|
{
|
||||||
FILE *p = popen("./handler", "r");
|
FILE *p = popen("./handler", "r");
|
||||||
int newlines = 0;
|
int newlines = 0;
|
||||||
|
|
Loading…
Reference in New Issue