auto cleanup

This commit is contained in:
Gabriele C 2015-11-21 01:15:52 +01:00
parent ada992785c
commit adcd70b91d
5 changed files with 12 additions and 13 deletions

View File

@ -71,7 +71,7 @@ public class AccountsCommand extends ExecutableCommand {
if (i != accountList.size()) { if (i != accountList.size()) {
message.append(", "); message.append(", ");
} else { } else {
message.append("."); message.append('.');
} }
} }
sender.sendMessage("[AuthMe] " + playerQueryFinal + " has " + String.valueOf(accountList.size()) + " accounts"); sender.sendMessage("[AuthMe] " + playerQueryFinal + " has " + String.valueOf(accountList.size()) + " accounts");
@ -109,7 +109,7 @@ public class AccountsCommand extends ExecutableCommand {
if (i != accountList.size()) { if (i != accountList.size()) {
message.append(", "); message.append(", ");
} else { } else {
message.append("."); message.append('.');
} }
} }
sender.sendMessage("[AuthMe] " + playerQueryFinal + " has " + String.valueOf(accountList.size()) + " accounts"); sender.sendMessage("[AuthMe] " + playerQueryFinal + " has " + String.valueOf(accountList.size()) + " accounts");

View File

@ -226,7 +226,7 @@ public class AsyncronousLogin {
if (i != auths.size()) { if (i != auths.size()) {
message.append(", "); message.append(", ");
} else { } else {
message.append("."); message.append('.');
} }
} }
/* /*

View File

@ -1,7 +1,6 @@
package fr.xephi.authme.process.login; package fr.xephi.authme.process.login;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.PluginManager;

View File

@ -247,8 +247,8 @@ public class BCRYPT implements EncryptionMethod {
* Initialise the Blowfish key schedule * Initialise the Blowfish key schedule
*/ */
private void init_key() { private void init_key() {
P = (int[]) P_orig.clone(); P = P_orig.clone();
S = (int[]) S_orig.clone(); S = S_orig.clone();
} }
/** /**
@ -323,7 +323,7 @@ public class BCRYPT implements EncryptionMethod {
*/ */
private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) { private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) {
int rounds, i, j; int rounds, i, j;
int cdata[] = (int[]) bf_crypt_ciphertext.clone(); int cdata[] = bf_crypt_ciphertext.clone();
int clen = cdata.length; int clen = cdata.length;
byte ret[]; byte ret[];
@ -401,11 +401,11 @@ public class BCRYPT implements EncryptionMethod {
rs.append("$2"); rs.append("$2");
if (minor >= 'a') if (minor >= 'a')
rs.append(minor); rs.append(minor);
rs.append("$"); rs.append('$');
if (rounds < 10) if (rounds < 10)
rs.append("0"); rs.append('0');
rs.append(Integer.toString(rounds)); rs.append(Integer.toString(rounds));
rs.append("$"); rs.append('$');
rs.append(encode_base64(saltb, saltb.length)); rs.append(encode_base64(saltb, saltb.length));
rs.append(encode_base64(hashed, bf_crypt_ciphertext.length * 4 - 1)); rs.append(encode_base64(hashed, bf_crypt_ciphertext.length * 4 - 1));
return rs.toString(); return rs.toString();
@ -427,9 +427,9 @@ public class BCRYPT implements EncryptionMethod {
rs.append("$2a$"); rs.append("$2a$");
if (log_rounds < 10) if (log_rounds < 10)
rs.append("0"); rs.append('0');
rs.append(Integer.toString(log_rounds)); rs.append(Integer.toString(log_rounds));
rs.append("$"); rs.append('$');
rs.append(encode_base64(rnd, rnd.length)); rs.append(encode_base64(rnd, rnd.length));
return rs.toString(); return rs.toString();
} }

View File

@ -122,7 +122,7 @@ public class PHPBB implements EncryptionMethod {
for (byte b : bytes) { for (byte b : bytes) {
String x = Integer.toHexString(b & 0xff); String x = Integer.toHexString(b & 0xff);
if (x.length() < 2) if (x.length() < 2)
r.append("0"); r.append('0');
r.append(x); r.append(x);
} }
return r.toString(); return r.toString();