Merge pull request #338 from edk0/kline-zero
m_kline: insert a safety zero early
This commit is contained in:
commit
17698ba0d1
1 changed files with 7 additions and 1 deletions
|
@ -99,7 +99,7 @@ mo_kline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
{
|
{
|
||||||
char def[] = "No Reason";
|
char def[] = "No Reason";
|
||||||
char user[USERLEN + 2];
|
char user[USERLEN + 2];
|
||||||
char host[HOSTLEN + 2];
|
char host_buf[HOSTLEN + 3], *host = host_buf + 1;
|
||||||
char *reason = def;
|
char *reason = def;
|
||||||
char *oper_reason;
|
char *oper_reason;
|
||||||
const char *target_server = NULL;
|
const char *target_server = NULL;
|
||||||
|
@ -123,6 +123,12 @@ mo_kline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source
|
||||||
if(find_user_host(source_p, parv[loc], user, host) == 0)
|
if(find_user_host(source_p, parv[loc], user, host) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (*host == ':')
|
||||||
|
{
|
||||||
|
host--;
|
||||||
|
*host = '0';
|
||||||
|
}
|
||||||
|
|
||||||
loc++;
|
loc++;
|
||||||
|
|
||||||
if(parc >= loc + 2 && !irccmp(parv[loc], "ON"))
|
if(parc >= loc + 2 && !irccmp(parv[loc], "ON"))
|
||||||
|
|
Loading…
Reference in a new issue