Skip to content

Commit

Permalink
Merge pull request thelounge#685 from thelounge/astorije/fix-nick-in-…
Browse files Browse the repository at this point in the history
…logs

Fix nick changes not being properly reported in the logs
  • Loading branch information
xPaw authored Oct 15, 2016
2 parents 0b10764 + ffb3c54 commit 6491216
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/views/actions/nick.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<span role="button" class="user {{colorClass nick}}" data-name="{{nick}}">{{mode}}{{nick}}</span>
<span role="button" class="user {{colorClass from}}" data-name="{{from}}">{{mode}}{{from}}</span>
is now known as
<span role="button" class="user {{colorClass new_nick}}" data-name="{{new_nick}}">{{mode}}{{new_nick}}</span>
2 changes: 1 addition & 1 deletion src/plugins/irc-events/nick.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ module.exports = function(irc, network) {
});
msg = new Msg({
time: data.time,
from: data.nick,
type: Msg.Type.NICK,
mode: chan.getMode(data.new_nick),
nick: data.nick,
new_nick: data.new_nick,
self: self
});
Expand Down
4 changes: 3 additions & 1 deletion src/userLog.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ module.exports.write = function(user, network, chan, msg) {

line += msg.type;

if (msg.text) {
if (msg.new_nick) { // `/nick <new_nick>`
line += ` ${msg.new_nick}`;
} else if (msg.text) {
line += ` ${msg.text}`;
}
}
Expand Down

0 comments on commit 6491216

Please sign in to comment.