Update irc-framework and fix issue when changing your own nick
This commit is contained in:
parent
ef0e638a68
commit
7d24394814
@ -1,3 +1,3 @@
|
|||||||
<a href="#" class="user" data-name="{{nick}}">{{mode}}{{nick}}</a>
|
<a href="#" class="user" data-name="{{nick}}">{{mode}}{{nick}}</a>
|
||||||
is now known as
|
is now known as
|
||||||
<a href="#" class="user" data-name="{{newnick}}">{{mode}}{{newnick}}</a>
|
<a href="#" class="user" data-name="{{new_nick}}">{{mode}}{{new_nick}}</a>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"event-stream": "3.3.2",
|
"event-stream": "3.3.2",
|
||||||
"express": "4.13.4",
|
"express": "4.13.4",
|
||||||
"lodash": "4.6.1",
|
"lodash": "4.6.1",
|
||||||
"irc-framework": "1.0.8",
|
"irc-framework": "1.0.10",
|
||||||
"mkdirp": "0.5.1",
|
"mkdirp": "0.5.1",
|
||||||
"moment": "2.12.0",
|
"moment": "2.12.0",
|
||||||
"read": "1.0.7",
|
"read": "1.0.7",
|
||||||
|
@ -8,7 +8,7 @@ module.exports = function(irc, network) {
|
|||||||
if (data.nick === irc.user.nick) {
|
if (data.nick === irc.user.nick) {
|
||||||
var lobby = network.channels[0];
|
var lobby = network.channels[0];
|
||||||
var msg = new Msg({
|
var msg = new Msg({
|
||||||
text: "You're now known as " + data.newnick,
|
text: "You're now known as " + data.new_nick,
|
||||||
});
|
});
|
||||||
lobby.messages.push(msg);
|
lobby.messages.push(msg);
|
||||||
client.emit("msg", {
|
client.emit("msg", {
|
||||||
@ -19,7 +19,7 @@ module.exports = function(irc, network) {
|
|||||||
client.save();
|
client.save();
|
||||||
client.emit("nick", {
|
client.emit("nick", {
|
||||||
network: network.id,
|
network: network.id,
|
||||||
nick: data.newnick
|
nick: data.new_nick
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ module.exports = function(irc, network) {
|
|||||||
if (typeof user === "undefined") {
|
if (typeof user === "undefined") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
user.name = data.newnick;
|
user.name = data.new_nick;
|
||||||
chan.sortUsers(irc);
|
chan.sortUsers(irc);
|
||||||
client.emit("users", {
|
client.emit("users", {
|
||||||
chan: chan.id
|
chan: chan.id
|
||||||
@ -36,9 +36,9 @@ module.exports = function(irc, network) {
|
|||||||
var msg = new Msg({
|
var msg = new Msg({
|
||||||
time: data.time,
|
time: data.time,
|
||||||
type: Msg.Type.NICK,
|
type: Msg.Type.NICK,
|
||||||
mode: chan.getMode(data.newnick),
|
mode: chan.getMode(data.new_nick),
|
||||||
nick: data.nick,
|
nick: data.nick,
|
||||||
newnick: data.newnick,
|
new_nick: data.new_nick,
|
||||||
self: self
|
self: self
|
||||||
});
|
});
|
||||||
chan.messages.push(msg);
|
chan.messages.push(msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user