Less strict matching on /realname

This commit is contained in:
KHobbits 2012-09-11 01:07:31 +01:00
parent 5611acf12c
commit 59086932bd

View file

@ -34,14 +34,11 @@ public class Commandrealname extends EssentialsCommand
}
u.setDisplayNick();
final String displayName = Util.stripFormat(u.getDisplayName()).toLowerCase(Locale.ENGLISH);
if (!whois.equals(displayName)
&& !displayName.equals(Util.stripFormat(ess.getSettings().getNicknamePrefix()) + whois)
&& !whois.equalsIgnoreCase(u.getName()))
if (displayName.contains(whois))
{
continue;
foundUser = true;
sender.sendMessage(u.getDisplayName() + " " + _("is") + " " + u.getName());
}
foundUser = true;
sender.sendMessage(u.getDisplayName() + " " + _("is") + " " + u.getName());
}
if (!foundUser)
{