public function Kick($reason = null) { if ($reason != null) { $this->Send(COLOR_KICK, $reason); } Kick($this->id); }
public static function cmdLogin(Player $player, $numparams, $params) { if ($player->account->Authed()) { $player->Send(COLOR_GREEN, '* You are already logged in'); return COMMAND_BREAK; } if ($player->account->data['password'] == md5($params[1])) { $player->Send(COLOR_GREEN, '* Password accepted, welcome to ItalyMafia'); $player->account->Auth(); } else { $player->account->wrongpassAttempts--; if ($player->account->wrongpassAttempts == 0) { $player->Send(COLOR_RED, '* Too many invalid passwords!'); Kick($player->id); } else { $player->Send(COLOR_RED, '* Wrong password!'); } } return COMMAND_BREAK; }