forked from ChomeNS/chipmunkmod
Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
6a93cf8aae | |||
285513a332 | |||
71a28fc0b7 |
1 changed files with 3 additions and 4 deletions
|
@ -147,7 +147,6 @@ public class BotValidationUtilities {
|
|||
return Command.SINGLE_SUCCESS;
|
||||
}
|
||||
|
||||
// !!! broken (for now)
|
||||
public static int nbot (String command) throws RuntimeException {
|
||||
final Configuration.BotInfo info = ChipmunkMod.CONFIG.bots.nbot;
|
||||
|
||||
|
@ -169,9 +168,9 @@ public class BotValidationUtilities {
|
|||
|
||||
byte[] hash = md.digest();
|
||||
|
||||
long bigInt = ByteBuffer.wrap(new byte[] {0, 0, hash[0], hash[1], hash[2], hash[3], hash[4], hash[5]}).getLong();
|
||||
|
||||
String stringHash = Long.toUnsignedString(bigInt, 36).substring(0, 6);
|
||||
ByteBuffer buffer = ByteBuffer.wrap(hash, 0, 4);
|
||||
long bigInt = (buffer.getInt() & 0xFFFFFFFFL);;
|
||||
String stringHash = Long.toString(bigInt, 36);
|
||||
|
||||
final String[] restArguments = Arrays.copyOfRange(arguments, 1, arguments.length);
|
||||
|
||||
|
|
Loading…
Reference in a new issue