mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 05:50:22 +00:00
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
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