mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-17 18:14:25 +01:00
Ported some modular computer stuff from baystation
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
/datum/computer_file/data/email_account/
|
||||
var/list/inbox = list()
|
||||
var/list/outbox = list()
|
||||
var/list/spam = list()
|
||||
var/list/deleted = list()
|
||||
|
||||
var/login = ""
|
||||
var/password = ""
|
||||
var/can_login = TRUE // Whether you can log in with this account. Set to false for system accounts
|
||||
var/suspended = FALSE // Whether the account is banned by the SA.
|
||||
/// Whether you can log in with this account. Set to FALSE for system accounts.
|
||||
var/can_login = TRUE
|
||||
/// Whether the account is banned by the SA.
|
||||
var/suspended = FALSE
|
||||
var/connected_clients = list()
|
||||
|
||||
var/fullname = "N/A"
|
||||
var/assignment = "N/A"
|
||||
|
||||
var/notification_mute = FALSE
|
||||
var/notification_sound = "*beep*"
|
||||
|
||||
/datum/computer_file/data/email_account/calculate_size()
|
||||
size = 1
|
||||
@@ -64,7 +74,28 @@
|
||||
can_login = FALSE
|
||||
|
||||
/datum/computer_file/data/email_account/service/broadcaster/
|
||||
login = "broadcast@internal-services.nt"
|
||||
login = EMAIL_BROADCAST
|
||||
|
||||
/datum/computer_file/data/email_account/service/broadcaster/receive_mail(var/datum/computer_file/data/email_message/received_message, var/relayed)
|
||||
if(suspended || !istype(received_message) || relayed)
|
||||
return FALSE
|
||||
// Possibly exploitable for user spamming so keep admins informed.
|
||||
if(!received_message.spam)
|
||||
log_and_message_admins("Broadcast email address used by [usr]. Message title: [received_message.title].")
|
||||
|
||||
spawn(0)
|
||||
for(var/datum/computer_file/data/email_account/email_account in ntnet_global.email_accounts)
|
||||
var/datum/computer_file/data/email_message/new_message = received_message.clone()
|
||||
send_mail(email_account.login, new_message, 1)
|
||||
sleep(2)
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/computer_file/data/email_account/service/document
|
||||
login = EMAIL_DOCUMENTS
|
||||
|
||||
/datum/computer_file/data/email_account/service/sysadmin
|
||||
login = EMAIL_SYSADMIN
|
||||
|
||||
/datum/computer_file/data/email_account/service/broadcaster/receive_mail(var/datum/computer_file/data/email_message/received_message, var/relayed)
|
||||
if(!istype(received_message) || relayed)
|
||||
@@ -79,4 +110,4 @@
|
||||
send_mail(email_account.login, new_message, 1)
|
||||
sleep(2)
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user