Do not accept NICK on server ports.
[ircu2.10.12-pk.git] / ircd / m_nick.c
index 2ac4fe88ab8efb2e15cfd907209ac3c823199ca0..b1fa7fd8da82005882cafbfd96a09921959b5170 100644 (file)
@@ -151,6 +151,9 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   assert(0 != cptr);
   assert(cptr == sptr);
 
+  if (IsServerPort(cptr))
+    return exit_client(cptr, cptr, &me, "Use a different port");
+
   /*
    * parv[0] will be empty for clients connecting for the first time
    */
@@ -160,6 +163,7 @@ int m_nick(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
     send_reply(sptr, ERR_NONICKNAMEGIVEN);
     return 0;
   }
+
   /*
    * Don't let them send make us send back a really long string of
    * garbage