aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/sender/sendServer.ts
blob: ae95480c527da875f9f6907920d9bf0f89c77d3c (plain)
1
2
3
4
5
6
7
8
9
10
11
import { client } from "../../client";
import queryParser from "../../utils/queryParser";
const { mode } = queryParser()
/**
 * Hook for sending messages to the server
 * @param {string} message the message to send
 */
export const sendServer = (message: string) => {
    console.debug("C: "+message)
    mode === "replay" ? client.sender.sendSelf(message) : client.serv.send(message);
}