Merge pull request #1527 from dgw/kick-modes
Display correct kick modes
This commit is contained in:
commit
9e008a76b7
@ -1,6 +1,6 @@
|
|||||||
{{> ../user_name nick=from}}
|
{{> ../user_name nick=from.nick mode=from.mode}}
|
||||||
has kicked
|
has kicked
|
||||||
{{> ../user_name nick=target mode=""}}
|
{{> ../user_name nick=target.nick mode=target.mode}}
|
||||||
{{#if text}}
|
{{#if text}}
|
||||||
<i class="part-reason">({{{parse text}}})</i>
|
<i class="part-reason">({{{parse text}}})</i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -11,12 +11,13 @@ module.exports = function(irc, network) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const user = chan.findUser(data.kicked);
|
const kicker = chan.findUser(data.nick);
|
||||||
|
const target = chan.findUser(data.kicked);
|
||||||
|
|
||||||
if (data.kicked === irc.user.nick) {
|
if (data.kicked === irc.user.nick) {
|
||||||
chan.users = [];
|
chan.users = [];
|
||||||
} else {
|
} else {
|
||||||
chan.users = _.without(chan.users, user);
|
chan.users = _.without(chan.users, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
client.emit("users", {
|
client.emit("users", {
|
||||||
@ -26,9 +27,8 @@ module.exports = function(irc, network) {
|
|||||||
var msg = new Msg({
|
var msg = new Msg({
|
||||||
type: Msg.Type.KICK,
|
type: Msg.Type.KICK,
|
||||||
time: data.time,
|
time: data.time,
|
||||||
mode: user.mode,
|
from: kicker,
|
||||||
from: data.nick,
|
target: target,
|
||||||
target: data.kicked,
|
|
||||||
text: data.message || "",
|
text: data.message || "",
|
||||||
highlight: data.kicked === irc.user.nick,
|
highlight: data.kicked === irc.user.nick,
|
||||||
self: data.nick === irc.user.nick
|
self: data.nick === irc.user.nick
|
||||||
|
Loading…
Reference in New Issue
Block a user