Commit Graph

181 Commits

Author SHA1 Message Date
Ryll Ryll
ac2c251a73 Adds linking datums in asay (#65154) 2022-02-26 18:57:14 -08:00
Watermelon914
2b11472f02 Changes what appears for urgent ahelps to supportmins. (#64748)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2022-02-14 16:11:52 -08:00
Aziz Chynaliev
22feb54230 Fix: LogAhelp invalid integer - use ticket ID (#64875) 2022-02-13 14:59:16 -05:00
Mothblocks
3c19a826b8 Verify that those clicking on admin statclicks are admins (#63226)
Also removes some unused statclick.

Statclicks need to get removed someday, they're a pain in the ass, but this is good enough for now.
2021-12-05 01:41:19 -08:00
Nick
2b411035c4 Adds additional DB logging for admin help interactions (#62994)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-11-22 14:53:08 -08:00
Watermelon914
fb8d95a2f5 Allows players to send more visible adminhelps when no admins are on, which'll definitely alert admins (#62711)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2021-11-20 03:06:50 -08:00
Ghom
b79dd74fd0 Replaces a portion of C-style for loops with the more commonplace for loops, which are faster. (#62624)
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2021-11-07 16:42:41 -08:00
Ryll Ryll
3ef17dd5ad Admins now get a little notice if they start responding to a ticket someone else is already responding to (#62025) 2021-10-18 16:40:01 -07:00
LemonInTheDark
e663308b0d Adds SHOULD_NOT_SLEEP to Destroy. Why didn't we do this before. (#61943) 2021-10-09 04:29:33 -07:00
Ryll Ryll
ee541f35df fixes multiple spaces breaking asay (#61939) 2021-10-05 22:39:08 -07:00
Ryll Ryll
cb65ddcff8 Adds pinging to asay (#61712)
I spend a lot of my time adminning the servers alt tabbed when not much is going on, tabbing back in every 5-10 minutes to see what's happening or when I hear a bwoink. Sometimes I miss out on other admins asking me questions or trying to get my attention, and I'll only realize way later when I'm scrolling back up through the chat logs, if at all.

This PR adds the ability to @ other admins in asay by their ckey, which underlines the pinged name, plays a bloop sound (the one when a vote starts) and flashes their window icon if they're not tabbed in.
2021-09-27 13:15:52 -04:00
Jordan Brown
ccb75a554f Changes a bunch of New()s to Initialize()s (#61626) 2021-09-26 00:15:49 -07:00
Fikou
ff48fac9f4 actually fixes the wrapping on ahelps (#61282) 2021-09-08 19:54:19 -07:00
Fikou
995296c742 makes rslve button in admin help panel not wrap around (#61239)
makes admin help panel wider so rslve doesnt wrap around to the bottom line
2021-09-05 11:06:05 -04:00
Mothblocks
e09dc8ba24 Reorder the POPUP button (#61174)
Hurts muscle memory in a way I didn't anticipate. New version puts it behind the REJT button.
2021-09-02 19:26:30 -04:00
Mothblocks
0990a8ddcf Give admins the ability to put a popup notice for players in tickets (#61010)
Admins can now give players a popup if they are not responding to tickets.
Popup is cleared when player replies or ticket is resolved/closed.
As more and more of the chat screen is made irrelevant, new players read it less and less.
This means that a lot of new players are ignoring ahelps, which is something I've encountered myself.
2021-08-29 21:11:38 -03:00
Wayland-Smithy
509677e51d Fixes new ticket ahelp message double sanitizing (#60826)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-08-14 11:54:09 -07:00
Bobbahbrown
71e2191f5f Add 'other tickets by user' to adminhelp ticket panel (#59882)
added a list of other tickets that have been opened by a user, when relevant, to the adminhelp ticket panel.
2021-06-30 13:40:22 -03:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Ryll Ryll
e6cae4fac5 Improves friendly commendation code (#56453) 2021-02-05 01:42:34 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
Bobbahbrown
7b1bed7fc0 Adds Cross-Server Communication Network Option (PAID* CODE) (#54070) 2020-09-30 22:25:54 -07:00
Ryll Ryll
e9ee817cb4 Fixes admin tickets displaying as improper nouns (#53485)
Admin tickets were having "the" prepended to them when displayed in the status tab, because ahelps are treated as datums and BYOND likes to help out and treat them as nouns when printed. This resolves that.
2020-09-07 17:49:14 -03:00
TiviPlus
ca366c3ea1 Bools and returns super-pr (#53221)
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is

Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
2020-08-28 14:26:37 -07:00
Couls
e7f99e3b8b Browser Status Panel (#53112) 2020-08-27 15:28:03 -07:00
Aleksej Komarov
64dcf44cc6 tgchat: Hotfixes, Message Annotations (#52947)
This PR changes the message pipeline a little bit to support list-based messages, which can be annotated with custom data. Function signature of to_chat was slightly changed as well:

// Plain text message
to_chat(client,
  type = MESSAGE_TYPE_INFO,
  text = "foo")

// HTML message
to_chat(client,
  type = MESSAGE_TYPE_INFO,
  html = "<span class='notice'>foo</span>")

Old to_chat format is still supported, but handle_whitespace, trailing_newline and confidential flags have no effect. confidential flag could still be revived though, if there is enough merit in it, for example to filter out confidential messages when saving a chat log.

The reason for using /list and not /datum, is because lists are plain faster, and there are minimal data transformations - these lists are fed directly to json_encode and sent to tgchat.

Plain text messages do not need to be HTML-escaped, which makes them safer and more performant than HTML messages. Plain text messages can be made interactive (or formatted with CSS) by custom-handling them in javscript based on message type and annotations.

It would be impossible to annotate every single message in the game (at the moment of writing, there are 9447 to_chat calls in the code), but it could be done selectively, for only those messages that are hard to classify by span classes (and there are still A LOT of them).
Please annotate more messages. Thank you.

    Fixes #52943
    Fixes #52908
    Fixes #52816

Changelog

cl
add: tgchat: Unread message count is now smarter and won't increase on other tabs if you have already read the same message in the active tab.
add: tgchat: Admin PMs are now properly annotated and can be filtered into separate tabs.
fix: tgchat: Fix: Highlighted message overlay no longer blocks clicks. Clicking a highlighted (F) link should work as it should.
fix: tgui: Fixed NTOS bluescreen due to calling .includes() on a stylesheet href which could be null on certain browsers.
code: tgchat: Chat schema bumped to version 5. All chat-related settings were reset to avoid breakage.
/cl
2020-08-17 10:38:38 +12:00
Kyle Spier-Swenson
e8ba2038a1 adds pipelining to cross-server comm messages (#52447)
* adds pipelining to cross-server comm messages

One server blocking at the network level should not delay the other servers getting their message.

* Update adminhelp.dm

oh fun.

* try 3?

* Fuck it, string proc refs!

* Update adminhelp.dm

* Update adminhelp.dm
2020-07-26 13:38:16 -04:00
Ryll-Ryll
dca567b119 antaggy 2020-07-20 22:12:02 -04:00
skoglol
7ff34fc128 excessive 2020-07-16 16:08:01 +02:00
skoglol
7d3af73d12 Fixes some adminhelp issues 2020-07-16 11:57:40 +02:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
Ryll Ryll
753af7bda5 Adds friendly commendations (#51217)
* with message

* remove message, neaten up
2020-05-25 01:49:12 +08:00
Jordan Brown
63e20801ed TGS chat usage cleanup
- Rename send2tgs to sent2adminchat.
- Move both chat procs to SSdiscord.dm.
- Fix bug when sending to TGS4 non-admin chats.
- Add DMdocs
- Improve notify command
  - Store mentions as strings
  - Disable command if config setting isn't enabled
2020-05-23 13:33:09 -04:00
Fikou
57a93ea76a [s] does the html admin thing in a better way probably (#51221) 2020-05-23 01:44:34 -07:00
Rob Bailey
c20a04543b Port of Replays from Yogstation (#48579)
* demos (ported from yogstation)

rustg update + write with no format

use external hook for logging

use proper log vars

fix + clarifying comment

don't start the log

release build of rust-g

fix something caught by the lint

Update code/__DEFINES/subsystems.dm

Co-Authored-By: Jordan Brown <Cyberboss@users.noreply.github.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

moves hooks out of a dedicated file

len = 0 to Cut(), remove semicolons

untyped loop

* updated rust_g

* 513 updates
2020-04-06 13:15:48 -04:00
Kyle Spier-Swenson
d1f0c01959 Fix relayed admin helps getting truncated 2020-03-05 23:48:57 -08:00
skoglol
7abce6bfbe Multiline initial adminhelp (#49276)
* Multiline ahelps

* utf-8 compliant
2020-02-11 13:35:01 -05:00
AnturK
e40e22da6b Another runtime fixes batch. (#49209)
* Slime gland runtime fix.

* Logout ahelp logging runtime.

* Crafting non-items runtime.

* Turret building runtime.

* spacevine runtime.

* forcesay runtime fix.

* One less var
2020-02-10 10:50:36 -05:00
MrPerson
12eecfd181 Makes raw HTML and browser datum popups UTF-8 aware (#49066)
* Makes raw HTML and browser datum popups UTF-8 aware

Admin menus specifically really shouldn't break just because you named some guy "☺s the Clown"

* Fixed new_player.dm

* Fucking filing cabinets
2020-02-01 22:14:31 +01:00
AnturK
ac4f25e563 Cross server comms update. (#48850)
* Makes cross server config easier to manage and lets you send messages to specific stations.

* No need for fancy copy
2020-01-18 19:04:23 -05:00
MrPerson
f7eb2c905b Unicode awareness Part 2 -- copytext() (#48512)
* Unicode support Part 2 -- copytext()

This is the transition of all copytext() calls to be unicode aware and also some nearby calls in the same functions. Most things are just replacing copytext() with copytext_char() as a terrible character limiter but a few others were slightly more involved.

I replaced a ton of
````
var/something = sanitize(input())
something = copytext(something, 1, MAX_MESSAGE_LEN)
````

with a single stripped_input() call. stripped_input() already calls html_encode(), trim(), and some other sanitization so there shouldn't be any major issues there.

This is still VERY rough btw; DNA is a mess, the status displays are complete ass, there's a copytext() in code\datums\shuttles.dm that I'm not sure what to do with, and I didn't touch anything in the tools folder. I haven't tested this much at all yet, I only got it to compile earlier this morning. There's also likely to be weird bugs until I get around to fixing length(), findtext(), and the rest of the string procs.

* Makes the code functional

* Assume color hex strings are always # followed by ascii.
Properly encodes and decodes the stuff in mob_helpers.dm which fixes some issues there.

* Removes ninjaspeak since it's unused
2020-01-18 13:07:22 +13:00
Nick
c758bdd51c [Ready] Database Tickets (#48727)
* DB ticket procs

* Schema changes for DB tickets

* Schema version update

* Fixes requested by Jordie

* SQL updates

Adds a recipient column

* Still one dangling issue where this DOESN'T WORK

* Alright, this should work

* Requested SQL fixes

* Rogue changes

* less bad defaults

* utf8 for the utf8 gods

* aaaaaa

* Update tgstation_schema_prefixed.sql

* Update tgstation_schema.sql

* Update database_changelog.txt

Co-authored-by: Jordie <4343468+Jordie0608@users.noreply.github.com>
2020-01-17 05:35:16 +11:00
Bobbahbrown
0d7ef73b17 Refactors References to IRC to be TGS (#47954)
* TGS updates round 1

* TGS updates round 2
2019-11-30 03:59:42 -08:00
nemvar
2fb1150130 Replace global TAB variable with a define (#45264)
Replaces 4 spaces global var with a define!! BADMINS BTFO'd YET AGAIN!!
2019-07-20 16:22:05 -07:00
Nalzul
c4571cde25 ClownSlipMeBanHe 2019-06-16 20:59:34 -05:00
AnturK
70f97d34e1 Adds missing logging for admin tickets. 2019-03-06 11:39:09 +01:00
81Denton
0195ce430f Add cancel button to ahelp and asay popup (#42835) 2019-02-18 19:58:36 -08:00
Jordie
0d7ef3ed65 Key instead of ckey for user facing logs and ui (#39009)
* converts to using key instead of ckey for user facing logs and ui

* more key_name for airlock wires

* futureproofing check for if key changes

* --onlyckeymatch script argument and fail/success counter

* fix
2018-08-11 02:15:50 +10:00
kevinz000
5f4b418eaa Movespeed Modification System (#39181)
In preparation of pixel movement, I want to refactor our slowdown system to something more modular, and something that doesn't require /quite/ as many proccalls/calculations a tick. The way this works is intended to only have things recalculate when it's necessary, rather than calling it every move.
However, I've left movement_delay() in, as without completely redoing a lot of code it's not /quite/ ready at this point to tear it out completely, but I'm hoping everything can be transitioned over to this system later.
2018-08-09 16:55:15 -04:00