X-Git-Url: http://git.pk910.de/?p=ircu2.10.12-pk.git;a=blobdiff_plain;f=ircd%2Fm_gline.c;h=18bc31d46fb5a7d98ab55ef1c90697c1c0472e0f;hp=506696a47c7efec90aa71302845364ecec9b9afe;hb=1570a04e15bec6b2945e4351b1e05211aecdcacc;hpb=069994dd27f04b493855949e0d06fce06f210cfe diff --git a/ircd/m_gline.c b/ircd/m_gline.c index 506696a..18bc31d 100644 --- a/ircd/m_gline.c +++ b/ircd/m_gline.c @@ -113,7 +113,7 @@ * but you can't have everything in a macro ;) */ #define abs_expire(exp) \ - ((exp) >= CurrentTime - PASTWATCH ? (exp) : (exp) + CurrentTime) + ((exp) >= TStime() - PASTWATCH ? (exp) : (exp) + TStime()) /* * ms_gline - server message handler @@ -258,13 +258,13 @@ ms_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) "target %s, mask %s, operforce %s, action %c, expire %Tu, " "lastmod %Tu, reason: %s", target, mask, flags & GLINE_OPERFORCE ? "YES" : "NO", - action == GLINE_ACTIVATE ? '+' : '-', expire, CurrentTime, + action == GLINE_ACTIVATE ? '+' : '-', expire, TStime(), reason)); sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s%c%s %Tu %Tu :%s", acptr, flags & GLINE_OPERFORCE ? "!" : "", action == GLINE_ACTIVATE ? '+' : '-', mask, - expire - CurrentTime, CurrentTime, reason); + expire - TStime(), TStime(), reason); return 0; /* all done */ } @@ -423,7 +423,7 @@ mo_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) return need_more_params(sptr, "GLINE"); target = parv[2]; /* get the target... */ - expire = strtol(parv[3], &end, 10) + CurrentTime; /* and the expiration */ + expire = strtol(parv[3], &end, 10) + TStime(); /* and the expiration */ if (*end != '\0') return send_reply(sptr, SND_EXPLICIT | ERR_BADEXPIRE, "%s :Bad expire time", parv[3]); @@ -460,7 +460,7 @@ mo_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) if (parc > 3) { /* get expiration and target */ reason = parv[parc - 1]; - expire = strtol(parv[parc - 2], &end, 10) + CurrentTime; + expire = strtol(parv[parc - 2], &end, 10) + TStime(); if (*end != '\0') return send_reply(sptr, SND_EXPLICIT | ERR_BADEXPIRE, "%s :Bad expire time", parv[parc - 2]); @@ -554,7 +554,7 @@ mo_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) sendcmdto_one(sptr, CMD_GLINE, acptr, "%C %s%c%s %Tu %Tu :%s", acptr, flags & GLINE_OPERFORCE ? "!" : "", action == GLINE_ACTIVATE ? '+' : '-', mask, - expire - CurrentTime, CurrentTime, reason); + expire - TStime(), TStime(), reason); return 0; /* all done */ } @@ -624,14 +624,14 @@ mo_gline(struct Client *cptr, struct Client *sptr, int parc, char *parv[]) if (agline) /* modifying an existing G-line */ return gline_modify(cptr, sptr, agline, action, reason, expire, - CurrentTime, 0, flags); + TStime(), 0, flags); assert(action != GLINE_LOCAL_ACTIVATE); assert(action != GLINE_LOCAL_DEACTIVATE); assert(action != GLINE_MODIFY); /* create a new G-line */ - return gline_add(cptr, sptr, mask, reason, expire, CurrentTime, 0, + return gline_add(cptr, sptr, mask, reason, expire, TStime(), 0, flags | ((action == GLINE_ACTIVATE) ? GLINE_ACTIVE : 0)); }