protected String getReply(Bot bot, Sender sender, String[] args) {
if (args.length < 2) {
return giveSyntax(sender.getNickname(), args[0]);
}
String userName = args[1];
User user = User.get(userName, false);
if (user != null) {
String checkPermission = checkPermission(user, sender);
if (checkPermission != null) {
return checkPermission;
}
StringBuilder buf = new StringBuilder();
buf.append(userName).append(":");
if (!userName.equals(user.getFullName())) {
buf.append("\n").append("Full name: ").append(user.getFullName());
}
if (user.getDescription() != null) {
buf.append("\n").append("Description: ").append(user.getDescription());
}
Mailer.UserProperty mailProperty = user.getProperty(Mailer.UserProperty.class);
if (mailProperty != null) {
buf.append("\n").append("E-mail: ").append(mailProperty.getAddress());
}
// if (Hudson.getInstance().getPlugin("jabber") != null) {
//
// }
if (Hudson.getInstance().getPlugin("ci-game") != null) {
UserScoreProperty property = user.getProperty(UserScoreProperty.class);
if (property != null) {
int score = (int) property.getScore();
buf.append("\n").append("Current score in continuous integration game: ").append(score);
}
}