This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/game/main/account/library/setQuitCountdown.inc

23 lines
462 B
PHP

<?php
class main_account_setQuitCountdown {
function main_account_setQuitCountdown($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'");
}
}
?>