chiark / gitweb /
Merge disorder.userman branch
[disorder] / server / server.c
index 5e8f2208baffd6cddba8d72034fc81c2afdb1577..e03ff9c3ea1a4c5b935b7f3723eed704ced337ec 100644 (file)
@@ -272,9 +272,8 @@ static int c_remove(struct conn *c, char **vec,
   queue_remove(q, c->who);
   /* De-prepare the track. */
   abandon(c->ev, q);
-  /* If we removed a random track then add another one. */
-  if(q->state == playing_random)
-    add_random_track();
+  /* See about adding a new random track */
+  add_random_track(c->ev);
   /* Prepare whatever the next head track is. */
   if(qhead.next != &qhead)
     prepare(c->ev, qhead.next);
@@ -1154,7 +1153,7 @@ static int c_edituser(struct conn *c,
       /* Update rights for this user */
       rights_type r;
 
-      if(parse_rights(vec[1], &r, 1))
+      if(parse_rights(vec[2], &r, 1))
        for(d = connections; d; d = d->next)
          if(!strcmp(d->who, vec[0]))
            d->rights = r;
@@ -1174,7 +1173,7 @@ static int c_userinfo(struct conn *c,
   const char *value;
 
   /* RIGHT_ADMIN allows anything; otherwise you can only get your own email
-   * address and righst list. */
+   * address and rights list. */
   if((c->rights & RIGHT_ADMIN)
      || (!strcmp(c->who, vec[0])
         && (!strcmp(vec[1], "email")