Skip to content

Commit

Permalink
Changes for KH2 Re-Revisit run end
Browse files Browse the repository at this point in the history
- Add a way to automatically restart mongod service on scheduled time
- Add a way to automatically restart machine on scheduled time
- Fix spambot regex that caused backend to hang (Not crash, just hang)
- And other things that I probably forgot to mention here
  • Loading branch information
WhatAboutGaming authored Oct 19, 2024
1 parent 280e429 commit cc004ae
Show file tree
Hide file tree
Showing 11 changed files with 6,406 additions and 555 deletions.
1,001 changes: 740 additions & 261 deletions backend/backend.js

Large diffs are not rendered by default.

678 changes: 646 additions & 32 deletions backend/gcn_controller.json

Large diffs are not rendered by default.

1,019 changes: 974 additions & 45 deletions backend/gcn_rvl_sideways_controller.json

Large diffs are not rendered by default.

672 changes: 640 additions & 32 deletions backend/gcn_vc_nes_controller.json

Large diffs are not rendered by default.

672 changes: 640 additions & 32 deletions backend/gcn_vc_snes_controller.json

Large diffs are not rendered by default.

82 changes: 72 additions & 10 deletions backend/global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"controller_config": "ps2.json",
"enable_auto_restart_machine": false,
"enable_auto_restart_machine_daily": false,
"auto_restart_machine_weekday": 0,
"auto_restart_machine_hour": 7,
"linux_restart_command": "sudo reboot now",
"windows_restart_command": "shutdown \/r",
"enable_auto_restart_mongod": true,
"enable_auto_restart_mongod_daily": true,
"auto_restart_mongod_weekday": 0,
"auto_restart_mongod_hour": 7,
"linux_mongod_restart_command": "sudo systemctl restart mongod",
"windows_mongod_restart_command": "dir",
"enable_slur_detection": true,
"permaban_when_slur_is_detected": false,
"slur_detection_timeout": 600,
Expand Down Expand Up @@ -36,8 +46,8 @@
"webserver_port": 8080,
"chat_config": "chat_config.json",
"run_start_time": 1723939200000,
"next_run_start_time": 1723939200000,
"stream_end_time": 1723939200000,
"next_run_start_time": 1734220800000,
"stream_end_time": 1727222400000,
"initial_accept_inputs": false,
"initial_accept_tts": false,
"initial_accept_inputs_from_anyone": true,
Expand Down Expand Up @@ -96,39 +106,91 @@
"longest_macro_name_length_allowed": 250,
"reason_macro_database_is_disabled": "You can now save macros just fine, everything now works as intended :)",
"use_discord_bot": true,
"discord_url": "https://discord.gg/yHETNuZCUK Go to the #polls channel to vote for the next run (Date TBD)! The options are: Final Fantasy Tactics (PS1), Super Paper Mario (Wii) and Tecmo Secret of The Stars (SNES), you can vote for more than one option!",
"discord_url": "https://discord.gg/yHETNuZCUK Go to the #polls channel to vote for the next run (Countdown here: https://www.timeanddate.com/countdown/generic?iso=20241215T00&p0=1440&msg=Next+Run,+Vote+In+The+Discord&font=sanserif&csz=1)! The options are: Final Fantasy Tactics (PS1), Super Paper Mario (Wii) and Tecmo Secret of The Stars (SNES), you can vote for more than one option!",
"github_message": "The source code for everything used on this stream can be found here:",
"github_repo": "https://github.com/WhatAboutGaming/Twitch-Plays-Stuff",
"run_id": 10,
"notes": "To test server: Set game_title as TEST RUN 0, set stream_title as TEST RUN 1, set next_game_title as TEST RUN 2, set main_database_name as test_database_main, set chatters_collection_name as test_database_chatters, set run_name as test_database_run_name, set global_database_name as test_database_global, set inputter_database_name as test_database_inputters, set macro_database_name as test_database_macro, set run_id as -1",
"overlay_enable_hourly_beeps": true,
"overlay_enable_secondary_beeps": true,
"overlay_header_text": "Twitch Plays (Viewers play\/Chat plays) {{game_title_short}}\non an actual PS2 !help !discord",
"overlay_advanced_mode_help_message_to_display": "\n\n!help to learn how to play\n\nGo to the !discord and go to\n#polls to vote for next game\n(Date TBD)",
"overlay_advanced_mode_help_message_to_display": "!help to learn how to play\nGame beaten! Congrats!\nStream goes offline in\n{{stream_end_time}}\n(The {{play_time:1727222400000}} mark)\nGo to the !discord and go to\n#polls to vote for next game\n(starts in {{next_run_start_time}})",
"overlay_text_rotation": [
"Type !help or !commands to learn how to play",
"Type !macrohelp to learn how to save macros and\nexecute saved macros",
"Type !runendgameconditions to see what you have to do\nto beat the game",
"Type !discord to get a link to the stream Discord server\nand go to #polls to vote for next game",
"Please, don't delete any files, and please save regularly",
"Attempting to delete or deleting any file will earn you an\nunappealable permanent ban",
"Current goal: Finish whatever there is\nleft to do! There isn't much left!",
"Boxed Lock, Shock, Barrel:\n{{play_time:1723942019726}} ({{absolute_time:1723942019726}})!",
"Got the Presents: {{play_time:1723942395490}} ({{absolute_time:1723942395490}})!",
"Made the Presents: {{play_time:1723943180184}} ({{absolute_time:1723943180184}})!",
"Beat Dr. Finkelstein's Experiment:\n{{play_time:1723944121764}} ({{absolute_time:1723944121764}})!",
"Beat Jafar's Shadow:\n{{play_time:1724008810435}} ({{absolute_time:1724008810435}})!",
"Beat Genie Jafar: {{play_time:1724607878830}} ({{absolute_time:1724607878830}})!",
"Beat Groundshaker:{{play_time:1726100120815}} ({{absolute_time:1726100120815}})!",
"Beat Heartless (Hollow Bastion):\n{{play_time:1726122334046}} ({{absolute_time:1726122334046}})!",
"Beat Nobodies (Old Mansion):\n{{play_time:1726160915794}} ({{absolute_time:1726160915794}})!",
"Beat Nobodies (The World That Never Was):\n{{play_time:1726162128811}} ({{absolute_time:1726162128811}})!",
"Beat Xigbar: {{play_time:1726196134548}} ({{absolute_time:1726196134548}})!",
"Beat Luxord: {{play_time:1726237946223}} ({{absolute_time:1726237946223}})!",
"Beat Saix: {{play_time:1726239416631}} ({{absolute_time:1726239416631}})!",
"Beat Xemnas 1: {{play_time:1726248154443}} ({{absolute_time:1726248154443}})!",
"Beat Xemnas 2: {{play_time:1726249994221}} ({{absolute_time:1726249994221}})!",
"Beat Xemnas 3: {{play_time:1726252416224}} ({{absolute_time:1726252416224}})!",
"Beat Xemnas 4/Credits:\n{{play_time:1726255599181}} ({{absolute_time:1726255599181}})!",
"Saved Tron: {{play_time:1726263568940}} ({{absolute_time:1726263568940}})!",
"Beat Solar Sailer Battle:\n{{play_time:1726264900039}} ({{absolute_time:1726264900039}})!",
"Beat MCP: {{play_time:1726266412380}} ({{absolute_time:1726266412380}})!",
"Beat Sephiroth: {{play_time:1726467969705}} ({{absolute_time:1726467969705}})!",
"Beat Cerberus Cup: {{play_time:1727111998404}} ({{absolute_time:1727111998404}})!",
"Beat Titan Cup: {{play_time:1727112973063}} ({{absolute_time:1727112973063}})!",
"Beat Twilight Thorn (Proud Mode):\n{{play_time:1727152928560}} ({{absolute_time:1727152928560}})!",
"Current goal: Celebrate! Game was beaten! Congrats to\nall who participated! Also beat Xemnas again lol",
"Celebrate! Game was beaten! Congrats to all\nwho participated!",
"The time is {{current_time_no_millis}}.\n{{game_title_short}} has been going for {{play_time_total_string_no_millis}}.",
"Stream goes offline in {{stream_end_time}} (The {{play_time:1727222400000}} mark)",
"{{next_game_title}} (starts in\n{{next_run_start_time}})",
"If anything breaks, please ping @WhatAboutGamingLive",
"The Endgame Conditions are: See how far you can get!",
"The Endgame Conditions are: Beat the game!",
"Glitches are allowed as long as they don't break or crash\nthe game, or leave the game in an unplayable state."
],
"current_run_endgame_goals": [
"The Endgame Conditions are: See how far you can get! Glitches are allowed as long as they don't break or crash the game, or leave the game in an unplayable state."
"The Endgame Conditions are: Beat the game! Glitches are allowed as long as they don't break or crash the game, or leave the game in an unplayable state."
],
"periodical_news_messages": [
"Not sure how to play? You can type !help or !commands in chat at any time to have a help message sent straight to chat.",
"You can type !macrohelp to learn how to save and execute saved macros.",
"All of the code used on this stream is open source and can be found here: https://github.com/WhatAboutGaming/Twitch-Plays-Stuff",
"We have a Discord server and there is currently a poll up for which game to be played after this (Date TBD), the options are: Final Fantasy Tactics (PS1), Super Paper Mario (Wii) and Tecmo Secret of The Stars (SNES), you can vote for more than one option, Discord server link here: https://discord.gg/yHETNuZCUK",
"We have a Discord server and there is currently a poll up for which game to be played after this (In {{next_run_start_time}}), the options are: Final Fantasy Tactics (PS1), Super Paper Mario (Wii) and Tecmo Secret of The Stars (SNES), you can vote for more than one option, Discord server link here: https://discord.gg/yHETNuZCUK Countdown here: https://www.timeanddate.com/countdown/generic?iso=20241215T00&p0=1440&msg=Next+Run,+Vote+In+The+Discord&font=sanserif&csz=1",
"The time is {{current_time}}. {{game_title}} has been going for {{play_time_total_string}}.",
"We're currently playing {{game_title}}. Save files for this run can be found here: https://github.com/WhatAboutGaming/Twitch-Plays-Stuff/tree/master/Save%20Files/Kingdom%20Hearts%202%20Re-Revisit and the videos for this run can be found on this playlist: https://www.twitch.tv/collections/PhLInYxg0RdbmA",
"Current goal: Finish whatever there is left to do! There isn't much left!"
"Stream goes offline in {{stream_end_time}} (The {{play_time:1727222400000}} mark). Countdown here: https://www.timeanddate.com/countdown/generic?iso=20240925T00&p0=1440&msg=Stream+Going+Offline&font=sanserif&csz=1",
"We're currently playing {{game_title}}. Save files for this run can be found here: https://github.com/WhatAboutGaming/Twitch-Plays-Stuff/tree/master/Save%20Files/Kingdom%20Hearts%202%20Re-Revisit and the videos for this run can be found on these playlists: https://www.twitch.tv/collections/PhLInYxg0RdbmA https://www.twitch.tv/collections/UoHgxwq19Bc8Kg",
"Video: Boxing Lock, Shock, Barrel https://www.twitch.tv/videos/2228191215 {{play_time:1723942019726}} ({{absolute_time:1723942019726}})",
"Video: Getting the Presents https://www.twitch.tv/videos/2228191213 {{play_time:1723942395490}} ({{absolute_time:1723942395490}})",
"Video: Making the Presents https://www.twitch.tv/videos/2228191212 {{play_time:1723943180184}} ({{absolute_time:1723943180184}})",
"Video: Beating Dr. Finkelstein's Experiment https://www.twitch.tv/videos/2228191283 {{play_time:1723944121764}} ({{absolute_time:1723944121764}})",
"Video: Beating Jafar's Shadow https://www.twitch.tv/videos/2228763601 {{play_time:1724008810435}} ({{absolute_time:1724008810435}})",
"Video: Beating Genie Jafar https://www.twitch.tv/videos/2233838146 {{play_time:1724607878830}} ({{absolute_time:1724607878830}})",
"Video: Beating Groundshaker https://www.twitch.tv/videos/2248847159 {{play_time:1726100120815}} ({{absolute_time:1726100120815}})",
"Video: Beating Heartless (Hollow Bastion) https://www.twitch.tv/videos/2249737303 {{play_time:1726122334046}} ({{absolute_time:1726122334046}})",
"Video: Beating Nobodies (Old Mansion) https://www.twitch.tv/videos/2249771715 {{play_time:1726160915794}} ({{absolute_time:1726160915794}})",
"Video: Beating Nobodies (The World That Never Was) https://www.twitch.tv/videos/2249771714 {{play_time:1726162128811}} ({{absolute_time:1726162128811}})",
"Video: Beating Xigbar https://www.twitch.tv/videos/2249780447 {{play_time:1726196134548}} ({{absolute_time:1726196134548}})",
"Video: Beating Luxord https://www.twitch.tv/videos/2250673078 {{play_time:1726237946223}} ({{absolute_time:1726237946223}})",
"Video: Beating Saïx https://www.twitch.tv/videos/2250673067 {{play_time:1726239416631}} ({{absolute_time:1726239416631}})",
"Video: Beating Xemnas 1 https://www.twitch.tv/videos/2250673074 {{play_time:1726248154443}} ({{absolute_time:1726248154443}})",
"Video: Beating Xemnas 2 https://www.twitch.tv/videos/2250673066 {{play_time:1726249994221}} ({{absolute_time:1726249994221}})",
"Video: Beating Xemnas 3 https://www.twitch.tv/videos/2250673069 {{play_time:1726252416224}} ({{absolute_time:1726252416224}})",
"Video: Beating Xemnas 4/Credits https://www.twitch.tv/videos/2250673065 {{play_time:1726255599181}} ({{absolute_time:1726255599181}})",
"Video: Saving Tron https://www.twitch.tv/videos/2250673071 {{play_time:1726263568940}} ({{absolute_time:1726263568940}})",
"Video: Beating Solar Sailer Battle https://www.twitch.tv/videos/2250673076 {{play_time:1726264900039}} ({{absolute_time:1726264900039}})",
"Video: Beating MCP https://www.twitch.tv/videos/2250673077 {{play_time:1726266412380}} ({{absolute_time:1726266412380}})",
"Video: Beating Sephiroth https://www.twitch.tv/videos/2253179026 {{play_time:1726467969705}} ({{absolute_time:1726467969705}})",
"Video: Beating Cerberus Cup https://www.twitch.tv/videos/2259001287 {{play_time:1727111998404}} ({{absolute_time:1727111998404}})",
"Video: Beating Titan Cup https://www.twitch.tv/videos/2259001288 {{play_time:1727112973063}} ({{absolute_time:1727112973063}})",
"Video: Beating Twilight Thorn (Proud Mode) https://www.twitch.tv/videos/2259012082 {{play_time:1727152928560}} ({{absolute_time:1727152928560}})",
"Current goal: Celebrate! Game was beaten! Congrats to all who participated! Also beat Xemnas again lol"
],
"help_message_saving_macros": [
"You can save or edit a macro by using the command !savemacro <macro name> <macro inputs>. Example: !savemacro WalkInCircles Up Right Down Left will save or edit the macro WalkInCircles with the inputs Up Right Down Left, which can then be used later.",
Expand Down
Loading

0 comments on commit cc004ae

Please sign in to comment.