Code improvements.
This commit is contained in:
@@ -56,16 +56,7 @@ public class ChatAdmin implements IVoicedCommandHandler
|
||||
if (st.hasMoreTokens())
|
||||
{
|
||||
final String name = st.nextToken();
|
||||
long expirationTime = 0;
|
||||
if (st.hasMoreTokens())
|
||||
{
|
||||
final String token = st.nextToken();
|
||||
if (Util.isDigit(token))
|
||||
{
|
||||
expirationTime = System.currentTimeMillis() + (Integer.parseInt(st.nextToken()) * 60 * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
final long expirationTime = st.hasMoreTokens() && Util.isDigit(st.nextToken()) ? System.currentTimeMillis() + (Integer.parseInt(st.nextToken()) * 60 * 1000) : 0;
|
||||
final int objId = CharNameTable.getInstance().getIdByName(name);
|
||||
if (objId > 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user