It compiles, ship it.
This commit is contained in:
parent
8ac7552983
commit
90187f2112
5 changed files with 6 additions and 8 deletions
|
@ -60,7 +60,7 @@ struct MessageEntry
|
||||||
/* Message table structure */
|
/* Message table structure */
|
||||||
struct Message
|
struct Message
|
||||||
{
|
{
|
||||||
const char *cmd;
|
char *cmd;
|
||||||
unsigned int count; /* number of times command used */
|
unsigned int count; /* number of times command used */
|
||||||
unsigned int rcount; /* number of times command used by server */
|
unsigned int rcount; /* number of times command used by server */
|
||||||
unsigned long bytes; /* bytes received for this message */
|
unsigned long bytes; /* bytes received for this message */
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#ifndef INCLUDED_parse_h_h
|
#ifndef INCLUDED_parse_h_h
|
||||||
#define INCLUDED_parse_h_h
|
#define INCLUDED_parse_h_h
|
||||||
|
|
||||||
|
#include "irc_dictionary.h"
|
||||||
#include "tools.h"
|
#include "tools.h"
|
||||||
|
|
||||||
struct Message;
|
struct Message;
|
||||||
|
|
|
@ -1619,7 +1619,7 @@ conf_end_alias(struct TopConf *tc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!alias_dict)
|
if (!alias_dict)
|
||||||
alias_dict = irc_dictionary_create(alias_dict);
|
alias_dict = irc_dictionary_create(strcasecmp);
|
||||||
|
|
||||||
irc_dictionary_add(alias_dict, yy_alias->name, yy_alias);
|
irc_dictionary_add(alias_dict, yy_alias->name, yy_alias);
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,6 @@ static void do_alias(struct alias_entry *, struct Client *, char *);
|
||||||
|
|
||||||
static int handle_command(struct Message *, struct Client *, struct Client *, int, const char**);
|
static int handle_command(struct Message *, struct Client *, struct Client *, int, const char**);
|
||||||
|
|
||||||
static int cmd_hash(const char *p);
|
|
||||||
|
|
||||||
static char buffer[1024];
|
static char buffer[1024];
|
||||||
|
|
||||||
/* turn a string into a parc/parv pair */
|
/* turn a string into a parc/parv pair */
|
||||||
|
@ -218,7 +216,7 @@ parse(struct Client *client_p, char *pbuffer, char *bufend)
|
||||||
if((s = strchr(ch, ' ')))
|
if((s = strchr(ch, ' ')))
|
||||||
*s++ = '\0';
|
*s++ = '\0';
|
||||||
|
|
||||||
mptr = irc_dictionary_retrieve(cmd_dict, mptr);
|
mptr = irc_dictionary_retrieve(cmd_dict, ch);
|
||||||
|
|
||||||
/* no command or its encap only, error */
|
/* no command or its encap only, error */
|
||||||
if(!mptr || !mptr->cmd)
|
if(!mptr || !mptr->cmd)
|
||||||
|
@ -475,7 +473,7 @@ report_messages(struct Client *source_p)
|
||||||
struct Message *msg;
|
struct Message *msg;
|
||||||
struct alias_entry *amsg;
|
struct alias_entry *amsg;
|
||||||
|
|
||||||
IRC_DICTIONARY_FOREACH(msg, &iter, cmd_dict)
|
DICTIONARY_FOREACH(msg, &iter, cmd_dict)
|
||||||
{
|
{
|
||||||
s_assert(msg->cmd != NULL);
|
s_assert(msg->cmd != NULL);
|
||||||
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
||||||
|
@ -484,7 +482,7 @@ report_messages(struct Client *source_p)
|
||||||
msg->bytes, msg->rcount);
|
msg->bytes, msg->rcount);
|
||||||
}
|
}
|
||||||
|
|
||||||
IRC_DICTIONARY_FOREACH(amsg, &iter, alias_dict)
|
DICTIONARY_FOREACH(amsg, &iter, alias_dict)
|
||||||
{
|
{
|
||||||
s_assert(amsg->name != NULL);
|
s_assert(amsg->name != NULL);
|
||||||
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
sendto_one_numeric(source_p, RPL_STATSCOMMANDS,
|
||||||
|
|
|
@ -1225,7 +1225,6 @@ clear_out_old_conf(void)
|
||||||
struct Class *cltmp;
|
struct Class *cltmp;
|
||||||
dlink_node *ptr;
|
dlink_node *ptr;
|
||||||
dlink_node *next_ptr;
|
dlink_node *next_ptr;
|
||||||
int i;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* don't delete the class table, rather mark all entries
|
* don't delete the class table, rather mark all entries
|
||||||
|
|
Loading…
Reference in a new issue