welcome & leave

This commit is contained in:
Lambdax
2023-11-22 14:02:23 +01:00
parent cde157fdfe
commit de398c0208
2 changed files with 19 additions and 3 deletions

View File

@@ -54,6 +54,8 @@ impl NotificationPacket {
pub fn new<S: Into<String>>(msg: S) -> Self {
Self(format!("J{}", msg.into()))
}
pub fn welcome<S: Into<String>>(msg: S) -> Self { Self(format!("JWelcome {}!", msg.into()))}
pub fn left<S: Into<String>>(msg: S) -> Self { Self(format!("L{} left the server!", msg.into()))}
}
/// Protocol: