- if (EmptyString(password))
- return need_more_params(cptr, "PASS");
-
- ircd_strncpy(cptr->passwd, password, PASSWDLEN);
- return 0;
-}
-
-#if 0
-/*
- * m_pass
- *
- * parv[0] = sender prefix
- * parv[1] = password
- */
-int m_pass(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
-{
- char *password = parc > 1 ? parv[1] : 0;
+ /* Some clients (brokenly) send "PASS x y" rather than "PASS :x y"
+ * when the user enters "x y" as the password. Unsplit arguments to
+ * work around this.
+ */
+ for (arg = 1, len = 0; arg < parc; ++arg)
+ {
+ ircd_strncpy(password + len, parv[arg], sizeof(password) - len);
+ len += strlen(parv[arg]);
+ password[len++] = ' ';
+ }
+ if (len > 0)
+ --len;
+ password[len] = '\0';