Skip to content

Fix world name spaces#87

Closed
akirilov wants to merge 10 commits into
mainfrom
fix-world-name-spaces
Closed

Fix world name spaces#87
akirilov wants to merge 10 commits into
mainfrom
fix-world-name-spaces

Conversation

@akirilov

Copy link
Copy Markdown
Contributor

Changes

Bugfixes

  • Attempting to create a world with spaces in the name will block the wizard and show an error

Copilot AI review requested due to automatic review settings September 19, 2025 03:49
@akirilov akirilov closed this Sep 19, 2025
@akirilov

Copy link
Copy Markdown
Contributor Author

Ooops should be to nightly

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds version detection functionality to the game server detection system and fixes world name validation to prevent spaces in world names.

  • Adds event handling for version extraction from game server logs
  • Implements validation to block world creation with spaces in the name
  • Updates GitHub URL reference and version number

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/managers/detectionmgr/types.go Adds new EventVersionExtracted event type
src/managers/detectionmgr/handlers.go Implements handler for version extraction events
src/managers/detectionmgr/detector.go Adds regex pattern matching for version detection
src/config/vars.go Adds ExtractedGameVersion runtime variable
src/config/setters.go Adds setter function for extracted game version
src/config/getters.go Adds getter function for extracted game version
src/config/config.go Bumps version from 5.6.5 to 5.6.6
src/core/loader/terminalmsg.go Updates GitHub organization URL
renovate.json Adds complete Renovate configuration
UIMod/onboard_bundled/twoboxform/twoboxform.js Adds validation to prevent spaces in world names

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

version := matches[1]
d.triggerEvent(Event{
Type: EventVersionExtracted,
Message: fmt.Sprintf("Version %s detected", version),

Copilot AI Sep 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The message format duplicates the version display logic from the handler. Consider using just the version string as the message to avoid redundancy, since the handler already formats it as 'Version %s detected'.

Suggested change
Message: fmt.Sprintf("Version %s detected", version),
Message: version,

Copilot uses AI. Check for mistakes.
Comment on lines +141 to +146
// If the world type contains a space, it's invalid
if (primaryValue.includes(' ')) {
showNotification('The world type cannot contain spaces!', 'error');
hidePreloader();
return; // Prevent submission
}

Copilot AI Sep 19, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment on line 141 has a trailing space that should be removed for consistency.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants