Skip to content

Commit

Permalink
Merge pull request #122 from retropc/jupes
Browse files Browse the repository at this point in the history
jupes: fix max expires and expiry bugs in commands
  • Loading branch information
retropc authored Aug 10, 2023
2 parents d374672 + de082ed commit 1c92b8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jupe/jupe.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ typedef struct jupe_s {

extern jupe_t *jupes;

#define JUPE_MAX_EXPIRE 6048000
#define JUPE_MAX_EXPIRE 604800

#define JUPE_ACTIVE 0x0001

Expand Down
6 changes: 6 additions & 0 deletions jupe/jupe_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ int ju_addjupe(void *source, int cargc, char **cargv) {
return CMD_USAGE;
}

jupe_expire();

if (jupe_find(cargv[0]) != NULL) {
controlreply(np, "There is already a jupe for that server.");
return CMD_OK;
Expand Down Expand Up @@ -44,6 +46,8 @@ int ju_activatejupe(void *source, int cargc, char **cargv) {
return CMD_USAGE;
}

jupe_expire();

jupe = jupe_find(cargv[0]);

if (jupe == NULL) {
Expand Down Expand Up @@ -72,6 +76,8 @@ int ju_deactivatejupe(void *source, int cargc, char **cargv) {
return CMD_USAGE;
}

jupe_expire();

jupe = jupe_find(cargv[0]);

if (jupe == NULL) {
Expand Down

0 comments on commit 1c92b8d

Please sign in to comment.