-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
Chat bans & admin cooldowns #13248
Chat bans & admin cooldowns #13248
Conversation
Changelog status: 🔘 No changelog |
else | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else | |
return |
code/modules/admin/verbs/deadsay.dm
Outdated
if(prefs.muted & MUTE_IC || IS_ON_ADMIN_CD(src, ADMIN_CD_IC)) | ||
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>") | ||
return | ||
|
||
if(!(prefs.chat_toggles & CHAT_DEAD)) | ||
to_chat(src, "<span class='warning'>You have deadchat muted.</span>") | ||
return | ||
|
||
if (handle_spam_prevention(msg,MUTE_DEADCHAT)) | ||
if (handle_spam_prevention(msg,ADMIN_CD_IC)) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В описании ПРа написано, что дедчат объединен с ООЦ, а не с ИЦ-мутом. Так и должен быть код?
code/modules/client/preferences.dm
Outdated
@@ -18,14 +18,15 @@ var/global/list/datum/preferences/preferences_datums = list() | |||
var/savefile_version = 0 | |||
|
|||
//non-preference stuff | |||
var/permamuted = 0 | |||
var/muted = 0 | |||
var/muted = 0 // cache for chat bans, you should not touch it outside bans |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Может тут добавить какой-то дефайн и поместить рядом с дефайнами MUTE_IC MUTE_OOC MUTE_PRAY? Ну, чтобы было сразу видно при просмотре класса, что такое muted и с какой системой дефайнов он используется?
Ну и не обязательно, пофиг
#define MUTE_NONE 0
var/muted = 0 // cache for chat bans, you should not touch it outside bans | |
var/muted = MUTE_NONE // cache for chat bans, you should not touch it outside bans |
code/modules/client/preferences.dm
Outdated
var/DBQuery/query = dbcon.NewQuery("SELECT job FROM erro_ban WHERE ckey = '[ckey(parent.ckey)]' AND (bantype = 'CHAT_PERMABAN' OR (bantype = 'CHAT_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") | ||
if(!query.Execute()) | ||
return | ||
muted = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Если захочешь тот дефайн делать, про который я писал выше, то тут не забыть
if(client.prefs.muted & MUTE_IC || IS_ON_ADMIN_CD(client, ADMIN_CD_IC)) | ||
to_chat(src, "<span class='alert'>You cannot emote in deadchat (muted).</span>") | ||
return | ||
|
||
if(client.handle_spam_prevention(message, MUTE_DEADCHAT)) | ||
if(client.handle_spam_prevention(message, ADMIN_CD_IC)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
то же, почему дедчат забанен через мут_иц, а не мут_ооц?
code/modules/mob/emote.dm
Outdated
@@ -7,7 +7,7 @@ | |||
|
|||
/mob/proc/emote_dead(message) | |||
|
|||
if(client.prefs.muted & MUTE_DEADCHAT) | |||
if(client.prefs.muted & MUTE_IC || IS_ON_ADMIN_CD(client, ADMIN_CD_IC)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тоже дедчат
code/modules/mob/say.dm
Outdated
@@ -67,11 +67,11 @@ | |||
to_chat(src, "<span class='red'> You have deadchat muted.</span>") | |||
return | |||
|
|||
if(client.prefs.muted & MUTE_DEADCHAT) // Admin/autospam mute check | |||
if(client.prefs.muted & MUTE_IC || IS_ON_ADMIN_CD(client, ADMIN_CD_IC)) // Admin/autospam mute check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И тут дедчат
Co-authored-by: KIBORG04 <bossmira4@gmail.com>
Описание изменений
Еще одна часть #13141, вынесенная отдельно. В целом, вместе с чисткой префов небольшой реворк мутов.
И небольшая амнистия - я не конвертирую старые пермамуты в новые чат баны, это будет слишком запарно. Хедсостав одобрил, какие-то муты они в ручную перенесут. Но даже если кого пропустят, нотесы о мутах никуда не денутся.
Почему и что этот ПР улучшит
Авторство
Чеинжлог