Fix some compile warnings.

This commit is contained in:
B.Greenham 2010-03-18 12:32:42 -04:00
parent 29b3f2e4e5
commit 2c0c690444
2 changed files with 11 additions and 9 deletions

View File

@ -6,7 +6,7 @@
#include "numeric.h"
#include "hash.h"
void mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
static int mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
struct Message oaccept_msgtab = {
"OACCEPT", 0, 0, 0, MFLG_SLOW,
@ -17,7 +17,7 @@ mapi_clist_av1 oaccept_clist[] = { &oaccept_msgtab, NULL };
DECLARE_MODULE_AV1(oaccept, NULL, NULL, oaccept_clist, NULL, NULL, "$Id $");
void
static int
mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
struct Metadata *md;
@ -28,7 +28,7 @@ mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const cha
if(!(target_p = find_client(parv[1])))
{
sendto_one(source_p, form_str(ERR_NOSUCHNICK), parv[1]);
return;
return 0;
}
rb_sprintf(text, "O%s", source_p->id);
@ -40,7 +40,7 @@ mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const cha
if(!strcmp(md->value, "OACCEPT") && !strcmp(md->name, text))
{
sendto_one_notice(source_p, ":You're already on %s's OACCEPT list", target_p->name);
return;
return 0;
}
}
@ -54,4 +54,5 @@ mo_oaccept(struct Client *client_p, struct Client *source_p, int parc, const cha
":%s WALLOPS :OACCEPT called for %s by %s!%s@%s",
me.name, target_p->name, source_p->name, source_p->username,
source_p->host);
return 0;
}

View File

@ -17,7 +17,7 @@
#include "whowas.h"
#include "monitor.h"
void me_metadata(struct Client *, struct Client *, int, const char **);
static int me_metadata(struct Client *, struct Client *, int, const char **);
struct Message metadata_msgtab = {
"METADATA", 0, 0, 0, MFLG_SLOW,
@ -30,7 +30,7 @@ mapi_clist_av1 metadata_clist[] = {
DECLARE_MODULE_AV1(metadata, NULL, NULL, metadata_clist, NULL, NULL, "$Revision$");
void
static int
me_metadata(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
{
if(parv[2][0] == '#')
@ -38,7 +38,7 @@ me_metadata(struct Client *client_p, struct Client *source_p, int parc, const ch
struct Channel *chptr;
if((chptr = find_channel(parv[2])) == NULL)
return;
return 0;
if(!strcmp(parv[1], "ADD") && parv[4] != NULL)
channel_metadata_add(chptr, parv[3], parv[4], 0);
@ -51,14 +51,15 @@ me_metadata(struct Client *client_p, struct Client *source_p, int parc, const ch
struct Client *target_p;
if((target_p = find_id(parv[2])) == NULL)
return;
return 0;
if(!target_p->user)
return;
return 0;
if(!strcmp(parv[1], "ADD") && parv[4] != NULL)
user_metadata_add(target_p, parv[3], parv[4], 0);
if(!strcmp(parv[1], "DELETE") && parv[3] != NULL)
user_metadata_delete(target_p, parv[3], 0);
}
return 0;
}