diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index 245520542b1..761659ec60f 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -428,3 +428,5 @@ /datum/config_entry/str_list/tts_voice_blacklist /datum/config_entry/flag/give_tutorials_without_db + +/datum/config_entry/string/new_player_alert_role_id diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 2e97afabd7e..15d204843ba 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -466,7 +466,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if (nnpa >= 0) message_admins("New user: [key_name_admin(src)] is connecting here for the first time.") if (CONFIG_GET(flag/irc_first_connection_alert)) - send2tgs_adminless_only("New-user", "[key_name(src)] is connecting for the first time!") + var/new_player_alert_role = CONFIG_GET(string/new_player_alert_role_id) + send2tgs_adminless_only( + "New-user", + "[key_name(src)] is connecting for the first time![new_player_alert_role ? " <@&[new_player_alert_role]>" : ""]" + ) else if (isnum(cached_player_age) && cached_player_age < nnpa) message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age == 1?"":"s")]") if(CONFIG_GET(flag/use_account_age_for_jobs) && account_age >= 0) @@ -474,7 +478,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( if(account_age >= 0 && account_age < nnpa) message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].") if (CONFIG_GET(flag/irc_first_connection_alert)) - send2tgs_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].") + var/new_player_alert_role = CONFIG_GET(string/new_player_alert_role_id) + send2tgs_adminless_only( + "new_byond_user", + "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].[new_player_alert_role ? " <@&[new_player_alert_role]>" : ""]" + ) get_message_output("watchlist entry", ckey) check_ip_intel() validate_key_in_db() @@ -824,9 +832,9 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( var/list/modifiers = params2list(params) var/button_clicked = LAZYACCESS(modifiers, "button") - + var/dragged = LAZYACCESS(modifiers, DRAG) - if(dragged && button_clicked != dragged) + if(dragged && button_clicked != dragged) return if (object && IS_WEAKREF_OF(object, middle_drag_atom_ref) && button_clicked == LEFT_CLICK) diff --git a/code/modules/tgui_panel/telemetry.dm b/code/modules/tgui_panel/telemetry.dm index 5b30d26ebe9..815bb347735 100644 --- a/code/modules/tgui_panel/telemetry.dm +++ b/code/modules/tgui_panel/telemetry.dm @@ -108,6 +108,7 @@ if(found) var/msg = "[key_name(client)] has a banned account in connection history! (Matched: [found["ckey"]], [found["address"]], [found["computer_id"]])" message_admins(msg) + send2tgs_adminless_only("Banned-user", msg) log_admin_private(msg) log_suspicious_login(msg, access_log_mirror = FALSE) diff --git a/config/config.txt b/config/config.txt index 04141848d64..56da612c51f 100644 --- a/config/config.txt +++ b/config/config.txt @@ -294,6 +294,9 @@ NOTIFY_NEW_PLAYER_ACCOUNT_AGE 1 ## Requres database #IRC_FIRST_CONNECTION_ALERT +## Discord ID of a role that should be pinged when a new player makes their first connection +#NEW_PLAYER_ALERT_ROLE_ID 1138188190604341308 + ## Deny all new connections by ckeys we haven't seen before (exempts admins and only denies the connection if the database is enabled and connected) ## Requires database #PANIC_BUNKER