Improved aliases log.
This commit is contained in:
parent
f2a384643e
commit
74a264fa7e
@ -173,7 +173,7 @@ public class HebdobotCLI
|
|||||||
logger.info("Aliases file loading… ({}).", aliasFile.getAbsolutePath());
|
logger.info("Aliases file loading… ({}).", aliasFile.getAbsolutePath());
|
||||||
UserAliases aliases = new UserAliases(aliasFile);
|
UserAliases aliases = new UserAliases(aliasFile);
|
||||||
logger.info("Aliases file loaded (" + aliases.size() + " aliases).");
|
logger.info("Aliases file loaded (" + aliases.size() + " aliases).");
|
||||||
logger.info("Alias liste:\n" + aliases.toString());
|
logger.info("Alias list: " + aliases.toLineString());
|
||||||
|
|
||||||
Hebdobot bot = new Hebdobot(config.getIrcHost(), config.getIrcPort(), config.getIrcName(), config.getIrcChannel(),
|
Hebdobot bot = new Hebdobot(config.getIrcHost(), config.getIrcPort(), config.getIrcName(), config.getIrcChannel(),
|
||||||
configFile.getParentFile(), reviewDirectory, config.getReviewFileSuffix());
|
configFile.getParentFile(), reviewDirectory, config.getReviewFileSuffix());
|
||||||
|
@ -145,6 +145,29 @@ public class UserAliases extends HashMap<String, String>
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To line string.
|
||||||
|
*
|
||||||
|
* @return the string
|
||||||
|
*/
|
||||||
|
public String toLineString()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
StringList buffer = new StringList();
|
||||||
|
for (String nick : new StringList(this.keySet()).sort())
|
||||||
|
{
|
||||||
|
buffer.append(getRealName(nick));
|
||||||
|
buffer.append(", ");
|
||||||
|
}
|
||||||
|
buffer.removeLast();
|
||||||
|
|
||||||
|
result = buffer.toString();
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see java.util.AbstractMap#toString()
|
* @see java.util.AbstractMap#toString()
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user