forked from CringeStudios/gamja
parent
d34bff9ed6
commit
d5e21097f8
14
commands.js
14
commands.js
@ -1,3 +1,4 @@
|
||||
import * as irc from "../lib/irc.js";
|
||||
import { SERVER_BUFFER, BufferType } from "./state.js";
|
||||
|
||||
function getActiveClient(app) {
|
||||
@ -151,6 +152,19 @@ export default {
|
||||
app.close({ name: SERVER_BUFFER });
|
||||
},
|
||||
},
|
||||
"quote": {
|
||||
usage: "<command>",
|
||||
description: "Send a raw IRC command to the server",
|
||||
execute: (app, args) => {
|
||||
var msg;
|
||||
try {
|
||||
msg = irc.parseMessage(args.join(" "));
|
||||
} catch (err) {
|
||||
throw new Error("failed to parse IRC command: " + err.message);
|
||||
}
|
||||
getActiveClient(app).send(msg);
|
||||
},
|
||||
},
|
||||
"reconnect": {
|
||||
description: "Reconnect to the server",
|
||||
execute: (app, args) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user