function cycle_active($account) { global $player_data; if (player_ready($account) == False) { return False; } output_map($account); $n = count($player_data[$account]["units"]); if (isset($player_data[$account]["active"]) == False) { $player_data[$account]["active"] = 0; } else { $player_data[$account]["active"] = $player_data[$account]["active"] + 1; if ($player_data[$account]["active"] >= $n) { $player_data[$account]["active"] = 0; } } }
$irciv_data_changed = True; } else { irciv_privmsg("syntax: [~civ] (left|l)"); } break; case "b": case "build": if ($trailing != "") { build_city($account, $trailing); $irciv_data_changed = True; } else { irciv_privmsg("syntax: [~civ] (build|b) City Name"); } break; case "status": if (output_map($account) == True) { status($account, trim($trailing)); } break; case "set": if (player_ready($account) == False) { break; } if ($trailing != "") { $pair = explode("=", $trailing); if (count($pair) == 2) { $key = $pair[0]; $value = $pair[1]; $player_data[$account]["settings"][$key] = $value; $irciv_data_changed = True; irciv_privmsg("key \"{$key}\" set to value \"{$value}\" for player \"{$account}\"");