Make references to channel password lengths consistent.
[ircu2.10.12-pk.git] / ircd / channel.c
index 4cf0ae8443c3badd9caf16cb7685471d9143c65d..ea2d72812673a27510307cef6e9e6e5a6a7918fe 100644 (file)
@@ -2527,7 +2527,7 @@ mode_parse_upass(struct ParseState *state, int *flag_p)
 
   if (state->flags & MODE_PARSE_SET) {
     if (state->dir == MODE_ADD) /* set the new upass */
-      ircd_strncpy(state->chptr->mode.upass, t_str, PASSLEN);
+      ircd_strncpy(state->chptr->mode.upass, t_str, KEYLEN);
     else /* remove the old upass */
       *state->chptr->mode.upass = '\0';
   }
@@ -2635,7 +2635,7 @@ mode_parse_apass(struct ParseState *state, int *flag_p)
   if (state->flags & MODE_PARSE_SET) {
     if (state->dir == MODE_ADD) { /* set the new apass */
       /* Make it VERY clear to the user that this is a one-time password */
-      ircd_strncpy(state->chptr->mode.apass, t_str, PASSLEN);
+      ircd_strncpy(state->chptr->mode.apass, t_str, KEYLEN);
       if (MyUser(state->sptr)) {
        send_reply(state->sptr, RPL_APASSWARN_SET, state->chptr->mode.apass);
        send_reply(state->sptr, RPL_APASSWARN_SECRET, state->chptr->chname,