Fix SF#1704419 by properly hiding hidden ports.
[ircu2.10.12-pk.git] / ircd / m_burst.c
index f82de0e51b36d167e5011849dacc5a04c807f60a..e95a0696971eaf43f9f6c2984602073c7f974e40 100644 (file)
@@ -469,6 +469,14 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
                    current_mode_needs_reset = 0;
                  }
                  current_mode = (current_mode & ~(CHFL_DEOPPED | CHFL_DELAYED)) | CHFL_CHANOP;
+                  /*
+                   * Older servers may send XXYYY:ov, in which case we
+                   * do not want to use the code for 'v' below.
+                   */
+                  if (ptr[1] == 'v') {
+                    current_mode |= CHFL_VOICE;
+                    ptr++;
+                  }
                }
                else if (*ptr == 'v') { /* has voice status */
                  if (current_mode_needs_reset) {
@@ -478,7 +486,7 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
                  current_mode = (current_mode & ~CHFL_DELAYED) | CHFL_VOICE;
                  oplevel = -1; /* subsequent digits are an absolute op-level value. */
                 }
-               else if (isdigit(*ptr)) {
+               else if (IsDigit(*ptr)) {
                  int level_increment = 0;
                  if (oplevel == -1) { /* op-level is absolute value? */
                    if (current_mode_needs_reset) {
@@ -490,7 +498,7 @@ int ms_burst(struct Client *cptr, struct Client *sptr, int parc, char *parv[])
                  current_mode = (current_mode & ~(CHFL_DEOPPED | CHFL_DELAYED)) | CHFL_CHANOP;
                  do {
                    level_increment = 10 * level_increment + *ptr++ - '0';
-                 } while(isdigit(*ptr));
+                 } while (IsDigit(*ptr));
                  oplevel += level_increment;
                }
                else /* I don't recognize that flag */