Update IRC away status correctly in /irc list command when user returns.

This commit is contained in:
cnaude 2015-06-20 18:39:19 -07:00
parent 19aacbf847
commit d5a8f53579
2 changed files with 3 additions and 2 deletions

View File

@ -97,7 +97,7 @@
<dependency>
<groupId>com.cnaude.pircbotx</groupId>
<artifactId>pircbotx</artifactId>
<version>2.1.4</version>
<version>2.1.5</version>
</dependency>
<!-- Following dependency is provided by CraftBukkit -->

View File

@ -2084,6 +2084,7 @@ public final class PurpleBot {
public void sendUserWhois(CommandSender sender, String nick) {
User user = null;
for (Channel channel : getChannels()) {
bot.sendRaw().rawLineNow("WHO " + channel.getName());
for (User u : channel.getUsers()) {
if (u.getNick().equals(nick)) {
user = u;
@ -2142,7 +2143,7 @@ public final class PurpleBot {
String n = user.getNick();
n = getNickPrefix(user, channel) + n;
if (user.isAway()) {
n = n + ChatColor.GRAY + " | Away";
n = n + ChatColor.GRAY + " | Away | " + user.getAwayMessage();
}
if (n.equals(bot.getNick())) {
n = ChatColor.DARK_PURPLE + n;