Skip to content

Commit

Permalink
TGS Test Merge (#1502)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgstation-server committed Jan 2, 2025
2 parents 3c458ce + 8a83ec6 commit 7c6270b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 7 deletions.
5 changes: 3 additions & 2 deletions code/modules/admin/IsBanned.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define STICKYBAN_MAX_EXISTING_USER_MATCHES 5 //ie, users who were connected before the ban triggered
#define STICKYBAN_MAX_ADMIN_MATCHES 2

/world/IsBanned(key,address,computer_id,type,real_bans_only=FALSE)
/world/IsBanned(key, address, computer_id, type, real_bans_only=FALSE)
var/static/key_cache = list()
if(!real_bans_only)
if(key_cache[key] >= REALTIMEOFDAY)
Expand Down Expand Up @@ -52,7 +52,7 @@
key_cache[key] = 0
return list("reason"="whitelist", "desc" = "\nReason: You are not on the white list for this server")

//Guest Checking
// Guest Checking
if(!real_bans_only && IsGuestKey(key))
if (CONFIG_GET(flag/guest_ban))
log_access("Failed Login: [key] - Guests not allowed")
Expand All @@ -63,6 +63,7 @@
key_cache[key] = 0
return list("reason"="guest", "desc"="\nReason: Sorry but the server is currently not accepting connections from never before seen players or guests. If you have played on this server with a byond account before, please log in to the byond account you have played from.")


//Population Cap Checking
var/extreme_popcap = CONFIG_GET(number/extreme_popcap)
if(!real_bans_only && extreme_popcap && living_player_count() >= extreme_popcap && !admin)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/integrated_electronics/core/printer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
return

var/client/client = user.client
if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 480) // Player with less than 8 hours playtime is using this machine.
if (CONFIG_GET(flag/use_exp_tracking) && client && client.get_exp_living(TRUE) < 60 HOURS) // Player with less than 60 hours playtime is using this machine.
if(client.next_circuit_grief_warning < world.time)
var/turf/T = get_turf(src)
client.next_circuit_grief_warning = world.time + 15 MINUTES // Wait 15 minutes before alerting admins again
Expand Down
11 changes: 7 additions & 4 deletions code/modules/tgui_panel/telemetry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@
break
CHECK_TICK
// This fucker has a history of playing on a banned account.
// BLUEMOON EDIT START: Telemetry
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)
log_admin_private(msg)
log_suspicious_login(msg, access_log_mirror = FALSE)
if(!client?.holder?.check_for_rights(R_PERMISSIONS))
var/msg = "[key_name(client)] has a banned account in connection history! https://iphub.info/?ip=[client.address] (Actual: [client.ckey], [client.address], [client.computer_id] ) (Matched: [found["ckey"]], [found["address"]], [found["computer_id"]])"
suspect_message_to_admin_chat(msg)
log_admin_private(msg)
log_suspicious_login(msg, access_log_mirror = FALSE)
// BLUEMOON EDIT END: Telemetry
3 changes: 3 additions & 0 deletions config/bluemoon/discord.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ BOT_ICON https://cdn.discordapp.com/attachments/1049298549550100480/128745238766
RANDOMIZING_MESSAGE_FOR_VIDEO Check this video!>
RANDOMIZING_MESSAGE_FOR_VIDEO Did you see that?
RANDOMIZING_MESSAGE_FOR_VIDEO OH shi~~

## Chat for suspicious login log
#CHAT_SUSPECT_LOGIN
3 changes: 3 additions & 0 deletions modular_bluemoon/phoenix404/code/entries.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@

/datum/config_entry/str_list/randomizing_message_for_video
default = list()

/datum/config_entry/string/chat_suspect_login

7 changes: 7 additions & 0 deletions modular_bluemoon/phoenix404/modules/tgui_panel/telemetry.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Proc for sending Suspicious Logins to Admin Chat
/proc/suspect_message_to_admin_chat(msg)
message_admins(msg)
var/suspect_chat_channel_tag = CONFIG_GET(string/chat_suspect_login)
if (suspect_chat_channel_tag)
var/tgs_msg = new /datum/tgs_message_content(msg)
send2chat(tgs_msg, suspect_chat_channel_tag)
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4569,6 +4569,7 @@
#include "modular_bluemoon\phoenix404\modules\player_ranks\code\player_rank_controller\_player_rank_controller.dm"
#include "modular_bluemoon\phoenix404\modules\player_ranks\code\player_rank_controller\mentor_controller.dm"
#include "modular_bluemoon\phoenix404\modules\player_ranks\code\player_rank_controller\subsystem\player_ranks.dm"
#include "modular_bluemoon\phoenix404\modules\tgui_panel\telemetry.dm"
#include "modular_bluemoon\phoenix404\modules\vending\_vending.dm"
#include "modular_bluemoon\phoenix404\modules\vending\assist.dm"
#include "modular_bluemoon\phoenix404\modules\vending\autodrobe.dm"
Expand Down

0 comments on commit 7c6270b

Please sign in to comment.