Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes MSay #3851

Merged
merged 4 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion code/__DEFINES/speech_channels.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
#define ME_CHANNEL "Me"
#define OOC_CHANNEL "OOC"
#define LOOC_CHANNEL "LOOC"
#define MOD_CHANNEL "MSAY"
#define ADMIN_CHANNEL "ASAY"
#define MENTOR_CHANNEL "Mentor"
7 changes: 0 additions & 7 deletions code/datums/keybinding/communication.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@
full_name = "IC Comms (;)"
keybind_signal = COMSIG_KG_CLIENT_RADIO_DOWN

/datum/keybinding/client/communication/mod_say
hotkey_keys = list("Unbound")
classic_keys = list("Unbound")
name = MOD_CHANNEL
full_name = "Mod Say"
keybind_signal = COMSIG_KB_ADMIN_ASAY_DOWN

/datum/keybinding/client/communication/asay
hotkey_keys = list("F3")
classic_keys = list("F5")
Expand Down
16 changes: 0 additions & 16 deletions code/datums/redis/callbacks/msay.dm

This file was deleted.

1 change: 0 additions & 1 deletion code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ var/list/admin_verbs_default = list(
/client/proc/invismin,
/client/proc/set_explosive_antigrief,
/client/proc/check_explosive_antigrief,
/client/proc/cmd_mod_say,
/client/proc/dsay,
/client/proc/chem_panel, /*chem panel, allows viewing, editing and creation of reagent and chemical_reaction datums*/
/client/proc/player_panel_new, /*shows an interface for all players, with links to various panels*/
Expand Down
44 changes: 0 additions & 44 deletions code/modules/admin/tabs/admin_tab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -328,50 +328,6 @@
var/msg = input(src, null, "asay \"text\"") as text|null
cmd_admin_say(msg)

/client/proc/cmd_mod_say(msg as text)
set name = "Msay"
set category = "Admin"
set hidden = TRUE

if(!check_rights(R_ADMIN|R_MOD))
return

msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)

if (!msg)
return

REDIS_PUBLISH("byond.msay", "author" = src.key, "message" = strip_html(msg), "admin" = CLIENT_HAS_RIGHTS(src, R_ADMIN), "rank" = admin_holder.rank)

if(findtext(msg, "@") || findtext(msg, "#"))
var/list/link_results = check_asay_links(msg)
if(length(link_results))
msg = link_results[ASAY_LINK_NEW_MESSAGE_INDEX]
link_results[ASAY_LINK_NEW_MESSAGE_INDEX] = null
var/list/pinged_admin_clients = link_results[ASAY_LINK_PINGED_ADMINS_INDEX]
for(var/iter_ckey in pinged_admin_clients)
var/client/iter_admin_client = pinged_admin_clients[iter_ckey]
if(!iter_admin_client?.admin_holder)
continue
window_flash(iter_admin_client)
SEND_SOUND(iter_admin_client.mob, sound('sound/misc/asay_ping.ogg'))

log_adminpm("MOD: [key_name(src)] : [msg]")

var/color = "mod"
if (check_rights(R_ADMIN,0))
color = "adminmod"

var/channel = "MOD:"
channel = "[admin_holder.rank]:"
for(var/client/C in GLOB.admins)
if((R_ADMIN|R_MOD) & C.admin_holder.rights)
to_chat(C, "<span class='[color]'><span class='prefix'>[channel]</span> <EM>[key_name(src,1)]</EM> [ADMIN_JMP_USER(mob)]: <span class='message'>[msg]</span></span>")

/client/proc/get_mod_say()
var/msg = input(src, null, "msay \"text\"") as text|null
cmd_mod_say(msg)

/client/proc/cmd_mentor_say(msg as text)
set name = "MentorSay"
set category = "OOC"
Expand Down
11 changes: 1 addition & 10 deletions code/modules/client/client_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -713,17 +713,8 @@ GLOBAL_LIST_INIT(whitelisted_client_procs, list(
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[looc]")
else
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=looc")
if(MOD_CHANNEL)
if(admin_holder?.check_for_rights(R_MOD))
if(prefs.tgui_say)
var/msay = tgui_say_create_open_command(MOD_CHANNEL)
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[msay]")
else
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=msay")
else
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=")
if(ADMIN_CHANNEL)
if(admin_holder?.check_for_rights(R_ADMIN))
if(admin_holder?.check_for_rights(R_MOD))
if(prefs.tgui_say)
var/asay = tgui_say_create_open_command(ADMIN_CHANNEL)
winset(src, "srvkeybinds-[REF(key)]", "parent=default;name=[key];command=[asay]")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/tgui/tgui-say/modal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
if(!payload?["channel"])
CRASH("No channel provided to an open TGUI-Say")
window_open = TRUE
if(payload["channel"] != OOC_CHANNEL && payload["channel"] != LOOC_CHANNEL && payload["channel"] != MOD_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != MENTOR_CHANNEL)
if(payload["channel"] != OOC_CHANNEL && payload["channel"] != LOOC_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != MENTOR_CHANNEL)
start_thinking()
return TRUE

Expand Down
5 changes: 1 addition & 4 deletions code/modules/tgui/tgui-say/speech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
if(LOOC_CHANNEL)
client.looc(entry)
return TRUE
if(MOD_CHANNEL)
client.cmd_mod_say(entry)
return TRUE
if(ADMIN_CHANNEL)
client.cmd_admin_say(entry)
return TRUE
Expand Down Expand Up @@ -94,7 +91,7 @@
return TRUE
if(type == "force")
var/target_channel = payload["channel"]
if(target_channel == ME_CHANNEL || target_channel == OOC_CHANNEL || target_channel == LOOC_CHANNEL || target_channel == MOD_CHANNEL)
if(target_channel == ME_CHANNEL || target_channel == OOC_CHANNEL || target_channel == LOOC_CHANNEL || target_channel == ADMIN_CHANNEL)
target_channel = SAY_CHANNEL // No ooc leaks
delegate_speech(alter_entry(payload), target_channel)
return TRUE
Expand Down
1 change: 0 additions & 1 deletion colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@
#include "code\datums\redis\redis_message.dm"
#include "code\datums\redis\callbacks\_redis_callback.dm"
#include "code\datums\redis\callbacks\asay.dm"
#include "code\datums\redis\callbacks\msay.dm"
#include "code\datums\stamina\_stamina.dm"
#include "code\datums\stamina\none.dm"
#include "code\datums\statistics\cause_data.dm"
Expand Down
10 changes: 2 additions & 8 deletions tgui/packages/tgui-panel/chat/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,8 @@ export const MESSAGE_TYPES = [
type: MESSAGE_TYPE_ADMINCHAT,
name: 'Admin Chat',
description: 'ASAY messages',
selector: '.admin_channel, .adminsay, .headminsay',
admin: true,
},
{
type: MESSAGE_TYPE_MODCHAT,
name: 'Mod Chat',
description: 'MSAY messages',
selector: '.mod_channel, .mod, .adminmod, .staffsay',
selector:
'.admin_channel, .adminsay, .headminsay, .mod_channel, .mod, .adminmod, .staffsay',
admin: true,
},
{
Expand Down
5 changes: 1 addition & 4 deletions tgui/packages/tgui-say/helpers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,10 @@ export const getAvailableChannels = (
return availableChannels;
}

if (roles.includes('Mod')) {
availableChannels.push('MSAY');
}
if (roles.includes('Mentor')) {
availableChannels.push('Mentor');
}
if (roles.includes('Admin')) {
if (roles.includes('Mod')) {
availableChannels.push('ASAY');
}

Expand Down
2 changes: 0 additions & 2 deletions tgui/packages/tgui-say/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ $comms: #b4b4b4;
$me: #5975da;
$ooc: #1c52f5;
$looc: #e362b4;
$msay: #74471b;
$mentor: #b5850d;
$asay: #9611d4;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

colour in question to be changed to #74471b


Expand Down Expand Up @@ -49,7 +48,6 @@ $_channel_map: (
'ooc': $ooc,
'looc': $looc,
'whisper': $say,
'msay': $msay,
'mentor': $mentor,
'asay': $asay,
'department': $comms,
Expand Down