get_printable_kline(..) fix
This commit is contained in:
parent
58dfaed919
commit
ad9e4e4095
|
@ -337,8 +337,8 @@ extern struct ConfItem *find_tkline(const char *, const char *, struct sockaddr
|
||||||
extern char *show_iline_prefix(struct Client *, struct ConfItem *, char *);
|
extern char *show_iline_prefix(struct Client *, struct ConfItem *, char *);
|
||||||
extern void get_printable_conf(struct ConfItem *,
|
extern void get_printable_conf(struct ConfItem *,
|
||||||
char **, char **, char **, char **, int *, char **);
|
char **, char **, char **, char **, int *, char **);
|
||||||
extern void get_printable_kline(struct Client *, struct ConfItem *,
|
void get_printable_kline(struct Client *, struct ConfItem *,
|
||||||
char **, char **, char **, char **);
|
const char **, const char **, const char **, const char **);
|
||||||
|
|
||||||
extern void yyerror(const char *);
|
extern void yyerror(const char *);
|
||||||
extern int conf_yy_fatal_error(const char *);
|
extern int conf_yy_fatal_error(const char *);
|
||||||
|
|
30
src/s_conf.c
30
src/s_conf.c
|
@ -1120,21 +1120,21 @@ get_printable_conf(struct ConfItem *aconf, char **name, char **host,
|
||||||
*port = (int) aconf->port;
|
*port = (int) aconf->port;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
get_printable_kline(struct Client *source_p, struct ConfItem *aconf,
|
get_printable_kline(struct Client *source_p, struct ConfItem *aconf,
|
||||||
char **host, char **reason,
|
const char **host, const char **reason,
|
||||||
char **user, char **oper_reason)
|
const char **user, const char **oper_reason)
|
||||||
{
|
{
|
||||||
static char null[] = "<NULL>";
|
static const char *null = "<NULL>";
|
||||||
|
|
||||||
*host = EmptyString(aconf->host) ? null : aconf->host;
|
*host = EmptyString(aconf->host) ? null : aconf->host;
|
||||||
*reason = EmptyString(aconf->passwd) ? null : aconf->passwd;
|
*reason = EmptyString(aconf->passwd) ? null : aconf->passwd;
|
||||||
*user = EmptyString(aconf->user) ? null : aconf->user;
|
*user = EmptyString(aconf->user) ? null : aconf->user;
|
||||||
|
|
||||||
if(EmptyString(aconf->spasswd) || !IsOper(source_p))
|
if(EmptyString(aconf->spasswd) || !IsOper(source_p))
|
||||||
*oper_reason = NULL;
|
*oper_reason = NULL;
|
||||||
else
|
else
|
||||||
*oper_reason = aconf->spasswd;
|
*oper_reason = aconf->spasswd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue