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"
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue