mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 22:54:15 +00:00
Merge pull request #685 from thelounge/astorije/fix-nick-in-logs
Fix nick changes not being properly reported in the logs
This commit is contained in:
commit
a58b7839a7
3 changed files with 5 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
});
|
||||
|
|
|
@ -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}`;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue