Fix nick changes not being properly reported in the logs
Before: ``` [2016-10-10 15:17:47] * nick ``` After: ``` [2016-10-10 16:32:47] * astorije nick astorije2 ```
This commit is contained in:
parent
7e39ae045f
commit
310ab8f43c
@ -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
|
is now known as
|
||||||
<span role="button" class="user {{colorClass new_nick}}" data-name="{{new_nick}}">{{mode}}{{new_nick}}</span>
|
<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({
|
msg = new Msg({
|
||||||
time: data.time,
|
time: data.time,
|
||||||
|
from: data.nick,
|
||||||
type: Msg.Type.NICK,
|
type: Msg.Type.NICK,
|
||||||
mode: chan.getMode(data.new_nick),
|
mode: chan.getMode(data.new_nick),
|
||||||
nick: data.nick,
|
|
||||||
new_nick: data.new_nick,
|
new_nick: data.new_nick,
|
||||||
self: self
|
self: self
|
||||||
});
|
});
|
||||||
|
@ -37,7 +37,9 @@ module.exports.write = function(user, network, chan, msg) {
|
|||||||
|
|
||||||
line += msg.type;
|
line += msg.type;
|
||||||
|
|
||||||
if (msg.text) {
|
if (msg.new_nick) { // `/nick <new_nick>`
|
||||||
|
line += ` ${msg.new_nick}`;
|
||||||
|
} else if (msg.text) {
|
||||||
line += ` ${msg.text}`;
|
line += ` ${msg.text}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user