Skip to content

Commit

Permalink
chore(docs): typos and other nits
Browse files Browse the repository at this point in the history
  • Loading branch information
c43721 committed Nov 2, 2024
1 parent fc3d7f5 commit 2d6bde2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parseArgs } from "@std/cli";
import Rcon from "./src/rcon.ts";
import { Rcon } from "./src/rcon.ts";

const args = parseArgs(Deno.args, {
string: ["password", "ip", "port", "command"],
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@std/cli": "jsr:@std/cli@^1.0.6",
"@std/io": "jsr:@std/io@^0.225.0"
},
"version": "0.0.4",
"version": "0.0.5",
"exports": "./mod.ts",
"publish": {
"include": ["README.md", "mod.ts", "src/"]
Expand Down
4 changes: 1 addition & 3 deletions src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @readonly
*/
const protocol = {
export const protocol = {
/**
* Used for authenticating the connection with the server
*/
Expand Down Expand Up @@ -40,5 +40,3 @@ const protocol = {
*/
ID_TERM: 0x888,
} as const;

export default protocol;
7 changes: 5 additions & 2 deletions src/rcon.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import protocol from "./protocol.ts";
import { protocol } from "./protocol.ts";
import { concat } from "@std/bytes";
import { createConnection, type Socket } from "node:net";
import { encode, decode } from "./packet.ts";
Expand All @@ -12,7 +12,7 @@ import {
import type { RconOptions } from "./types.ts";

/**
* Class that can interact with the [Value Source RCON Protocol](https://developer.valvesoftware.com/wiki/Source_RCON)
* Class that can interact with the [Valve Source RCON Protocol](https://developer.valvesoftware.com/wiki/Source_RCON)
*
* RCON connections are made using TCP and responses are always in UTF-8
*
Expand Down Expand Up @@ -64,6 +64,9 @@ export class Rcon {
return this.#authenticated;
}

/**
* Disposes the resources
*/
[Symbol.dispose]() {
this.disconnect();
}
Expand Down

0 comments on commit 2d6bde2

Please sign in to comment.