add pi() to !calc, bump to 0.35.3
This commit is contained in:
parent
f6431b02a5
commit
db809715d2
2 changed files with 8 additions and 1 deletions
4
zynk.c
4
zynk.c
|
|
@ -29,7 +29,7 @@ int asprintf(char **, const char *, ...);
|
|||
|
||||
/* ---- constants ---- */
|
||||
|
||||
#define VERSION "0.35.2"
|
||||
#define VERSION "0.35.3"
|
||||
#define DEFAULT_SERVER "irc.libera.chat"
|
||||
#define OPENCODE_BIN "/usr/bin/opencode"
|
||||
#define CLR_RESET "\033[0m"
|
||||
|
|
@ -2583,6 +2583,8 @@ static int cmd_calc(Session *s, const char *msg, const char *reply_target, const
|
|||
}
|
||||
close(in_pipe[0]);
|
||||
close(out_pipe[1]);
|
||||
const char *pidef = "define pi() { return 3.14159265358979323844; }\n";
|
||||
write(in_pipe[1], pidef, strlen(pidef));
|
||||
write(in_pipe[1], rest, strlen(rest));
|
||||
write(in_pipe[1], "\n", 1);
|
||||
close(in_pipe[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue