Loading src/server/actions.c +6 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) } ipc_message_t * event = ipcmsg_create(IPC_EVENT, msg->head.src); event->head.when = msg->head.when; ipcmsg_destination(event, -1); json_t * ej = json_init(NULL); json_addstring(ej, "target", victim_name); Loading @@ -190,12 +191,14 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) _autofree char *buff=NULL; asprintf(&buff,"+%d", gtnum); ipc_message_t *update = ipcmsg_create(IPC_GAG, msg->head.src); update->head.when = msg->head.when; ipcmsg_destination(update, toid); ipcmsg_append(update, buff, strlen(buff)); msg_attach_to_username(update, victim_name); ipcmsg_destroy(update); ipc_message_t *gm = ipcmsg_create(IPC_EVENT, msg->head.src); update->head.when = msg->head.when; json_t * gj = json_init(NULL); json_addstring(gj, "target", victim_name); json_addint(gj, "success", success); Loading @@ -218,6 +221,7 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) if (strcasecmp(command, "ungag")==0) { ipc_message_t * event = ipcmsg_create(IPC_EVENT, msg->head.src); event->head.when = msg->head.when; ipcmsg_destination(event, -1); json_t * ej = json_init(NULL); json_addstring(ej, "target", victim_name); Loading @@ -235,12 +239,14 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) _autofree char *buff=NULL; asprintf(&buff,"-"); ipc_message_t *update = ipcmsg_create(IPC_GAG, msg->head.src); update->head.when = msg->head.when; ipcmsg_destination(update, toid); ipcmsg_append(update, buff, strlen(buff)); msg_attach_to_username(update, victim_name); ipcmsg_destroy(update); ipc_message_t *gm = ipcmsg_create(IPC_EVENT, msg->head.src); update->head.when = msg->head.when; json_t * gj = json_init(NULL); json_addstring(gj, "target", victim_name); json_addint(gj, "success", success); Loading Loading
src/server/actions.c +6 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) } ipc_message_t * event = ipcmsg_create(IPC_EVENT, msg->head.src); event->head.when = msg->head.when; ipcmsg_destination(event, -1); json_t * ej = json_init(NULL); json_addstring(ej, "target", victim_name); Loading @@ -190,12 +191,14 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) _autofree char *buff=NULL; asprintf(&buff,"+%d", gtnum); ipc_message_t *update = ipcmsg_create(IPC_GAG, msg->head.src); update->head.when = msg->head.when; ipcmsg_destination(update, toid); ipcmsg_append(update, buff, strlen(buff)); msg_attach_to_username(update, victim_name); ipcmsg_destroy(update); ipc_message_t *gm = ipcmsg_create(IPC_EVENT, msg->head.src); update->head.when = msg->head.when; json_t * gj = json_init(NULL); json_addstring(gj, "target", victim_name); json_addint(gj, "success", success); Loading @@ -218,6 +221,7 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) if (strcasecmp(command, "ungag")==0) { ipc_message_t * event = ipcmsg_create(IPC_EVENT, msg->head.src); event->head.when = msg->head.when; ipcmsg_destination(event, -1); json_t * ej = json_init(NULL); json_addstring(ej, "target", victim_name); Loading @@ -235,12 +239,14 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg) _autofree char *buff=NULL; asprintf(&buff,"-"); ipc_message_t *update = ipcmsg_create(IPC_GAG, msg->head.src); update->head.when = msg->head.when; ipcmsg_destination(update, toid); ipcmsg_append(update, buff, strlen(buff)); msg_attach_to_username(update, victim_name); ipcmsg_destroy(update); ipc_message_t *gm = ipcmsg_create(IPC_EVENT, msg->head.src); update->head.when = msg->head.when; json_t * gj = json_init(NULL); json_addstring(gj, "target", victim_name); json_addint(gj, "success", success); Loading