function status_msg($account, $msg, $public) { global $nick; global $player_data; if (isset($player_data[$account]["flags"]["irc_messages"]) == True) { if ($public == False) { notice($nick, $msg); } else { irciv_privmsg($msg); } } if (isset($player_data[$account]["flags"]["logging"]) == True) { file_put_contents(DATA_FILE_PATH . "status_log_" . $account, date("Y-m-d H:i:s", microtime(True)) . " > " . $msg . "\n", FILE_APPEND); } }
$name = $trailing; $player_data[$account]["flags"][$name] = ""; $irciv_data_changed = True; irciv_privmsg("flag \"{$name}\" set for player \"{$account}\""); } else { irciv_privmsg("syntax: [~civ] flag name"); } break; case "unflag": if (player_ready($account) == False) { break; } if ($trailing != "") { $name = $trailing; if (isset($player_data[$account]["flags"][$name]) == True) { unset($player_data[$account]["flags"][$name]); $irciv_data_changed = True; irciv_privmsg("flag \"{$name}\" unset for player \"{$account}\""); } else { irciv_privmsg("flag \"{$name}\" not set for player \"{$account}\""); } } else { irciv_privmsg("syntax: [~civ] unflag name"); } break; } if ($dest != "" and $irciv_data_changed == True) { set_array_bucket($game_data, GAME_BUCKET_PREFIX . $dest); } irc_unpause(); #####################################################################################################