mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Make say handling short out earlier to prevent runtimes
The code does not appear to expect a message of the form "", but does not carry out the check for a message until much later
This commit is contained in:
@@ -60,6 +60,9 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
|
||||
|
||||
/mob/living/say(message, bubble_type,var/list/spans = list())
|
||||
message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN))
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
|
||||
if(stat == DEAD)
|
||||
say_dead(message)
|
||||
@@ -93,9 +96,6 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
|
||||
if(message_mode != MODE_WHISPER) //whisper() calls treat_message(); double process results in "hisspering"
|
||||
message = treat_message(message)
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
spans += get_spans()
|
||||
|
||||
//Log of what we've said, plain message, no spans or junk
|
||||
|
||||
Reference in New Issue
Block a user