mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-25 00:43:38 +00:00
Renamed enqueue() to enqueue_output().
This commit is contained in:
parent
b5769aca9b
commit
b8436ddfde
2 changed files with 5 additions and 4 deletions
6
data.c
6
data.c
|
@ -600,8 +600,8 @@ int is_muted(snac *snac, char *actor)
|
|||
}
|
||||
|
||||
|
||||
void enqueue(snac *snac, char *actor, char *msg, int retries)
|
||||
/* enqueues a message for an actor */
|
||||
void enqueue_output(snac *snac, char *actor, char *msg, int retries)
|
||||
/* enqueues an output message for an actor */
|
||||
{
|
||||
if (strcmp(actor, snac->actor) == 0) {
|
||||
snac_debug(snac, 1, xs_str_new("enqueue refused to myself"));
|
||||
|
@ -619,6 +619,7 @@ void enqueue(snac *snac, char *actor, char *msg, int retries)
|
|||
xs *rn = xs_number_new(retries);
|
||||
xs *j;
|
||||
|
||||
qmsg = xs_dict_append(qmsg, "type", "output");
|
||||
qmsg = xs_dict_append(qmsg, "actor", actor);
|
||||
qmsg = xs_dict_append(qmsg, "object", msg);
|
||||
qmsg = xs_dict_append(qmsg, "retries", rn);
|
||||
|
@ -643,7 +644,6 @@ d_char *queue(snac *snac)
|
|||
glob_t globbuf;
|
||||
time_t t = time(NULL);
|
||||
|
||||
/* get the list in reverse order */
|
||||
if (glob(spec, 0, NULL, &globbuf) == 0) {
|
||||
int n;
|
||||
char *p;
|
||||
|
|
3
snac.h
3
snac.h
|
@ -61,7 +61,8 @@ void mute(snac *snac, char *actor);
|
|||
void unmute(snac *snac, char *actor);
|
||||
int is_muted(snac *snac, char *actor);
|
||||
|
||||
void enqueue(snac *snac, char *actor, char *msg, int retries);
|
||||
void enqueue_output(snac *snac, char *actor, char *msg, int retries);
|
||||
|
||||
d_char *queue(snac *snac);
|
||||
d_char *dequeue(snac *snac, char *fn);
|
||||
|
||||
|
|
Loading…
Reference in a new issue