lwb5-in-2025/scripts/game/main/account/library/setQuitCountdown.inc

23 lines
451 B
PHP

<?php
class main_account_setQuitCountdown {
public function __construct($lib) {
$this->lib = $lib;
$this->db = $this->lib->game->db;
}
function run($uid, $reason) {
$reason = trim(preg_replace('/\s+/', ' ', $reason));
if ($reason == '') {
$rqs = "";
} else {
$rqs = ",reason='" . addslashes($reason) . "'";
}
$this->db->query("UPDATE account SET quit_ts=UNIX_TIMESTAMP(NOW())$rqs WHERE id=$uid AND status='STD'");
}
}
?>