Send rank packet to target on rank change

This commit is contained in:
Calvin Montgomery 2014-06-05 21:12:21 -07:00
parent 626725031f
commit fdf7900dc8
1 changed files with 2 additions and 1 deletions

View File

@ -113,7 +113,8 @@ RankModule.prototype.handleRankChange = function (user, data) {
}
receiver.account.channelRank = rank;
receiver.account.effectiveRank = rank;
receiver.account.effectiveRank = Math.max(receiver.account.globalRank, rank);
receiver.socket.emit("rank", receiver.account.effectiveRank);
this.channel.logger.log("[mod] " + user.getName() + " set " + name + "'s rank " +
"to " + rank);
this.channel.broadcastAll("setUserRank", data);