if (scriptmode.equals(">")){
char method = ' ';
if (!methodstr.isEmpty()) method = methodstr.charAt(0);
switch (method){
case 'c': //command method - to force command instead of chat replacement
rp = new ReplacementCommand(regex, repl, replopts, caseSensitive, sameOutputCase); break;
case 'r': //random method - choose from one of the ; separated list
if (mc != MatchingContext.Chat) {
LogHelper.logWarning(_("cmdRandomReplacementNotAllowed", "")+lineno);
continue;
}
rp = new ReplacementRandom(regex, repl, caseSensitive, sameOutputCase); break;
case ' ':
default:
switch (mc){
case Command:
rp = new ReplacementCommand(regex, repl, replopts, caseSensitive, sameOutputCase); break;
case Chat: //only use ReplacementString for chat
rp = new ReplacementString(regex, repl, replopts, caseSensitive, sameOutputCase); break;
}
break;
}