mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Added Local OOC verb.
Visible to those in view and all admins.
This commit is contained in:
@@ -84,3 +84,65 @@ var/global/normal_ooc_colour = "#002eb8"
|
|||||||
set desc = "Set to yellow for eye burning goodness."
|
set desc = "Set to yellow for eye burning goodness."
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
normal_ooc_colour = newColor
|
normal_ooc_colour = newColor
|
||||||
|
|
||||||
|
|
||||||
|
/client/verb/looc(msg as text)
|
||||||
|
set name = "LOOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite
|
||||||
|
set desc = "Local OOC, seen only by those in view."
|
||||||
|
set category = "OOC"
|
||||||
|
|
||||||
|
if(say_disabled) //This is here to try to identify lag problems
|
||||||
|
usr << "\red Speech is currently admin-disabled."
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!mob) return
|
||||||
|
if(IsGuestKey(key))
|
||||||
|
src << "Guests may not use OOC."
|
||||||
|
return
|
||||||
|
|
||||||
|
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||||
|
if(!msg) return
|
||||||
|
|
||||||
|
if(!(prefs.toggles & CHAT_OOC))
|
||||||
|
src << "\red You have OOC muted."
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!holder)
|
||||||
|
if(!ooc_allowed)
|
||||||
|
src << "\red OOC is globally muted"
|
||||||
|
return
|
||||||
|
if(!dooc_allowed && (mob.stat == DEAD))
|
||||||
|
usr << "\red OOC for dead mobs has been turned off."
|
||||||
|
return
|
||||||
|
if(prefs.muted & MUTE_OOC)
|
||||||
|
src << "\red You cannot use OOC (muted)."
|
||||||
|
return
|
||||||
|
if(handle_spam_prevention(msg,MUTE_OOC))
|
||||||
|
return
|
||||||
|
if(findtext(msg, "byond://"))
|
||||||
|
src << "<B>Advertising other servers is not allowed.</B>"
|
||||||
|
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||||
|
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||||
|
return
|
||||||
|
|
||||||
|
log_ooc("(LOCAL) [mob.name]/[key] : [msg]")
|
||||||
|
|
||||||
|
for(var/mob/M in hearers())
|
||||||
|
if(!M.client)
|
||||||
|
continue
|
||||||
|
var/client/C = M.client
|
||||||
|
if (C in admins)
|
||||||
|
continue //they are handled after that
|
||||||
|
|
||||||
|
if(C.prefs.toggles & CHAT_OOC)
|
||||||
|
var/display_name = src.key
|
||||||
|
if(holder)
|
||||||
|
if(holder.fakekey)
|
||||||
|
if(C.holder)
|
||||||
|
display_name = "[holder.fakekey]/([src.key])"
|
||||||
|
else
|
||||||
|
display_name = holder.fakekey
|
||||||
|
C << "<font color='#6699CC'><span class='ooc'><span class='prefix'>LOOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||||
|
for(var/client/C in admins)
|
||||||
|
if(C.prefs.toggles & CHAT_OOC)
|
||||||
|
C << "<font color='#6699CC'><span class='ooc'><span class='prefix'>LOOC:</span> <EM>[src.key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||||
Reference in New Issue
Block a user