1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 17:45:08 +02:00

Less strict matching on /realname

This commit is contained in:
KHobbits
2012-09-11 01:07:31 +01:00
parent ce55da8a2a
commit a48c157eab

View File

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