PDA

View Full Version : Banning players


SubSonic
26.11.2005, 08:49
Hey,

first of all, i am sry if this question sounds stupid somehow but is there a way to ban a player from within the game? Maybe with a time until the ban should exist?

Actually i am banning people through the database. But querying the databse while players are online causes hughe lags so i am curious if there's another way.

Thanks in advance,
Sub

GMan
26.11.2005, 09:03
As far as i know, you cant from with in the game but you can telnet to the cacheD server and send

Ban
39<tab>charName<tab>banHour<enter>

Delete Char
34<tab>charName<enter>

hope this helps you

SubSonic
26.11.2005, 09:13
Will try it :) Thanks alot

eXcursion
26.11.2005, 17:39
try peer guardian on ur server it blocks ips from seeing the server just debug character u wish to ban write down ip add to peer guardian and use the regular l2admin to ban they will have to change ip to see server again

toolpunk
26.11.2005, 18:05
thats probably why proxy servers were invented XD
however i find this info quite useful.
thx :)

elsedar
27.11.2005, 07:53
Good idea to use l2admin or l2zsystem(Zachar's edition)
l2zsystem is more interesting and usefull that corean l2admin.
so use search to find links on l2zsystem.
it's on PHP

SubSonic
27.11.2005, 19:20
Hmm .... search won't bring up any result for l2zsytem nor google do.

Do you have any link for us?

Thanks in advance,
Sub

Muroff
26.06.2007, 16:15
yea? pleees links? or where by it?

l2serverfull
26.06.2007, 23:46
i have full system l2zsytem for server off
:D

LethaL
27.06.2007, 01:36
I'm pretty sure //stoplogin works to ban a player from ingame, Don't think it works for permanent bans, Not sure if it only bans the char or the whole account. Don't really have any experience from that command but it's worth a try imo.

Drag
27.06.2007, 10:34
Thats what I use to ban (using character name)

$name=$_POST['name'];
$char_id=GetCharID($name); //function to get char_id using nick
echo 'Kicking character <b>'.$name.'</b>:'.KickCharacterPacket($char_id).'<br>'; //cached function
$result=mssql_query("SELECT account_name FROM user_data WHERE char_id='$char_id'");
$r=mssql_fetch_array($result);
if($r[account_name]){
$account=$r[account_name];
echo'Ban account <b>'.$account.'</b>.';
mssql_select_db ($mssql_lin2db);
mssql_query("UPDATE user_account SET block_flag2='1' WHERE account='$account'");
mssql_select_db ($mssql_lin2world);}

It doesnt make any lags at all... cant.

Guaresnay
27.06.2007, 14:42
<?
function DisableCharacterPacket($char_id, $status){
include("config.php"); // which include cached info
$buf=pack("cVV",20,$char_id,$status).tounicode("admin");
$cachedsocket=@fsockopen($cached['host'],$cached['port'],$errno,$errstr,1) or die($notconnected);
fwrite($cachedsocket,pack("s",(strlen($buf)+2)).$buf);
$len=unpack("v",fread($cachedsocket,2));
$rid=unpack("c",fread($cachedsocket,1));
for($i=0;$i<(($len[1]-4)/4);$i++){
$read=unpack("i",fread($cachedsocket,4));$rs.=$read[1];
}
fclose($cachedsocket);
return GetError($rs); // GetError func is the errors array
}
?>


:)

rayovac
28.06.2007, 10:03
You need command for Ban in MSSQL server?


Open Lin2World and:

BAN
update lin2db.dbo.user_account set warn_flag = 1, block_flag = 1, block_flag2 = 1, block_end_date = '2029-08-12 19:49:xx.xx0'where account = 'ACC';

UNBAN
update lin2db.dbo.user_account set warn_flag = 0, block_flag = 0, block_flag2 = 0, block_end_date = null
where account = 'ACC';

Drag
01.07.2007, 12:13
block_flag - ban without confirm
block_flag2 - ownage ;)
warn_flag - nothing?

You can also use pay_stat xD This may be used with editing client .dat as email confirmation.

m4rk
01.07.2007, 12:55
different block_flag == different client side message
You can like that ban for a reason :D