Commit Graph

58 Commits

Author SHA1 Message Date
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
Bobbahbrown
0b32b5c938 Format Change of Health Analyzers + scanners.dm Cleanup (#48595)
* VERY cool no more stink (less)

* LIST GAAANGLIST GAAANGLIST GAAANGLIST GAAANGLIST GAAANGLIST GAAANG
2020-01-10 22:59:47 +11:00
oranges
591eac4367 Add a spam limiter to the goonchat topic calls (#48524) 2020-01-03 15:21:00 -05:00
tralezab
347a52eb52 Chat Subsystem ported from TerraGov-Marine-Corps (#45354)
* chat subsystem v0.1

* removes old tabulator

* updates the check on to_chat

* SSchat now initializes
2019-07-25 16:23:05 +12: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
JJRcop
938789d0a7 [READY] Blocked words tell you which ones (#44728)
About The Pull Request

Same premise as #44712 but using a simple regex replace and also on the client side
Closes #44712

I was gonna PR it to #44712 but half way through I realized I had already replaced nearly all of bobbah's changes, and after I was finished the branches shared nothing.
Why It's Good For The Game

The delta is way smaller and simpler
Should solve the DoS concerns without needing a limit on bad chats because it's not a loop it's on the client side
Changelog

cl JJRcop and Bobbahbrown
tweak: When attempting to say a blocked word in character you will be notified which ones were blocked.
/cl
2019-06-29 21:09:56 +12:00
vuonojenmustaturska
0254559eca Replaces hear_intercept with signals, refactors MOVABLE_HEAR, touches up nanites and to_chat (#44391)
hear_intercept is removed in favor of having the things that care register for the COMSIG_MOVABLE_HEAR signal instead.

The signal has been changed to be like the speech one with an args list.

Nanite datums no longer register for the hearing signal just in case, only the voice sensor nanite program does.

Dead code has been removed from to_chat, the savefile/sound checks being just-in-case boilerplate checks made during the conversion to to_chat, the replacetexts sidestepping a byond bug that was fixed in 512.1420.
2019-06-10 10:43:12 +12:00
Kmc2000
6b6537cccd Adds toggleable darkmode to the game! (#43072)
* Adds toggleable darkmode to the game! (Use the toggle darkmode verb if you want to use light mode)

* Removes a random linechange

* Undo unintentional changes

* Changes some forced font tags to use spans, which won't break darkmode.

* Fixes up some problems I found while testing
Darkmode is no longer default (this caused some issues with people getting a broken chat)

* Darkmode sucks less now

* Darkmode button now works again
2019-03-21 11:02:41 +13:00
MrStonedOne
186f6c8ddd dbstickybans: Qdeleting queries, misc fixes, Query select proc for executing mutiple queries at once... 2019-03-16 00:23:40 -07:00
JJRcop
8748e6d83e Internet midi respects start and end times (#43021)
* Play Internet Sound respects start time
For example, adding &t=400 to youtube links.
Doesn't try to parse the start time, youtube-dl does that for us already. Will probably work on most sites not just youtube.

* [Play Internet Sound] now supports end time too

Switched event handler for start to loadeddata from canplay

loadeddata fires when the first frame is available
this is quicker and more consistent than canplay, which tries
to predict at least a few moments of playability being
available before it fires

* [Internet Sound] music_extra_data now starts null
2019-03-08 10:51:04 -05:00
Jordan Brown
bd7c22dda9 Moves TgsInitializationsComplete call to immediately after world/New() (#39771)
* Moves TgsInitializationsComplete call to immediately after world/New()

* Subsystem PreInit data directory audit

* world/New data directory audit

* Needful here too

* Remove SS_NO_INIT from SStitle

* Don't create banlist.bdb for SQL banning

* Stop creating legacy notes file

* Moves iconCache from data to tmp
2018-09-15 21:34:14 +12:00
vuonojenmustaturska
bc7006f266 Small refactor to to_chat to get rid of needless list-wrapping (#39899)
This is frequently called from inside a loop. Probably no measurable performance impact but I sleep easier knowing we don't do this. Also includes a helper define for getting a client from a clientful thing.

I also shuffled some things around for more nano-optimizations.
2018-08-26 12:49:26 +12:00
Tad Hardesty
657c2f70f1 Fix the MOTD having too many newlines 2018-06-22 18:19:40 -07:00
vuonojenmustaturska
db4c1d56ce Some tiny optimizations to atmos and chatcode (#38564)
* ever onward

* to_chat memes
2018-06-18 23:57:52 -04:00
Tad Hardesty
139a5d9cd7 Migrate goonchat pings to a subsystem 2018-05-19 16:44:23 -07:00
Tad Hardesty
cf6f064e21 Use spritesheets to reduce time spent sending PNG assets by 90+% (#37399)
The total number of assets to be sent has been reduced from 1532 to 76, with time between first asset and last going from about 112s to about 7s (a 93% reduction) by my measure. The following assets have been coalesced:

    705 pipe images (used by RPD) -> 1 spritesheet + css
    595 research design icons (used by R&D console) -> 3 spritesheets + css
    116 OOC emoji + 15 language icons -> 1 spritesheet + css
    27 PDA icons -> 1 spritesheet + css
    11 paperwork stamps -> 1 spritesheet + css
2018-05-10 14:34:57 +12:00
JJRcop
a79c5a722d Fixes stopsounds properly (#36341)
* Revert "Merge pull request #36340 from vuonojenmustaturska/beelogreen"

This reverts commit 259838f38c, reversing
changes made to 111cd316a9.

* Fixes stopsounds properly

Also I forgot to actually block admins from bad protocols
it just showed them a message that it was blocked but didn't
block it
2018-03-12 19:26:20 -04:00
JJRcop
05b320e63c Play Internet Sound sanity checks (#36080)
* Play Internet Sound sanity checks

Now checks if the content URL uses http(s) before playing

* HTML is not HTTP: renames regex

* Converted global regexes to procs that return them

* Revert "Converted global regexes to procs that return them"

This reverts commit 2eedbd6982b0c4de943a72c94f92f9d75001c06e.
2018-03-10 20:44:09 -06:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -05:00
Kyle Spier-Swenson
1cc04f73c1 Changes the goonchat failed to load message since updating byond isn't needed anymore (#33474)
It was a 511 beta that caused this issue, anybody still on 511 beta is not supported, They can move up to stable
2017-12-12 23:51:03 -05:00
Emmett Gaines
7c69cdcb8a Revert math (#33059)
* Revert "all this wrapping and it's not even christmas (#33035)"

This reverts commit faaf151580.

* Revert "fuck me for forgetting to graph this one"

This reverts commit 45d7acea2f.

* Revert "defines math"

This reverts commit 2817a1737b.
2017-11-23 20:59:52 -05:00
ninjanomnom
2817a1737b defines math 2017-11-22 17:36:58 -05:00
Qbopper
8b5ec1f6da adjusted default internet song volume to 25 2017-11-09 23:52:03 -05:00
Emmett Gaines
879b84da64 Makes isbanned have an arg for only checking real bans (#32248)
* makes isbanned have an arg for only checking real bans

* makes it return false if invalid data is passed in on a real bans check
2017-11-01 09:09:10 +13:00
JJRcop
3259ac4c49 Adds Internet admin midi (#30457)
* Adds Internet admin midi

* Moves global regex into proc (shell_url_scrub)

* Moves shelleo to world
Adds quotes around the command in shelleo, to encapsulate it

* Admins can stop playing web sounds

* Revised internet midi extension order
Moved m4a to least preferred,
as it can potentially carry non-aac or non-mpeg-3 audio

* Kills \n in web sound

* play_web_sound availability based on config

* play web sound and shelleo tweaks

istypeless for in play web sound & readability parenthesis around binary AND
add return index defines for shelleo proc

* Security fix for play web sound
2017-09-08 10:31:33 -04:00
Kyle Spier-Swenson
f2cf4c2f5c [ready]Makes bIcon better (#29690)
Goonchat will use the asset cache, you now have to specify who to send the icons too.

Goonchat will now load icons in the background, displaying them once they load. this prevents the message from being delayed while the icons are sent.

Icons that aren't preloaded using the asset cache system will not render on ie8 clients. This is because of a ie8 bug that prevents changes on runtime created images from rendering.
2017-08-14 10:40:50 +12:00
Jordan Brown
d1ae0a0c95 Adds helpers to avoid << use (#29611) 2017-08-09 00:27:54 -03:00
Kyle Spier-Swenson
3f4ac7496a Makes bIcon scale to 16x16 like byond chat output did (#29575)
* Makes bIcon scale to 16x16 like chat output did

There was lag and ddos issues because to_chat does certain find replace operations on the resulting string, so putting base64 encoded data of large images in these strings would be insanely and excessively costly.

This is basically banking on the assumption that md5 on a 480x480 image is less costly than 4 find/replaces and 2 html_encodes.

If this doesn't work or we need larger icon support for some reason, I'll just move bIcon over to the asset cache system.
2017-08-03 18:21:26 +12:00
AnturK
8cdd3a1e0a Fixes goonchat cookie false positives 2017-07-15 19:32:54 +02:00
Shadowlight213
6a5bb83d98 Makes cookie alert private (#29012) 2017-07-03 19:12:51 -03:00
Kyle Spier-Swenson
4307972412 Makes goonchat robust. (#28750)
* Temp fix for output control issue messing up goonchat

I'll need to do some more testing on this, but this should likely be a test mergeable fix. I might not be back at my home computer until sunday night/monday.

* Fix quote

* Adds verb to fix goonchat and log what was needed to fix it.

Makes shit robust, AND lets it know whats going on.

* Update ooc.dm

* Fix some stupidity in to_chat

* Simplify the winset

Disabling the controls seems to do nothing effective.

* y-you too, t-thanks

* Fix some short term memory issues in the code.

* Warns users to update byond if goonchat gets overridden by old chat
2017-06-26 01:03:40 -04:00
Leo
9d45a6db23 Merge pull request #28670 from MrStonedOne/fixcidrandomizer
Makes oldchat show while goonchat loads, sends preload messages there.
2017-06-22 21:49:41 -03:00
nicbn
77a2d3f5cd Replaces "istype"s with is_helpers macros (#28676) 2017-06-22 15:03:19 -03:00
MrStonedOne
7a13937fc7 Makes oldchat show while goonchat loads, sends preload messages there. 2017-06-21 00:51:28 -07:00
Jordan Brown
364e097335 Improve to_chat performance 2017-06-08 15:36:08 -04:00
Jordan Brown
b2ed7f3cb6 better tabs 2017-06-08 15:02:07 -04:00
Jordan Brown
5a6053db57 Fixes to_chat with lists 2017-06-07 11:11:01 -04:00
Jordan Brown
45aa3f8a3e Make it use asset cache 2017-06-07 11:00:16 -04:00
Jordan Brown
1fecdd2fe4 Make it use rsc html 2017-06-07 10:59:56 -04:00
Cyberboss
2d816ba454 Fix it harder 2017-05-28 12:40:32 -04:00
Cyberboss
dee794122d Fix client targets 2017-05-28 12:38:37 -04:00
Cyberboss
09e63f633c Another fix 2017-05-26 16:08:47 -04:00
Cyberboss
e3495fa034 Remove debug code fix bugs 2017-05-26 16:05:36 -04:00
Cyberboss
2addb941eb Cleans up to_chat 2017-05-26 15:53:14 -04:00
Cyberboss
705beac0da Make bicon_cache static 2017-05-26 15:46:31 -04:00
Cyberboss
71a72f8c96 Makes bicon param less stupidly named 2017-05-26 15:38:00 -04:00
Cyberboss
fd805a7f87 Wew 2017-05-06 11:35:01 -04:00
Cyberboss
0d59f922d6 So much spam! 2017-05-06 11:31:29 -04:00
Cyberboss
afad85f7d6 So much spam 2017-05-06 11:29:25 -04:00
Cyberboss
97676ce920 Stuff 2017-05-06 11:27:22 -04:00