Autorank

Autorank

380k Downloads

[Enhancement Request] Import "onlinetime" from LogBlock

TheLecturer opened this issue ยท 10 comments

commented

Hi - here's a massive ask but if you don't ask you don't get, so here goes.

I use a plugin called AutoRank which uses LogBlock tracking of player on-line time to handle promotions to new ranks.
I am preparing to switch to Autorank-2 as AutoRank is no longer maintained and is unlikely to work with UUID's.

Would you be able to create a conversion utility to import players and their "onlinetime" value over into AutoRank-2 database?

Here is the table description of the "players" table from LogBlock (note table name is configurable) -

mysql> describe `lb-players`;
+------------+----------------------+------+-----+---------+----------------+
| Field      | Type                 | Null | Key | Default | Extra          |
+------------+----------------------+------+-----+---------+----------------+
| playerid   | smallint(5) unsigned | NO   | PRI | NULL    | auto_increment |
| playername | varchar(32)          | NO   | UNI | NULL    |                |
| firstlogin | datetime             | NO   |     | NULL    |                |
| lastlogin  | datetime             | NO   |     | NULL    |                |
| onlinetime | int(10) unsigned     | NO   |     | NULL    |                |
| ip         | varchar(255)         | NO   |     | NULL    |                |
+------------+----------------------+------+-----+---------+----------------+

Many thanks!
:)

commented

Yes, I think I can create something.

commented

I've made a small conversion plugin that will convert the times from LogBlock to Autorank. When it is loaded, you need to run /lta convert and it will start converting.

Link: http://staartvis.0fees.net/Bukkit%20plugins/

commented

Thank you so much :)

commented

No problem ;)

commented

Hi - been working with this and Autorank on my test system trying to sort the migration. Was getting some very strange results. After a little bit of investigation, I have determined (I think) that Autorank records time played in units of MINUTES, whereas LogBlock records time played in units of SECONDS.

Could you please add a SECONDS to MINUTES conversion into the utility? Rounding to the nearest 5 minutes (or whatever) is fine if that is the default within Autorank, I don't think anyone cares about a few lost seconds here or there.

Many thanks.

commented

I already let it convert from seconds to minutes. So I'm not sure why you are getting weird results?

commented

Oh no, sorry. I thought I convert it to seconds, but I was actually wrong.

commented

Okay, I updated the plugin. You can download it again and it should work.

commented

Wow that was fast! Many thanks.

commented

;)