mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
a small addition
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
var/global/ntnrc_uid = 0
|
||||
/datum/ntnet_conversation/
|
||||
var/id = null
|
||||
/datum/ntnet_conversation
|
||||
var/id
|
||||
var/title = "Untitled Conversation"
|
||||
var/datum/computer_file/program/chatclient/operator // "Administrator" of this channel. Creator starts as channel's operator,
|
||||
var/list/messages = list()
|
||||
@@ -18,8 +18,14 @@ var/global/ntnrc_uid = 0
|
||||
operator = "NanoTrasen Information Technology Division" // assign a fake operator
|
||||
..()
|
||||
|
||||
/datum/ntnet_conversation/proc/add_message(var/message, var/username, var/mob/user)
|
||||
log_ntirc("[user.client.ckey]/([username]) : [message]",ckey=key_name(user),conversation=title)
|
||||
/datum/ntnet_conversation/proc/add_message(var/message, var/username, var/mob/user, var/reply_ref)
|
||||
log_ntirc("[user.client.ckey]/([username]) : [message]", ckey=key_name(user), conversation=title)
|
||||
|
||||
for(var/datum/computer_file/program/chatclient/C in clients)
|
||||
if(C.username == username || !C.computer.screen_on)
|
||||
continue
|
||||
if(C.computer.active_program == C || (C in C.computer.idle_threads))
|
||||
C.computer.output_message(FONT_SMALL("<b>([title]) [username]:</b> [message]"), 0)
|
||||
|
||||
message = "[worldtime2text()] [username]: [message]"
|
||||
messages.Add(message)
|
||||
@@ -45,6 +51,12 @@ var/global/ntnrc_uid = 0
|
||||
if(!operator)
|
||||
changeop(C)
|
||||
|
||||
for(var/datum/computer_file/program/chatclient/CC in clients)
|
||||
if(CC == C || !CC.computer.screen_on)
|
||||
continue
|
||||
if(CC.computer.active_program == CC || (CC in CC.computer.idle_threads))
|
||||
CC.computer.output_message(FONT_SMALL("<b>([title]) A new client ([C.username]) has entered the chat.</b>"), 0)
|
||||
|
||||
/datum/ntnet_conversation/proc/remove_client(var/datum/computer_file/program/chatclient/C)
|
||||
if(!istype(C) || !(C in clients))
|
||||
return
|
||||
@@ -57,6 +69,12 @@ var/global/ntnrc_uid = 0
|
||||
var/datum/computer_file/program/chatclient/newop = pick(clients)
|
||||
changeop(newop)
|
||||
|
||||
for(var/datum/computer_file/program/chatclient/CC in clients)
|
||||
if(CC == C || !CC.computer.screen_on)
|
||||
continue
|
||||
if(CC.computer.active_program == CC || (CC in CC.computer.idle_threads))
|
||||
CC.computer.output_message(FONT_SMALL("<b>([title]) A client ([C.username]) has left the chat.</b>"), 0)
|
||||
|
||||
|
||||
/datum/ntnet_conversation/proc/changeop(var/datum/computer_file/program/chatclient/newop)
|
||||
if(istype(newop))
|
||||
@@ -68,4 +86,10 @@ var/global/ntnrc_uid = 0
|
||||
return 0 // Not Authorised
|
||||
|
||||
add_status_message("[client.username] has changed channel title from [title] to [newtitle]")
|
||||
title = newtitle
|
||||
title = newtitle
|
||||
|
||||
for(var/datum/computer_file/program/chatclient/C in clients)
|
||||
if(C == client || !C.computer.screen_on)
|
||||
continue
|
||||
if(C.computer.active_program == src || (C in C.computer.idle_threads))
|
||||
C.computer.output_message(FONT_SMALL("([title]) A new client ([C.username]) has entered the chat."), 0)
|
||||
Reference in New Issue
Block a user