Skip to content

Commit

Permalink
fix: spelling mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtread committed May 18, 2024
1 parent a6dac50 commit bf19c16
Show file tree
Hide file tree
Showing 18 changed files with 90 additions and 34 deletions.
56 changes: 56 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"minWordLength": 5,
"words": [
"accountcountry",
"Appender",
"appenders",
"Bioware",
"bitflags",
"BSDK",
"BTIM",
"canonicalize",
"CDAT",
"chrono",
"CLNT",
"cntx",
"codegen",
"CSKU",
"Dataless",
"Deque",
"embeddy",
"firetype",
"flate",
"formatdoc",
"galaxyatwar",
"gname",
"gosredirector",
"gossjcprod",
"gostelemetry",
"hashbrown",
"Hasher",
"hmac",
"IITO",
"indoc",
"insertable",
"Jacobtread",
"masseffect",
"MIGRATABLE",
"msid",
"nessicary",
"norun",
"oneshot",
"pcwdjt",
"phong",
"playersyncservice",
"proxying",
"redirector",
"repr",
"reqwest",
"rngs",
"sname",
"Stringifier",
"SVCN",
"Unpadded",
"upserting"
]
}
2 changes: 1 addition & 1 deletion src/database/entities/galaxy_at_war.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl Model {
self.transform(db, |a, b| a.saturating_add(b).min(Model::MAX_VALUE), values)
}

/// Decrease the stored group values decreasuing them by the `values`
/// Decrease the stored group values decreasing them by the `values`
/// provided for each respective group
pub fn sub(
self,
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl<S> FromRequestParts<S> for Auth {
}

/// Error type used by the token checking middleware to handle
/// different errors and create error respones based on them
/// different errors and create error response based on them
#[derive(Debug, Error)]
pub enum TokenError {
/// The token was expired
Expand Down
2 changes: 1 addition & 1 deletion src/routes/public.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl Service<Request<Body>> for PublicContent {
if let Some(local_path) = find_local_path(&path) {
if local_path.exists() && local_path.is_file() {
if let Ok(contents) = tokio::fs::read(local_path).await {
// Create byte reponse from the embedded file
// Create byte response from the embedded file
let mut response = Body::from(contents).into_response();
response
.headers_mut()
Expand Down
4 changes: 2 additions & 2 deletions src/routes/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub async fn dashboard_details(
/// GET /api/server/upgrade
///
/// Handles upgrading connections from the Pocket Relay Client tool
/// from HTTP over to the Blaze protocol for proxing the game traffic
/// from HTTP over to the Blaze protocol to proxy the game traffic
/// as blaze sessions using HTTP Upgrade
pub async fn upgrade(
IpAddress(addr): IpAddress,
Expand Down Expand Up @@ -128,7 +128,7 @@ pub async fn handle_upgrade(
/// GET /api/server/tunnel
///
/// Handles upgrading connections from the Pocket Relay Client tool
/// from HTTP over to the Blaze protocol for proxing the game traffic
/// from HTTP over to the Blaze protocol to proxy the game traffic
/// as blaze sessions using HTTP Upgrade
pub async fn tunnel(
Association(association_id): Association,
Expand Down
4 changes: 2 additions & 2 deletions src/services/game/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl GameManager {
// Allocate a list for the snapshots
let mut snapshots = Vec::with_capacity(join_set.len());

// Recieve all the snapshots from their tasks
// Receive all the snapshots from their tasks
while let Some(result) = join_set.join_next().await {
if let Ok(snapshot) = result {
snapshots.push(snapshot);
Expand Down Expand Up @@ -181,7 +181,7 @@ impl GameManager {

let msid = player.player.id;

// MUST be sent to players atleast once when matchmaking otherwise it may fail
// MUST be sent to players at least once when matchmaking otherwise it may fail
player.notify_handle.notify(Packet::notify(
game_manager::COMPONENT,
game_manager::MATCHMAKING_ASYNC_STATUS,
Expand Down
12 changes: 6 additions & 6 deletions src/services/retriever/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use tokio_util::codec::Framed;
mod models;
pub mod origin;

/// Structure for the retrievier system which contains the host address
/// Structure for the retriever system which contains the host address
/// for the official game server in order to make further connections
pub struct Retriever {
// Optional official instance if fetching is possible
Expand Down Expand Up @@ -159,15 +159,15 @@ impl OfficialInstance {

if let Some(tokio) = tokio {
let ip = tokio.ip();
// Loopback value means it was probbably redirected in the hosts file
// Loopback value means it was probably redirected in the hosts file
// so those are ignored
if !ip.is_loopback() {
return Ok(format!("{}", ip));
}
}
}

// Attempt to lookup using cloudflares DNS over HTTP
// Attempt to lookup using cloudflare DNS over HTTP

let client = reqwest::Client::new();
let url = format!("https://cloudflare-dns.com/dns-query?name={host}&type=A");
Expand Down Expand Up @@ -195,7 +195,7 @@ impl OfficialInstance {
}

impl Retriever {
/// Attempts to create a new retriever by first retrieving the coorect
/// Attempts to create a new retriever by first retrieving the correct
/// ip address of the gosredirector.ea.com host and then creates a
/// connection to the redirector server and obtains the IP and Port
/// of the Official server.
Expand Down Expand Up @@ -280,7 +280,7 @@ pub struct OfficialSession {
/// Error type for retriever errors
#[derive(Debug, Error)]
pub enum RetrieverError {
/// Packet decode errror
/// Packet decode error
#[error(transparent)]
Decode(#[from] DecodeError),
/// IO Error
Expand Down Expand Up @@ -325,7 +325,7 @@ impl OfficialSession {
}

/// Writes a request packet and waits until the response packet is
/// recieved returning the contents of that response packet.
/// received returning the contents of that response packet.
pub async fn request_raw<Req: TdfSerialize>(
&mut self,
component: u16,
Expand Down
2 changes: 1 addition & 1 deletion src/session/models/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ pub struct AuthResponse {
pub player: Arc<Player>,
/// The session token for the completed authentication
pub session_token: String,
/// Whether the authentication proccess was silent
/// Whether the authentication process was silent
pub silent: bool,
}

Expand Down
2 changes: 1 addition & 1 deletion src/session/models/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub enum GlobalError {
pub enum DatabaseError {
Timeout = 0x406c,
InitFailure = 0x406d,
TranscationNotComplete = 0x406e,
TransactionNotComplete = 0x406e,
Disconnected = 0x406b,
NoConnectionAvailable = 0x4068,
DuplicateEntry = 0x4069,
Expand Down
10 changes: 5 additions & 5 deletions src/session/models/game_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ pub struct PlayerRemoved {
pub enum RemoveReason {
/// Hit timeout while joining
JoinTimeout = 0x0,
/// Player lost PTP conneciton
/// Player lost PTP connection
PlayerConnectionLost = 0x1,
/// Player lost connection with the Pocket Relay server
ServerConnectionLost = 0x2,
Expand Down Expand Up @@ -599,8 +599,8 @@ pub enum GameState {
Migrating = 0x5,
/// Game destruction state, closed to joins/matchmaking
Destructing = 0x6,
/// Game resetable state, closed to joins/matchmaking, but available to be reset
Resetable = 0x7,
/// Game resettable state, closed to joins/matchmaking, but available to be reset
Resettable = 0x7,
/// Unresponsive, closed to joins/matchmaking
Unresponsive = 0x9,
/// Initialized state, intended for the use of game group
Expand All @@ -625,7 +625,7 @@ bitflags! {
const ENABLE_PERSISTED_GAME_ID = 0x800;
const ALLOW_SAME_TEAM_ID = 0x1000;
const VIRTUALIZED = 0x2000;
const SEND_ORPHANDED_GAME_REPORT_EVENT = 0x4000;
const SEND_ORPHANED_GAME_REPORT_EVENT = 0x4000;
const ALLOW_ANY_REPUTATION = 0x8000;
}
}
Expand Down Expand Up @@ -843,7 +843,7 @@ impl TdfSerialize for GameSetupResponse<'_> {
// Host network qos data
w.tag_ref(b"NQOS", &host.net.qos);

// Flag to indicate that this game is not resetable. This applies only to the CLIENT_SERVER_DEDICATED topology. The game will be prevented from ever going into the RESETABlE state.
// Flag to indicate that this game is not resettable. This applies only to the CLIENT_SERVER_DEDICATED topology. The game will be prevented from ever going into the RESETABlE state.
w.tag_bool(b"NRES", false);

// Game network topology
Expand Down
4 changes: 2 additions & 2 deletions src/session/models/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl TdfDeserializeOwned for InstanceHost {
}

/// Details about an instance. This is used for the redirector system
/// to both encode for redirections and decode for the retriever system
/// to both encode for redirection and decode for the retriever system
#[derive(TdfDeserialize)]
pub struct InstanceDetails {
/// The networking information for the instance
Expand Down Expand Up @@ -144,7 +144,7 @@ pub enum NatType {
Moderate = 0x1,
/// Players behind a strict (but sequential) NAT can usually only connect to open players and are poor game hosts.
StrictSequential = 0x2,
/// Players behind a strict (unsequential) NAT can usually only connect to open players and are the worst game hosts.
/// Players behind a strict (non-sequential) NAT can usually only connect to open players and are the worst game hosts.
Strict = 0x3,
/// unknown NAT type; possibly timed out trying to detect NAT.
#[default]
Expand Down
2 changes: 1 addition & 1 deletion src/session/models/other.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl TdfSerialize for GameReportResponse {
}
}

/// Structure for the default response to assocated lists
/// Structure for the default response to associated lists
pub struct AssocListResponse;

impl TdfSerialize for AssocListResponse {
Expand Down
2 changes: 1 addition & 1 deletion src/session/models/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl TdfSerialize for LeaderboardResponse {
}
}

/// Structure for the request to retrieve a leaderboards
/// Structure for the request to retrieve a leaderboard
/// contents at the provided start offset
///
/// Component: Stats(GetLeaderboard)
Expand Down
8 changes: 4 additions & 4 deletions src/session/models/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub enum UtilError {
}

/// Possibly regions that the telemetry server is disabled for?
pub const TELEMTRY_DISA: &str = "AD,AF,AG,AI,AL,AM,AN,AO,AQ,AR,AS,AW,AX,AZ,BA,BB,BD,BF,BH,BI,BJ,BM,BN,BO,BR,BS,BT,BV,BW,BY,BZ,CC,CD,CF,CG,CI,CK,CL,CM,CN,CO,CR,CU,CV,CX,DJ,DM,DO,DZ,EC,EG,EH,ER,ET,FJ,FK,FM,FO,GA,GD,GE,GF,GG,GH,GI,GL,GM,GN,GP,GQ,GS,GT,GU,GW,GY,HM,HN,HT,ID,IL,IM,IN,IO,IQ,IR,IS,JE,JM,JO,KE,KG,KH,KI,KM,KN,KP,KR,KW,KY,KZ,LA,LB,LC,LI,LK,LR,LS,LY,MA,MC,MD,ME,MG,MH,ML,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,
Expand Down Expand Up @@ -49,7 +49,7 @@ impl TdfSerialize for TelemetryServer {
// Last known telemetry addresses: 159.153.235.32, gostelemetry.blaze3.ea.com
w.tag_str(b"ADRS", "127.0.0.1");
w.tag_zero(b"ANON");
w.tag_str(b"DISA", TELEMTRY_DISA);
w.tag_str(b"DISA", TELEMETRY_DISA);
w.tag_str(b"FILT", "-UION/****");
// Encoded locale actually BE encoded string bytes (enNZ)
w.tag_u32(b"LOC", LOCALE_NZ);
Expand All @@ -67,7 +67,7 @@ impl TdfSerialize for TelemetryServer {
}
}

/// Unique identifiyer key for the ticker server
/// Unique identifier key for the ticker server
/// PLAYER_ID,TICKER_IP:TICKER_PORT,GAME_NAME,....Other values unknown
const TICKER_KEY: &str = "1,10.23.15.2:8999,masseffect-3-pc,10,50,50,50,50,0,12";

Expand Down Expand Up @@ -229,7 +229,7 @@ impl TdfSerialize for PostAuthResponse {
w.tag_u8(b"TIID", 0);
});

// Ticker & Telemtry server options
// Ticker & Telemetry server options
self.telemetry.serialize(w);
self.ticker.serialize(w);

Expand Down
2 changes: 1 addition & 1 deletion src/session/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct FireFrame {
pub error: u16,
/// The type of frame
pub ty: FrameType,
/// Additional options assocaited with this frame
/// Additional options associated with this frame
pub options: PacketOptions,
/// Sequence number for tracking request and response mappings
pub seq: u16,
Expand Down
4 changes: 2 additions & 2 deletions src/session/routes/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ impl Message {
/// this configuration includes the addresses for the the Galaxy At War
/// server (GAW_SERVER_BASE_URL) and shop image contents (IMG_MNGR_BASE_URL)
/// these urls are set to (gosredirector.ea.com) because the client will
/// redirect this host and handling proxying itself
/// redirect this host and handle the request proxy itself
///
///
/// Last known original server values:
Expand All @@ -443,7 +443,7 @@ fn data_config() -> TdfMap<String, String> {
config.insert("JOB_THROTTLE_2".to_string(), "1000".to_string());
config.insert("MATCH_MAKING_RULES_VERSION".to_string(), "5".to_string());
config.insert("MULTIPLAYER_PROTOCOL_VERSION".to_string(), "3".to_string());
config.insert("TEL_DISABLE".to_string(), TELEMTRY_DISA.to_string());
config.insert("TEL_DISABLE".to_string(), TELEMETRY_DISA.to_string());
config.insert(
"TEL_DOMAIN".to_string(),
"pc/masseffect-3-pc-anon".to_string(),
Expand Down
4 changes: 2 additions & 2 deletions src/utils/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub mod game_manager {
pub const GAME_PLAYER_TEAM_CHANGE: u16 = 0x75;
pub const GAME_TEAM_ID_CHANGE: u16 = 0x76;
pub const PROCESS_QUEUE: u16 = 0x77;
pub const PRECENSE_MODE_CHANGED: u16 = 0x78;
pub const PRESENCE_MODE_CHANGED: u16 = 0x78;
pub const GAME_PLAYER_QUEUE_POSITION_CHANGE: u16 = 0x79;
// 0x7A-0xC8 --
pub const GAME_LIST_UPDATE: u16 = 0xC9;
Expand Down Expand Up @@ -653,7 +653,7 @@ unsafe fn init_notifications() {
(component_key(g::COMPONENT, g::GAME_PLAYER_TEAM_CHANGE), "GamePlayerTeamChange"),
(component_key(g::COMPONENT, g::GAME_TEAM_ID_CHANGE), "GameTeamIDChange"),
(component_key(g::COMPONENT, g::PROCESS_QUEUE), "PROCESS_QUEUE"),
(component_key(g::COMPONENT, g::PRECENSE_MODE_CHANGED), "PrecenseModeChanged"),
(component_key(g::COMPONENT, g::PRESENCE_MODE_CHANGED), "PresenceModeChanged"),
(component_key(g::COMPONENT, g::GAME_PLAYER_QUEUE_POSITION_CHANGE), "GamePlayerQueuePositionChange"),
(component_key(g::COMPONENT, g::GAME_LIST_UPDATE), "GameListUpdate"),
(component_key(g::COMPONENT, g::ADMIN_LIST_CHANGE), "AdminListChange"),
Expand Down
2 changes: 1 addition & 1 deletion src/utils/parsing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl PlayerClass<'_> {
// /// (3 if third split A is unlocked or 0 if not)
// /// (3 if third split B is unlocked or 0 if not)
// /// Unknown 0 - 6
// /// Charcter specific flag? True/False
// /// Character specific flag? True/False
// ///
// /// # Examples
// /// ```
Expand Down

0 comments on commit bf19c16

Please sign in to comment.