aboutsummaryrefslogtreecommitdiff
path: root/webAO/packets
diff options
context:
space:
mode:
authorCaleb <caleb.mabry.15@cnu.edu>2022-09-08 12:13:14 -0400
committerCaleb <caleb.mabry.15@cnu.edu>2022-09-08 12:13:14 -0400
commit9b8f8c3f5310b6af15edf8ff933e2d63e05707a7 (patch)
treeab70772728eae88c12f0f519304bfb26608c0932 /webAO/packets
parent4de6b4fd4e7bc3871d76fded0f32561c814ca003 (diff)
Add Sender support
Diffstat (limited to 'webAO/packets')
-rw-r--r--webAO/packets/handlers/handleCC.ts2
-rw-r--r--webAO/packets/handlers/handleCI.ts2
-rw-r--r--webAO/packets/handlers/handleEI.ts2
-rw-r--r--webAO/packets/handlers/handleEM.ts2
-rw-r--r--webAO/packets/handlers/handleHI.ts4
-rw-r--r--webAO/packets/handlers/handleID.ts2
-rw-r--r--webAO/packets/handlers/handlePN.ts2
-rw-r--r--webAO/packets/handlers/handleRC.ts2
-rw-r--r--webAO/packets/handlers/handleRD.ts4
-rw-r--r--webAO/packets/handlers/handleRM.ts2
-rw-r--r--webAO/packets/handlers/handleSC.ts2
-rw-r--r--webAO/packets/handlers/handleSI.ts4
-rw-r--r--webAO/packets/handlers/handleSM.ts2
-rw-r--r--webAO/packets/handlers/handleaskchaa.ts2
14 files changed, 17 insertions, 17 deletions
diff --git a/webAO/packets/handlers/handleCC.ts b/webAO/packets/handlers/handleCC.ts
index 84e6ec0..36bcdc7 100644
--- a/webAO/packets/handlers/handleCC.ts
+++ b/webAO/packets/handlers/handleCC.ts
@@ -5,5 +5,5 @@ import { client } from "../../client";
* @param {Array} args packet arguments
*/
export const handleCC = (args: string[]) => {
- client.sendSelf(`PV#1#CID#${args[2]}#%`);
+ client.sender.sendSelf(`PV#1#CID#${args[2]}#%`);
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleCI.ts b/webAO/packets/handlers/handleCI.ts
index 74d3039..53e42f7 100644
--- a/webAO/packets/handlers/handleCI.ts
+++ b/webAO/packets/handlers/handleCI.ts
@@ -22,5 +22,5 @@ export const handleCI = (args: string[]) => {
}
}
// Request the next pack
- client.sendServer(`AN#${Number(args[1]) / 10 + 1}#%`);
+ client.sender.sendServer(`AN#${Number(args[1]) / 10 + 1}#%`);
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleEI.ts b/webAO/packets/handlers/handleEI.ts
index c74e4d4..428baf1 100644
--- a/webAO/packets/handlers/handleEI.ts
+++ b/webAO/packets/handlers/handleEI.ts
@@ -26,5 +26,5 @@ export const handleEI = (args: string[]) => {
icon: `${AO_HOST}evidence/${encodeURI(arg[3].toLowerCase())}`,
};
- client.sendServer("AE" + (evidenceID + 1) + "#%");
+ client.sender.sendServer("AE" + (evidenceID + 1) + "#%");
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleEM.ts b/webAO/packets/handlers/handleEM.ts
index 973d2af..9f3cb87 100644
--- a/webAO/packets/handlers/handleEM.ts
+++ b/webAO/packets/handlers/handleEM.ts
@@ -35,5 +35,5 @@ export const handleEM = (args: string[]) => {
}
// get the next batch of tracks
- client.sendServer(`AM#${Number(args[1]) / 10 + 1}#%`);
+ client.sender.sendServer(`AM#${Number(args[1]) / 10 + 1}#%`);
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleHI.ts b/webAO/packets/handlers/handleHI.ts
index d15be0d..b4f00a8 100644
--- a/webAO/packets/handlers/handleHI.ts
+++ b/webAO/packets/handlers/handleHI.ts
@@ -7,8 +7,8 @@ const version = process.env.npm_package_version;
* @param {Array} args packet arguments
*/
export const handleHI = (_args: string[]) => {
- client.sendSelf(`ID#1#webAO#${version}#%`);
- client.sendSelf(
+ client.sender.sendSelf(`ID#1#webAO#${version}#%`);
+ client.sender.sendSelf(
"FL#fastloading#yellowtext#cccc_ic_support#flipping#looping_sfx#effects#%"
);
}
diff --git a/webAO/packets/handlers/handleID.ts b/webAO/packets/handlers/handleID.ts
index 7def483..cd7b6ed 100644
--- a/webAO/packets/handlers/handleID.ts
+++ b/webAO/packets/handlers/handleID.ts
@@ -13,7 +13,7 @@ export const handleID = (args: string[]) => {
serverVersion = args[2].split("&")[1];
} else if (serverSoftware === "webAO") {
setOldLoading(false);
- client.sendSelf("PN#0#1#%");
+ client.sender.sendSelf("PN#0#1#%");
} else {
serverVersion = args[3];
}
diff --git a/webAO/packets/handlers/handlePN.ts b/webAO/packets/handlers/handlePN.ts
index b16f77d..1b66fb9 100644
--- a/webAO/packets/handlers/handlePN.ts
+++ b/webAO/packets/handlers/handlePN.ts
@@ -5,5 +5,5 @@ import { client } from "../../client";
* @param {Array} args packet arguments
*/
export const handlePN = (_args: string[]) => {
- client.sendServer("askchaa#%");
+ client.sender.sendServer("askchaa#%");
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleRC.ts b/webAO/packets/handlers/handleRC.ts
index 92c1e8e..0b5679f 100644
--- a/webAO/packets/handlers/handleRC.ts
+++ b/webAO/packets/handlers/handleRC.ts
@@ -6,5 +6,5 @@ import vanilla_character_arr from "../../constants/characters.js";
* @param {Array} args packet arguments
*/
export const handleRC = (_args: string[]) => {
- client.sendSelf(`SC#${vanilla_character_arr.join("#")}#%`);
+ client.sender.sendSelf(`SC#${vanilla_character_arr.join("#")}#%`);
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleRD.ts b/webAO/packets/handlers/handleRD.ts
index 780b43f..dde994c 100644
--- a/webAO/packets/handlers/handleRD.ts
+++ b/webAO/packets/handlers/handleRD.ts
@@ -6,8 +6,8 @@ import { client } from "../../client";
* @param {Array} args packet arguments
*/
export const handleRD = (_args: string[]) => {
- client.sendSelf("BN#gs4#%");
- client.sendSelf("DONE#%");
+ client.sender.sendSelf("BN#gs4#%");
+ client.sender.sendSelf("DONE#%");
const ooclog = <HTMLInputElement>document.getElementById("client_ooclog");
ooclog.value = "";
ooclog.readOnly = false;
diff --git a/webAO/packets/handlers/handleRM.ts b/webAO/packets/handlers/handleRM.ts
index 41a78b4..c18821b 100644
--- a/webAO/packets/handlers/handleRM.ts
+++ b/webAO/packets/handlers/handleRM.ts
@@ -6,5 +6,5 @@ import vanilla_music_arr from "../../constants/music.js";
* @param {Array} args packet arguments
*/
export const handleRM = (_args: string[]) => {
- client.sendSelf(`SM#${vanilla_music_arr.join("#")}#%`);
+ client.sender.sendSelf(`SM#${vanilla_music_arr.join("#")}#%`);
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleSC.ts b/webAO/packets/handlers/handleSC.ts
index 3689a17..f4953e0 100644
--- a/webAO/packets/handlers/handleSC.ts
+++ b/webAO/packets/handlers/handleSC.ts
@@ -33,5 +33,5 @@ export const handleSC = async (args: string[]) => {
client.handleCharacterInfo(chargs, charid);
}
// We're done with the characters, request the music
- client.sendServer("RM#%");
+ client.sender.sendServer("RM#%");
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleSI.ts b/webAO/packets/handlers/handleSI.ts
index e040c83..b32fbc1 100644
--- a/webAO/packets/handlers/handleSI.ts
+++ b/webAO/packets/handlers/handleSI.ts
@@ -34,8 +34,8 @@ export const handleSI = (args: string[]) => {
// this is determined at the top of this file
if (!oldLoading && extrafeatures.includes("fastloading")) {
- client.sendServer("RC#%");
+ client.sender.sendServer("RC#%");
} else {
- client.sendServer("askchar2#%");
+ client.sender.sendServer("askchar2#%");
}
} \ No newline at end of file
diff --git a/webAO/packets/handlers/handleSM.ts b/webAO/packets/handlers/handleSM.ts
index 5dab83e..48f9cd9 100644
--- a/webAO/packets/handlers/handleSM.ts
+++ b/webAO/packets/handlers/handleSM.ts
@@ -32,5 +32,5 @@ export const handleSM = (args: string[]) => {
}
// Music done, carry on
- client.sendServer("RD#%");
+ client.sender.sendServer("RD#%");
}
diff --git a/webAO/packets/handlers/handleaskchaa.ts b/webAO/packets/handlers/handleaskchaa.ts
index 5930bf0..0f9e730 100644
--- a/webAO/packets/handlers/handleaskchaa.ts
+++ b/webAO/packets/handlers/handleaskchaa.ts
@@ -6,5 +6,5 @@ import vanilla_character_arr from "../../constants/characters.js";
* @param {Array} args packet arguments
*/
export const handleaskchaa = (_args: string[]) => {
- client.sendSelf(`SI#${vanilla_character_arr.length}#0#0#%`);
+ client.sender.sendSelf(`SI#${vanilla_character_arr.length}#0#0#%`);
}