public boolean start(User aUser) throws MudException { Logger.getLogger("mmud").finer("theRegExpr=" + theRegExpr); aUser.setNow(); String myregexpr = theRegExpr.replaceAll("%s", aUser.getName()); boolean result = true; if (myregexpr.endsWith(".+") && getCommand().indexOf('\n') != -1) { String stuff = getCommand().substring(0, getCommand().indexOf('\n')); result = stuff.matches(myregexpr); Logger.getLogger("mmud").finer("returns case 1 " + result); } else { result = (getCommand().matches(myregexpr)); Logger.getLogger("mmud").finer("returns case 2 " + result); } if (!result) { /** didn't match the case, exiting */ return result; } /** continue with the actual command */ return run(aUser); }