1
0
forked from mirrors/0ad

Fix a reference error in 6141c5c4fa / D514 reported by causative.

This was SVN commit r19873.
This commit is contained in:
elexis
2017-07-06 01:05:03 +00:00
parent 4c954e2b13
commit 3ecc90cd2e
+5 -5
View File
@@ -216,10 +216,10 @@ var g_NetMessageTypes = {
});
},
"kicked": msg => {
handleKick(false, msg.text, msg.data || "");
handleKick(false, msg.text, msg.data || "", msg.time);
},
"banned": msg => {
handleKick(true, msg.text, msg.data || "");
handleKick(true, msg.text, msg.data || "", msg.time);
},
"room-message": msg => {
addChatMessage({
@@ -475,7 +475,7 @@ function filterGame(game)
return false;
}
function handleKick(banned, nick, reason)
function handleKick(banned, nick, reason, time)
{
let kickString = nick == g_Username ?
banned ?
@@ -494,7 +494,7 @@ function handleKick(banned, nick, reason)
{
addChatMessage({
"text": "/special " + sprintf(kickString, { "nick": nick }) + " " + reason,
"time": msg.time,
"time": time,
"isSpecial": true
});
return;
@@ -502,7 +502,7 @@ function handleKick(banned, nick, reason)
addChatMessage({
"from": "system",
"time": msg.time,
"time": time,
"text": kickString + " " + reason,
});