+
+ /*
+ * Create the administrator account. It's ok if the command fails if this user already exists.
+ */
+ progress(activity, NUM_CONFIGS+1, NUM_CONFIGS+3);
+ snprintf(buf, sizeof buf, "CREU %s|%s", configs[13], admin_pass);
+ serv_puts(buf);
+ progress(activity, NUM_CONFIGS+2, NUM_CONFIGS+3);
+ serv_gets(buf);
+ progress(activity, NUM_CONFIGS+3, NUM_CONFIGS+3);
+
+ /*
+ * Assign the desired password and access level to the administrator account.
+ */
+ snprintf(buf, sizeof buf, "AGUP %s", configs[13]);
+ serv_puts(buf);
+ serv_gets(buf);
+ if (buf[0] == '2') {
+ int admin_flags = extract_int(&buf[4], 2);
+ int admin_times_called = extract_int(&buf[4], 3);
+ int admin_msgs_posted = extract_int(&buf[4], 4);
+ snprintf(buf, sizeof buf, "ASUP %s|%s|%d|%d|%d|6",
+ configs[13], admin_pass, admin_flags, admin_times_called, admin_msgs_posted
+ );
+ serv_puts(buf);
+ serv_gets(buf);
+ }