m_testline: Complain on formerly-silent failures

This commit is contained in:
Ed Kellett 2020-10-22 21:17:10 +01:00
parent f6b5e5382e
commit 3dcaa851f4

View file

@ -117,8 +117,11 @@ mo_testline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou
mask = p; mask = p;
if(EmptyString(mask)) if(EmptyString(mask))
{
sendto_one_notice(source_p, "Invalid syntax for TESTLINE");
return; return;
} }
}
if((p = strchr(mask, '@'))) if((p = strchr(mask, '@')))
{ {
@ -127,8 +130,11 @@ mo_testline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *sou
host = p; host = p;
if(EmptyString(host)) if(EmptyString(host))
{
sendto_one_notice(source_p, "Invalid syntax for TESTLINE");
return; return;
} }
}
else else
host = mask; host = mask;
@ -269,8 +275,11 @@ mo_testkline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *so
mask = p + 1; mask = p + 1;
if(EmptyString(mask)) if(EmptyString(mask))
{
sendto_one_notice(source_p, "Invalid syntax for TESTKLINE");
return; return;
} }
}
if ((p = strchr(mask, '@'))) if ((p = strchr(mask, '@')))
{ {
@ -279,8 +288,11 @@ mo_testkline(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *so
host = p; host = p;
if(EmptyString(host)) if(EmptyString(host))
{
sendto_one_notice(source_p, "Invalid syntax for TESTKLINE");
return; return;
} }
}
else else
{ {
host = mask; host = mask;