Remove unused kill_timer() and get_delete_timer() functions
These functions are completely unused. Also remove the TimerList.delete member that is only used by these functions.
This commit is contained in:
parent
5bd8a40cf8
commit
604fcf794b
|
@ -1038,7 +1038,7 @@ typedef struct timerlist_stru
|
|||
struct timerlist_stru *next;
|
||||
char ref[REFNUM_MAX + 1];
|
||||
unsigned long refno;
|
||||
struct timeval time;
|
||||
struct timeval time;
|
||||
int (*callback) (void *, char *);
|
||||
char *command;
|
||||
char *subargs;
|
||||
|
@ -1047,7 +1047,6 @@ struct timeval time;
|
|||
int server;
|
||||
int window;
|
||||
char *whom;
|
||||
int delete;
|
||||
} TimerList;
|
||||
|
||||
typedef struct nicktab_stru
|
||||
|
|
|
@ -10,8 +10,6 @@ extern void timercmd (char *, char *, char *, char *);
|
|||
extern void ExecuteTimers (void);
|
||||
extern char *BX_add_timer (int, char *, double, long, int (*) (void *, char *), char *, char *, int, char *);
|
||||
extern int BX_delete_timer (char *);
|
||||
extern int get_delete_timer(char *);
|
||||
extern int kill_timer(char *);
|
||||
extern void BX_delete_all_timers (void);
|
||||
extern int timer_exists (char *ref);
|
||||
|
||||
|
|
|
@ -247,14 +247,6 @@ extern void ExecuteTimers (void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (current && current->delete)
|
||||
{
|
||||
if (!current->callback)
|
||||
new_free(¤t->command);
|
||||
new_free(¤t->subargs);
|
||||
new_free(¤t->whom);
|
||||
new_free(¤t);
|
||||
}
|
||||
}
|
||||
parsingtimer = 0;
|
||||
}
|
||||
|
@ -376,34 +368,6 @@ extern int BX_delete_timer (char *ref)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int kill_timer(char *ref)
|
||||
{
|
||||
TimerList *tmp;
|
||||
for (tmp = PendingTimers; tmp; tmp = tmp->next)
|
||||
{
|
||||
/* can only delete user created timers */
|
||||
if (!my_stricmp(tmp->ref, ref))
|
||||
{
|
||||
tmp->delete = 1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int get_delete_timer(char *ref)
|
||||
{
|
||||
TimerList *tmp;
|
||||
for (tmp = PendingTimers; tmp; tmp = tmp->next)
|
||||
{
|
||||
/* can only delete user created timers */
|
||||
if (!my_stricmp(tmp->ref, ref))
|
||||
return tmp->delete;
|
||||
}
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
void BX_delete_all_timers (void)
|
||||
{
|
||||
while (PendingTimers)
|
||||
|
|
Loading…
Reference in New Issue