/[svn]/ircd-hybrid/branches/8.2.x/src/client.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/src/client.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8905 by michael, Sun Feb 3 01:12:37 2019 UTC revision 8906 by michael, Sun Apr 21 21:17:15 2019 UTC
# Line 1091  client_get_idle_time(const struct Client Line 1091  client_get_idle_time(const struct Client
1091    const struct ClassItem *const class = class_get_ptr(&target_p->connection->confs);    const struct ClassItem *const class = class_get_ptr(&target_p->connection->confs);
1092    
1093    if (!(class->flags & CLASS_FLAGS_FAKE_IDLE) || target_p == source_p)    if (!(class->flags & CLASS_FLAGS_FAKE_IDLE) || target_p == source_p)
1094      return CurrentTime - target_p->connection->last_privmsg;      return event_base->time.sec_monotonic - target_p->connection->last_privmsg;
1095    
1096    if (HasUMode(source_p, UMODE_OPER) &&    if (HasUMode(source_p, UMODE_OPER) &&
1097        !(class->flags & CLASS_FLAGS_HIDE_IDLE_FROM_OPERS))        !(class->flags & CLASS_FLAGS_HIDE_IDLE_FROM_OPERS))
1098      return CurrentTime - target_p->connection->last_privmsg;      return event_base->time.sec_monotonic - target_p->connection->last_privmsg;
1099    
1100    const unsigned int min_idle = class->min_idle;    const unsigned int min_idle = class->min_idle;
1101    const unsigned int max_idle = class->max_idle;    const unsigned int max_idle = class->max_idle;
# Line 1106  client_get_idle_time(const struct Client Line 1106  client_get_idle_time(const struct Client
1106    if (class->flags & CLASS_FLAGS_RANDOM_IDLE)    if (class->flags & CLASS_FLAGS_RANDOM_IDLE)
1107      idle = genrand_int32();      idle = genrand_int32();
1108    else    else
1109      idle = CurrentTime - target_p->connection->last_privmsg;      idle = event_base->time.sec_monotonic - target_p->connection->last_privmsg;
1110    
1111    if (max_idle)    if (max_idle)
1112      idle %= max_idle;      idle %= max_idle;

Legend:
Removed from v.8905  
changed lines
  Added in v.8906

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28