Commit 87abac99 authored by nanahira's avatar nanahira

recognize by name in mc

parent ec7d3802
......@@ -1711,7 +1711,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server)->
when '/color'
if settings.modules.chat_color.enabled
cip = client.ip.slice(7)
cip = (if settings.modules.mycard.enabled then client.name else client.ip.slice(7))
if cmsg = cmd[1]
if cmsg.toLowerCase() == "help"
ygopro.stoc_send_chat(client, "${show_color_list}", ygopro.constants.COLORS.BABYBLUE)
......@@ -1909,7 +1909,7 @@ ygopro.stoc_follow 'CHAT', true, (buffer, info, client, server)->
for player in room.players when player and player.pos == pid
tplayer = player
return unless tplayer
tcolor = chat_color.save_list[tplayer.ip.slice(7)]
tcolor = chat_color.save_list[(if settings.modules.mycard.enabled then tplayer.name else tplayer.ip.slice(7))]
if tcolor
ygopro.stoc_send client, 'CHAT', {
player: ygopro.constants.COLORS[tcolor]
......
......@@ -2135,7 +2135,7 @@
break;
case '/color':
if (settings.modules.chat_color.enabled) {
cip = client.ip.slice(7);
cip = (settings.modules.mycard.enabled ? client.name : client.ip.slice(7));
if (cmsg = cmd[1]) {
if (cmsg.toLowerCase() === "help") {
ygopro.stoc_send_chat(client, "${show_color_list}", ygopro.constants.COLORS.BABYBLUE);
......@@ -2406,7 +2406,7 @@
if (!tplayer) {
return;
}
tcolor = chat_color.save_list[tplayer.ip.slice(7)];
tcolor = chat_color.save_list[(settings.modules.mycard.enabled ? tplayer.name : tplayer.ip.slice(7))];
if (tcolor) {
ygopro.stoc_send(client, 'CHAT', {
player: ygopro.constants.COLORS[tcolor],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment