/[svn]/hopm/trunk/src/opercmd.c
ViewVC logotype

Diff of /hopm/trunk/src/opercmd.c

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

revision 9861 by michael, Wed Jan 1 10:03:28 2020 UTC revision 9862 by michael, Sat Jan 2 18:39:00 2021 UTC
# Line 35  Line 35 
35  #include "scan.h"  #include "scan.h"
36  #include "memory.h"  #include "memory.h"
37  #include "stats.h"  #include "stats.h"
38    #include "opm_gettime.h"
39    
40    
41  static list_t COMMANDS;  /* List of active commands */  static list_t COMMANDS;  /* List of active commands */
# Line 108  command_create(const struct OperCommandH Line 109  command_create(const struct OperCommandH
109    command->tab = tab;    command->tab = tab;
110    command->irc_nick = xstrdup(irc_nick);    command->irc_nick = xstrdup(irc_nick);
111    command->target = target;    command->target = target;
112      command->added = opm_gettime();
   time(&command->added);  
113    
114    return command;    return command;
115  }  }
# Line 226  command_timer(void) Line 226  command_timer(void)
226  {  {
227    static unsigned int interval;    static unsigned int interval;
228    node_t *node, *node_next;    node_t *node, *node_next;
229    time_t present;    time_t present = opm_gettime();
230    
231    /* Only perform command removal every OptionsItem.command_interval seconds */    /* Only perform command removal every OptionsItem.command_interval seconds */
232    if (interval++ < OptionsItem.command_interval)    if (interval++ < OptionsItem.command_interval)
# Line 234  command_timer(void) Line 234  command_timer(void)
234    else    else
235      interval = 0;      interval = 0;
236    
   time(&present);  
   
237    LIST_FOREACH_SAFE(node, node_next, COMMANDS.head)    LIST_FOREACH_SAFE(node, node_next, COMMANDS.head)
238    {    {
239      struct Command *command = node->data;      struct Command *command = node->data;

Legend:
Removed from v.9861  
changed lines
  Added in v.9862

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