View Full Version : script for clear online after server crushes
this script clear list of online players after you server crush.
download and put your ip\login\pass for connecting to game database
You can use it without webserver so you must configure instal php and configure to execute
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 23 October 2007. Открыть источник (https://web.archive.org/web/20071214120900id_/http://www.postpacific.com/forums/showthread.php?p=104516).
Sorry for using your topic, but I think its much better to insert this line:
Code:
update user_data set logout = login where login > logout
in the procedure lin_DeleteNotOwnedItem, so it will clean remaining online user each time you run cached.
Just execute attached sql in your world db.
Thanks
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 23 October 2007. Открыть источник (https://web.archive.org/web/20071214120900id_/http://www.postpacific.com/forums/showthread.php?p=104516).
some times I need clear online list after server crush and BEFORE I'll start him again
so stored procedure you've posted can't help
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 23 October 2007. Открыть источник (https://web.archive.org/web/20071214120900id_/http://www.postpacific.com/forums/showthread.php?p=104516).
Osito2Dancer
23.10.2007, 22:00
Kinda useless share IMHO.
Oso
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 24 October 2007. Открыть источник (https://web.archive.org/web/20071214120900id_/http://www.postpacific.com/forums/showthread.php?p=104516).
this is for DC count Smile
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 24 October 2007. Открыть источник (https://web.archive.org/web/20071214120900id_/http://www.postpacific.com/forums/showthread.php?p=104516).
3 things...
First... there is one thing in your PHP code have no sense....
PHP Code:
php buffer start
$res1=mssql_query("SELECT COUNT(auth_ip) AS cnt, auth_ip
FROM lin2db.dbo.user_account
WHERE (last_login > last_logout) GROUP BY auth_ip");
$online_dyxs=array();
php buffer end
WTF ?! That code is... shit.. do nothing... you can delete it... and.. WTF!! auth_ip ? that remember me to some addon of hint proxy
Second... you dont need never, except when Cached start to do that, inserting the query in the store proc is enought...
And third... that query forgot about one case...
A new player is created... so... last_logout IS NULL!!... isnt going to be updated never that way....
Code:
UPDATE user_data SET logout = GETDATE() WHERE (login > logout) OR (login IS NOT NULL and logout IS NULL)
Now is done Smile
Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 24 October 2007. Открыть источник (https://web.archive.org/web/20071214120900id_/http://www.postpacific.com/forums/showthread.php?p=104516).