Skip to content

Feat: join/left message#263

Merged
4lve merged 11 commits into
Steel-Foundation:masterfrom
chocodev11:feat/join-left-msg
Jul 17, 2026
Merged

Feat: join/left message#263
4lve merged 11 commits into
Steel-Foundation:masterfrom
chocodev11:feat/join-left-msg

Conversation

@chocodev11

@chocodev11 chocodev11 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

implement join and leave message. The join message look for cached player name, then change it if need, then send it. The leave message is sent on disconnect so theoretically they are online.

Comment thread steel-core/src/server/mod.rs Outdated
Comment on lines +4243 to +4245
fn broadcast_system_chat(&self, message: &TextComponent) {
self.broadcast_to_online_with(|player| CSystemChat::new(message, false, player));
}

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.

The function broadcast_sprint_report is also using broadcast_to_online_with and can be abstracted with that function, maybe search also for other occasions (don't have a good global search on github :/ )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

what?

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.

You can reuse your method again in the code. Because otherwise some places we use broadcast_to direct and in your code we use your helper function. And I like to have it consistent. Better?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmm ok, i just do it the way vanilla does

Comment thread steel-core/src/server/mod.rs Outdated
}

fn broadcast_player_join_message(&self, player: &Player, previous_name: Option<&str>) {
use steel_utils::translations;

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.

I'm also a fan of having all use on top of the file because you have in two functions the same use. @4lve what is your thought about that?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Yea, always put our imports at the top. Exception for feature flagged functions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

alr messrs

Comment thread steel-core/src/server/mod.rs Outdated
}

fn broadcast_player_leave_message(&self, player: &Player) {
use steel_utils::translations;

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.

second time

@4lve
4lve merged commit 873c843 into Steel-Foundation:master Jul 17, 2026
3 checks passed
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.

3 participants