Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / ircd / m_pass.c
index c436ec8c2ff90fb2ea52b963c17832bf2400c3bd..5dee35bcf129bcb43e261630d503a8b57685991d 100644 (file)
@@ -114,7 +114,7 @@ int mr_pass(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
        /* Do something here */
   }
 #endif
-  ircd_strncpy(cptr->passwd, password, PASSWDLEN);
+  ircd_strncpy(cli_passwd(cptr), password, PASSWDLEN);
   return 0;
 }
 
@@ -137,6 +137,10 @@ int m_pass(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
     sendto_one(cptr, err_str(ERR_ALREADYREGISTRED), me.name, parv[0]); /* XXX DEAD */
     return 0;
   }
+  if (ircd_strcmp("PROTO",password)) {
+       proto_send_supported(sptr);
+       return 0;
+  }
   ircd_strncpy(cptr->passwd, password, PASSWDLEN);
   return 0;
 }