Fix the account stamp parsing error reported in SF bug #2672922.
authorMichael Poole <mdpoole@troilus.org>
Mon, 21 Sep 2009 01:54:33 +0000 (21:54 -0400)
committerMichael Poole <mdpoole@troilus.org>
Mon, 21 Sep 2009 01:54:33 +0000 (21:54 -0400)
src/proto-p10.c (mod_usermode): Update "word" to skip past account stamps.

src/proto-p10.c

index c4e6696366d635f598aa0c1f77bf590ea50f4baa..9c8862b93ccd96b4b172cda728ab9e585d123dc1 100644 (file)
@@ -2231,10 +2231,11 @@ void mod_usermode(struct userNode *user, const char *mode_change) {
                 if (*word == ':') {
                     ts = strtoul(word + 1, &sep, 10);
                     if (*sep == ':') {
-                        id = strtoul(word + 1, &sep, 10);
+                        id = strtoul(sep + 1, &sep, 10);
                     } else if (*sep != ' ' && *sep != '\0') {
                         ts = 0;
                     }
+                    word = sep;
                 }
                 tag[ii] = '\0';
                 while (*word == ' ')