- /* Inform ops and log it */
- if (IsServer(sptr)) {
- sendto_op_mask(SNO_NETWORK, "%s deactivating %sJUPE for %s, expiring at "
- TIME_T_FMT ": %s", sptr->name, JupeIsLocal(jupe) ?
- "local " : "", jupe->ju_server, jupe->ju_expire,
- jupe->ju_reason);
-#ifdef JPATH
- write_log(JPATH, TIME_T_FMT " %s deactivating %sJUPE for %s, expiring at "
- TIME_T_FMT ": %s\n", TStime(), sptr->name, JupeIsLocal(jupe) ?
- "local " : "", jupe->ju_server, jupe->ju_expire,
- jupe->ju_reason);
-#endif /* JPATH */
- } else {
- sendto_op_mask(SNO_NETWORK, "%s deactivating %sJUPE for %s, expiring at "
- TIME_T_FMT ": %s", sptr->user->server->name,
- JupeIsLocal(jupe) ? "local " : "", jupe->ju_server,
- jupe->ju_expire, jupe->ju_reason);
-#ifdef JPATH
- write_log(JPATH, TIME_T_FMT, " %s!%s@%s deactivating %sJUPE for %s, "
- "expiring at " TIME_T_FMT ": %s\n", TStime(), sptr->name,
- sptr->user->username, sptr->user->host, JupeIsLocal(jupe) ?
- "local " : "", jupe->ju_server, jupe->ju_expire,
- jupe->ju_reason);
-#endif /* JPATH */
+ if (!JupeIsLocal(jupe)) {
+ if (flags & JUPE_LOCAL)
+ jupe->ju_flags |= JUPE_LDEACT;
+ else {
+ jupe->ju_flags &= ~JUPE_ACTIVE;
+
+ if (jupe->ju_lastmod >= lastmod) /* force lastmod to increase */
+ jupe->ju_lastmod++;
+ else
+ jupe->ju_lastmod = lastmod;
+ }
+
+ if ((saveflags & JUPE_ACTMASK) != JUPE_ACTIVE)
+ return 0; /* was inactive to begin with */