From 3779ed42793ad3e46390033c7e541ac378ab6d38 Mon Sep 17 00:00:00 2001 From: Luna Mendes Date: Fri, 1 Dec 2017 18:10:38 -0300 Subject: [PATCH] add README --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..252f01e --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +memed +======= + +`MEMEwork Daemon` + +Core functions of memed: + + - Communicate with Discord + - Logging what users do on our containers + - Handling the `rsudo` command + - Fucking over users by banning them + +## The protocol + +connect to `log.suck` (unix domain socket). + +### how do send packet + +``` +[L][OP][data : str] + +L = little endian encoding of an unsigned int + Represents the data length + +OP = little endian encoding of an int + OP table soon + +data = the data you're sending +``` + +### give op codes + +``` +When connecting, you receive an OP 0 with `hello` as the data, +make sure you receive that before continuing. + +the only OP code right now is OP 1, which receives a logline, +parses through it and logs it down to Postgres +``` \ No newline at end of file