View Full Version : How autoclear online players
I get list of online players by query
select char_name from user_data where login>logout
where I should inject this query:
update user_data set logout=login where login>logout
to clear online status after server crash?
I try it in lin_loadItems, lin_LoadNpcBoss. But 1st procedure calls many times during server works, and second may exec and may not exec. Also I tried this query in lin_LoadAgitAll. But without success. Please tell me what stored procedure calls once this server starting.
Firedaemon
22.11.2005, 01:46
Upon the l2server crash, you should have cached auto restart. Then you can make the additional sql query from the auto clear unowned items.
not items, player logout time
<rus>
когда cached запускается - он выполняет процедуру clear unowned items дык вот - в нее сунь свой запрос и при старте cached у тебя количество онлайна грохнется, правда нада при этом кэшед ребутить - но это уже другой я думаю вопрос
</rus>
а где я возьму эту процедуру? у меня её нету
tetsunoony
22.11.2005, 07:25
is credited and tested.
Your Request script is here
http://www.l2net.org/forum/viewtopic.php?p=90#90
tetsunoony
montejo1974
22.11.2005, 09:15
Ey tettsuuonny...do you know you can put code here, so ppl havent to sign in your web.
I think this man only wants publicity his own web.
lin_DeleteNotOwnedItem procedure (open in ent. manager, db lin2world, stored procedures)
after line "DELETE user_item WHERE char_id = 0 OR item_type = 0"
add your own:
update user_data set logout=login where login>logout
*edit*
post a screen ?;)
tetsunoony
22.11.2005, 13:18
I do my way for Creditable L2Off Stuffs and Mods.
Logout fix which i use on my admin page. This will set curent logout date/time to all on/offline chars.
So i suggest u use this only at offline server.
[php:1:cf7fe443a9]<?php
require('load.php');
$query ="UPDATE user_data SET logout = getdate()";
$result = mssql_query($query);
if($result)
{
echoLn("Global Logout time set");
}
?>[/php:1:cf7fe443a9]