mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed a register bug introduced in commit 7af6cd2
This commit is contained in:
parent
2b4553e5e3
commit
c49ae0048f
@ -52,10 +52,10 @@ public class RegisterProcessor extends PlayerProcessor {
|
||||
if (db.getActionsTable().getActions(uuid).size() > 0) {
|
||||
return;
|
||||
}
|
||||
plugin.getDataCache().markFirstSession(uuid);
|
||||
if (userInfoTable.isRegistered(uuid)) {
|
||||
if (!userInfoTable.isRegistered(uuid)) {
|
||||
userInfoTable.registerUserInfo(uuid, registered);
|
||||
}
|
||||
plugin.getDataCache().markFirstSession(uuid);
|
||||
db.getActionsTable().insertAction(uuid, new Action(time, Actions.FIRST_SESSION, "Online: " + playersOnline + " Players"));
|
||||
} catch (SQLException e) {
|
||||
Log.toLog(this.getClass().getName(), e);
|
||||
|
@ -863,6 +863,8 @@ public class DatabaseTest {
|
||||
|
||||
@Test
|
||||
public void testRegisterProcessorRegisterException() throws SQLException {
|
||||
assertFalse(db.getUsersTable().isRegistered(uuid));
|
||||
assertFalse(db.getUserInfoTable().isRegistered(uuid));
|
||||
for (int i = 0; i < 200; i++) {
|
||||
new RegisterProcessor(uuid, 500L, 1000L, "name", 4).process();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user