[MIRROR] Fixes NtOS chat bluescreen, muting [MDB IGNORE] (#10237)

* Fixes NtOS chat bluescreen, muting (#63433)

* Fixes NtOS chat bluescreen, muting

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-12-24 16:23:46 +00:00
committed by GitHub
co-authored by Jeremiah
parent 1860bdeb77
commit 35cd8a0f0a
3 changed files with 7 additions and 8 deletions
@@ -86,7 +86,7 @@
offline_clients.Add(offline)
/datum/ntnet_conversation/proc/mute_user(datum/computer_file/program/chatclient/op, datum/computer_file/program/chatclient/muted)
if(operator != op) //sanity even if the person shouldn't be able to see the mute button
if(!op.netadmin_mode && operator != op) //sanity even if the person shouldn't be able to see the mute button
return
if(muted in muted_clients)
muted_clients.Remove(muted)
@@ -91,8 +91,7 @@
if("PRG_toggleadmin")
if(netadmin_mode)
netadmin_mode = FALSE
if(channel)
channel.remove_client(src) // We shouldn't be in channel's user list, but just in case...
channel?.add_client(src)
return TRUE
var/mob/living/user = usr
if(can_run(user, TRUE, ACCESS_NETWORK))
+5 -5
View File
@@ -100,7 +100,7 @@ export const NtosNetChat = (props, context) => {
const this_client = clients.find(client => client.ref === selfref);
return (
<NtosWindow
width={900}
width={1000}
height={675}>
<NtosWindow.Content>
<Stack fill>
@@ -151,7 +151,7 @@ export const NtosNetChat = (props, context) => {
</Section>
</Stack.Item>
<Stack.Divider />
<Stack.Item grow={5}>
<Stack.Item grow={4}>
<Stack vertical fill>
<Stack.Item grow>
<Section scrollable fill>
@@ -204,7 +204,7 @@ export const NtosNetChat = (props, context) => {
{!!in_channel && (
<>
<Stack.Divider />
<Stack.Item grow={1}>
<Stack.Item grow={2}>
<Stack vertical fill>
<Stack.Item grow>
<Section scrollable fill>
@@ -221,10 +221,10 @@ export const NtosNetChat = (props, context) => {
<>
<Stack.Item>
<Button
disabled={this_client.muted}
disabled={this_client?.muted}
compact
icon="bullhorn"
tooltip={!this_client.muted
tooltip={!this_client?.muted
&& "Ping" || "You are muted!"}
tooltipPosition="left"
onClick={() => act('PRG_ping_user', {