![]() |
[Share] Char online status and login logs
*Sorry for pure English - it's not my native :)*
1. As I see, all statistics sites for L2 servers uses comparision login > logout time to deside is char online or offline. But when server crashes, some chars stays "online" even if they are not. I think I've resolved that problem. All you need is to update procedure in DB. Code:
SET QUOTED_IDENTIFIER ON I think it may be usefull for users to see when and from what IP they have logged in on account. It is nided to do such changes in DB. Add Table for logs of logins in lin2db database: Code:
CREATE TABLE [login_list] (Code:
SET QUOTED_IDENTIFIER OFF |
I'll check it for sure! Thanks, will edit this post once I try it!
Works like a charm, really useful to keep track of all people who connected and their ips |
It's cool i especially like the log system.. can be very useful :)
|
Been looking for something like this, thanks!
|
too complicated ;-) better is this new C4 function
Code:
SELECT TOP 1 world_user as l2players FROM user_count WHERE server_id < 2 ORDER BY record_time DESChttp://gameparkl2.no-ip.org/stats/online.php Grab this php code ;-) (make .ini file - in that file will be stored numbers temporary.. to be defended before dos attacks..) Code:
<?php |
config.php
Code:
<?php |
May be I don't understand what do you meen,
But I guess that we are talking about different things. BTW there is not only fix for online status issue ;) |
I correct your query Fidow (has some writing error :))
Code:
SELECT TOP 1 world_user |
Quote:
Code:
SELECT TOP 1 world_user |
Small fix to your SQL.
Hardly noticable, but it may have been a character's first login, in that event logout would be null. Code:
-- Charis start Code:
update lin2world.dbo.user_data |
| All times are GMT. The time now is 21:52. |