m_nick/m_sasl/m_user: restore check for mixing of client and server protocol

This commit is contained in:
Simon Arlott 2018-08-15 22:44:02 +01:00
parent 28caceba33
commit 3ea954da3a
No known key found for this signature in database
GPG key ID: 49BFFEEFD4C3ED53
3 changed files with 3 additions and 3 deletions

View file

@ -116,7 +116,7 @@ mr_nick(struct Client *client_p, struct Client *source_p, int parc, const char *
struct Client *target_p; struct Client *target_p;
char nick[NICKLEN]; char nick[NICKLEN];
if (strlen(client_p->id) == 3) if (strlen(client_p->id) == 3 || (source_p->preClient && !EmptyString(source_p->preClient->id)))
{ {
exit_client(client_p, client_p, client_p, "Mixing client and server protocol"); exit_client(client_p, client_p, client_p, "Mixing client and server protocol");
return 0; return 0;

View file

@ -116,7 +116,7 @@ m_authenticate(struct Client *client_p, struct Client *source_p,
if(!IsCapable(source_p, CLICAP_SASL)) if(!IsCapable(source_p, CLICAP_SASL))
return 0; return 0;
if (strlen(client_p->id) == 3) if (strlen(client_p->id) == 3 || (source_p->preClient && !EmptyString(source_p->preClient->id)))
{ {
exit_client(client_p, client_p, client_p, "Mixing client and server protocol"); exit_client(client_p, client_p, client_p, "Mixing client and server protocol");
return 0; return 0;

View file

@ -63,7 +63,7 @@ mr_user(struct Client *client_p, struct Client *source_p, int parc, const char *
static char buf[BUFSIZE]; static char buf[BUFSIZE];
char *p; char *p;
if (strlen(client_p->id) == 3) if (strlen(client_p->id) == 3 || (source_p->preClient && !EmptyString(source_p->preClient->id)))
{ {
exit_client(client_p, client_p, client_p, "Mixing client and server protocol"); exit_client(client_p, client_p, client_p, "Mixing client and server protocol");
return 0; return 0;