]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
m_nick/m_sasl/m_user: restore check for mixing of client and server protocol
authorSimon Arlott <sa.me.uk>
Wed, 15 Aug 2018 21:44:02 +0000 (22:44 +0100)
committerSimon Arlott <sa.me.uk>
Wed, 15 Aug 2018 21:48:15 +0000 (22:48 +0100)
modules/core/m_nick.c
modules/m_sasl.c
modules/m_user.c

index 0b2481e4501ca3c3a29374fec4f0bbf54519a25f..09d34df852da8131c25065f821e38dad60976c96 100644 (file)
@@ -122,7 +122,7 @@ mr_nick(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
        struct Client *target_p;
        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");
                return;
index 284e4c93ae966ead3a9b715aa2c81693b70f5dbf..c76d6aabe97b0ea795e57efc6e53c1bcbdcb3fa5 100644 (file)
@@ -146,7 +146,7 @@ m_authenticate(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *
                return;
        }
 
-       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");
                return;
index d0360039d9eba11f8a917f13659b6e824884a2db..fc657c9ba62e089cf92a0c2cbf7d03926874be9a 100644 (file)
@@ -63,7 +63,7 @@ mr_user(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_
        static char buf[BUFSIZE];
        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");
                return;