mirror of
https://github.com/EnergyMech/energymech.git
synced 2025-12-17 15:36:50 +00:00
debug count server input
This commit is contained in:
parent
31900f1b2c
commit
90c0cc7ec1
@ -1404,6 +1404,7 @@ int wrap_debug(void)
|
|||||||
dodebug = TRUE;
|
dodebug = TRUE;
|
||||||
|
|
||||||
run_debug();
|
run_debug();
|
||||||
|
parse_server_input(NULL);
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
debug_fd = backup_fd;
|
debug_fd = backup_fd;
|
||||||
|
|||||||
21
src/parse.c
21
src/parse.c
@ -1369,11 +1369,12 @@ void parse_005(char *from, char *rest)
|
|||||||
#define NEEDFROM 1
|
#define NEEDFROM 1
|
||||||
#define DROPONE 2
|
#define DROPONE 2
|
||||||
|
|
||||||
LS const struct
|
struct ParseFunctions
|
||||||
{
|
{
|
||||||
uint32_t hash;
|
const uint32_t hash;
|
||||||
short flags;
|
const short flags;
|
||||||
void (*func)(char *, char *);
|
const void (*func)(char *, char *);
|
||||||
|
int hits;
|
||||||
|
|
||||||
} pFuncs[] =
|
} pFuncs[] =
|
||||||
{
|
{
|
||||||
@ -1465,6 +1466,17 @@ void parse_server_input(char *rest)
|
|||||||
uint32_t cmdhash;
|
uint32_t cmdhash;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
if (rest == NULL)
|
||||||
|
{
|
||||||
|
for(i=0;pFuncs[i].hash;i++)
|
||||||
|
{
|
||||||
|
debug("[PsI] (%i) hash %X: hits %i\n",i,pFuncs[i].hash,pFuncs[i].hits);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif /* DEBUG */
|
||||||
|
|
||||||
if (current->spy & (SPYF_RAWIRC|SPYF_RANDSRC))
|
if (current->spy & (SPYF_RAWIRC|SPYF_RANDSRC))
|
||||||
send_spy(SPYSTR_RAWIRC,rest);
|
send_spy(SPYSTR_RAWIRC,rest);
|
||||||
|
|
||||||
@ -1530,6 +1542,7 @@ void parse_server_input(char *rest)
|
|||||||
return;
|
return;
|
||||||
if (pFuncs[i].flags & DROPONE)
|
if (pFuncs[i].flags & DROPONE)
|
||||||
chop(&rest); /* discard one argument (usually bot nick) */
|
chop(&rest); /* discard one argument (usually bot nick) */
|
||||||
|
pFuncs[i].hits++;
|
||||||
pFuncs[i].func(from,rest);
|
pFuncs[i].func(from,rest);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user