mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
Remove unused object fields
This commit is contained in:
parent
4b30736929
commit
acbad15f2b
|
@ -15,7 +15,6 @@ The commands are to be sent through a websocket to the URL wss://hack.chat/chat-
|
||||||
|`join`|`channel`, `nick`|Places the calling socket into the target channel with the target nick and broadcasts the event to the channel.|
|
|`join`|`channel`, `nick`|Places the calling socket into the target channel with the target nick and broadcasts the event to the channel.|
|
||||||
|`morestats`||Sends back the current server's stats to the calling client.|
|
|`morestats`||Sends back the current server's stats to the calling client.|
|
||||||
|`move`|`channel`|This will change the current channel to `channel`.|
|
|`move`|`channel`|This will change the current channel to `channel`.|
|
||||||
|`showcases`|`echo`|Simple command module template & info|
|
|
||||||
|`stats`||Sends back legacy server stats to the calling client. Use `morestats` when possible.|
|
|`stats`||Sends back legacy server stats to the calling client. Use `morestats` when possible.|
|
||||||
|
|
||||||
# `mod`
|
# `mod`
|
||||||
|
|
|
@ -82,7 +82,9 @@ The [documentation](DOCUMENTATION.md) can be useful for making bots etc.
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
|
|
||||||
If you are changing the commands, make sure it is backwards compatible with the legacy client and you update the [documentation doc](DOCUMENTATION.md) accordingly.
|
If you are changing the commands, make sure it is backwards compatible with the legacy client and you update the [documentation](DOCUMENTATION.md) accordingly.
|
||||||
|
|
||||||
|
If you are making a command, see [the template](server/src/commands/core/showcase.js) for doing so.
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['trip'];
|
exports.requiredData = ['trip'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'addmod' };
|
||||||
name: 'addmod',
|
|
||||||
usage: 'addmod {trip}',
|
|
||||||
description: 'Adds target trip to the config as a mod and upgrades the socket type'
|
|
||||||
};
|
|
||||||
|
|
|
@ -32,7 +32,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
}, socket);
|
}, socket);
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'listusers' };
|
||||||
name: 'listusers',
|
|
||||||
description: 'Outputs all current channels and sockets in those channels'
|
|
||||||
};
|
|
||||||
|
|
|
@ -28,7 +28,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
}, { uType: 'mod' });
|
}, { uType: 'mod' });
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'reload' };
|
||||||
name: 'reload',
|
|
||||||
description: '(Re)loads any new commands into memory, outputs errors if any'
|
|
||||||
};
|
|
||||||
|
|
|
@ -30,7 +30,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
}, { uType: 'mod' });
|
}, { uType: 'mod' });
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'saveconfig' };
|
||||||
name: 'saveconfig',
|
|
||||||
description: 'Saves current config'
|
|
||||||
};
|
|
||||||
|
|
|
@ -16,8 +16,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['text'];
|
exports.requiredData = ['text'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'shout' };
|
||||||
name: 'shout',
|
|
||||||
usage: 'shout {text}',
|
|
||||||
description: 'Displays passed text to every client connected'
|
|
||||||
};
|
|
||||||
|
|
|
@ -81,8 +81,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['nick'];
|
exports.requiredData = ['nick'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'changenick' };
|
||||||
name: 'changenick',
|
|
||||||
usage: 'changenick {nick}',
|
|
||||||
description: 'This will change your current connections nickname'
|
|
||||||
};
|
|
||||||
|
|
|
@ -55,8 +55,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['text'];
|
exports.requiredData = ['text'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'chat' };
|
||||||
name: 'chat',
|
|
||||||
usage: 'chat {text}',
|
|
||||||
description: 'Broadcasts passed `text` field to the calling users channel'
|
|
||||||
};
|
|
||||||
|
|
|
@ -15,7 +15,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
socket.terminate();
|
socket.terminate();
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'disconnect' };
|
||||||
name: 'disconnect',
|
|
||||||
description: 'Event handler or force disconnect (if your into that kind of thing)'
|
|
||||||
};
|
|
||||||
|
|
|
@ -58,8 +58,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['nick'];
|
exports.requiredData = ['nick'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'invite' };
|
||||||
name: 'invite',
|
|
||||||
usage: 'invite {nick}',
|
|
||||||
description: 'Generates a unique (more or less) room name and passes it to two clients'
|
|
||||||
};
|
|
||||||
|
|
|
@ -128,8 +128,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['channel', 'nick'];
|
exports.requiredData = ['channel', 'nick'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'join' };
|
||||||
name: 'join',
|
|
||||||
usage: 'join {channel} {nick}',
|
|
||||||
description: 'Place calling socket into target channel with target nick & broadcast event to channel'
|
|
||||||
};
|
|
||||||
|
|
|
@ -47,7 +47,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
core.managers.stats.increment('stats-requested');
|
core.managers.stats.increment('stats-requested');
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'morestats' };
|
||||||
name: 'morestats',
|
|
||||||
description: 'Sends back current server stats to the calling client'
|
|
||||||
};
|
|
||||||
|
|
|
@ -76,8 +76,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['channel'];
|
exports.requiredData = ['channel'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'move' };
|
||||||
name: 'move',
|
|
||||||
usage: 'move {channel}',
|
|
||||||
description: 'This will change the current channel to the new one provided'
|
|
||||||
};
|
|
||||||
|
|
|
@ -45,7 +45,5 @@ exports.requiredData = ['echo'];
|
||||||
// optional parameters are marked, all others are required
|
// optional parameters are marked, all others are required
|
||||||
exports.info = {
|
exports.info = {
|
||||||
name: 'showcase', // actual command name
|
name: 'showcase', // actual command name
|
||||||
aliases: ['templateModule'], // optional, an array of other names this module can be executed by
|
aliases: ['templateModule']
|
||||||
usage: 'showcase {echo}', // used for help output, can be ommited if no parameters are required
|
|
||||||
description: 'Simple command module template & info' // used for help output
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -26,7 +26,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
core.managers.stats.increment('stats-requested');
|
core.managers.stats.increment('stats-requested');
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'stats' };
|
||||||
name: 'stats',
|
|
||||||
description: 'Sends back legacy server stats to the calling client'
|
|
||||||
};
|
|
||||||
|
|
|
@ -57,8 +57,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['nick'];
|
exports.requiredData = ['nick'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'ban' };
|
||||||
name: 'ban',
|
|
||||||
usage: 'ban {nick}',
|
|
||||||
description: 'Disconnects the target nickname in the same channel as calling socket & adds to ratelimiter'
|
|
||||||
};
|
|
||||||
|
|
|
@ -71,8 +71,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
|
|
||||||
exports.requiredData = ['nick'];
|
exports.requiredData = ['nick'];
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'kick' };
|
||||||
name: 'kick',
|
|
||||||
usage: 'kick {nick}',
|
|
||||||
description: 'Silently forces target client(s) into another channel. `nick` may be string or array of strings'
|
|
||||||
};
|
|
||||||
|
|
|
@ -48,8 +48,4 @@ exports.run = async (core, server, socket, data) => {
|
||||||
core.managers.stats.decrement('users-banned');
|
core.managers.stats.decrement('users-banned');
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.info = {
|
exports.info = { name: 'unban' };
|
||||||
name: 'unban',
|
|
||||||
usage: 'unban {[ip || hash]}',
|
|
||||||
description: 'Removes target ip from the ratelimiter'
|
|
||||||
};
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user