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.|
|
||||
|`morestats`||Sends back the current server's stats to the calling client.|
|
||||
|`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.|
|
||||
|
||||
# `mod`
|
||||
|
|
|
@ -82,7 +82,9 @@ The [documentation](DOCUMENTATION.md) can be useful for making bots etc.
|
|||
|
||||
# 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
|
||||
|
||||
|
|
|
@ -40,8 +40,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['trip'];
|
||||
|
||||
exports.info = {
|
||||
name: 'addmod',
|
||||
usage: 'addmod {trip}',
|
||||
description: 'Adds target trip to the config as a mod and upgrades the socket type'
|
||||
};
|
||||
exports.info = { name: 'addmod' };
|
||||
|
|
|
@ -32,7 +32,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
}, socket);
|
||||
};
|
||||
|
||||
exports.info = {
|
||||
name: 'listusers',
|
||||
description: 'Outputs all current channels and sockets in those channels'
|
||||
};
|
||||
exports.info = { name: 'listusers' };
|
||||
|
|
|
@ -28,7 +28,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
}, { uType: 'mod' });
|
||||
};
|
||||
|
||||
exports.info = {
|
||||
name: 'reload',
|
||||
description: '(Re)loads any new commands into memory, outputs errors if any'
|
||||
};
|
||||
exports.info = { name: 'reload' };
|
||||
|
|
|
@ -30,7 +30,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
}, { uType: 'mod' });
|
||||
};
|
||||
|
||||
exports.info = {
|
||||
name: 'saveconfig',
|
||||
description: 'Saves current config'
|
||||
};
|
||||
exports.info = { name: 'saveconfig' };
|
||||
|
|
|
@ -16,8 +16,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['text'];
|
||||
|
||||
exports.info = {
|
||||
name: 'shout',
|
||||
usage: 'shout {text}',
|
||||
description: 'Displays passed text to every client connected'
|
||||
};
|
||||
exports.info = { name: 'shout' };
|
||||
|
|
|
@ -81,8 +81,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['nick'];
|
||||
|
||||
exports.info = {
|
||||
name: 'changenick',
|
||||
usage: 'changenick {nick}',
|
||||
description: 'This will change your current connections nickname'
|
||||
};
|
||||
exports.info = { name: 'changenick' };
|
||||
|
|
|
@ -55,8 +55,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['text'];
|
||||
|
||||
exports.info = {
|
||||
name: 'chat',
|
||||
usage: 'chat {text}',
|
||||
description: 'Broadcasts passed `text` field to the calling users channel'
|
||||
};
|
||||
exports.info = { name: 'chat' };
|
||||
|
|
|
@ -15,7 +15,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
socket.terminate();
|
||||
};
|
||||
|
||||
exports.info = {
|
||||
name: 'disconnect',
|
||||
description: 'Event handler or force disconnect (if your into that kind of thing)'
|
||||
};
|
||||
exports.info = { name: 'disconnect' };
|
||||
|
|
|
@ -58,8 +58,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['nick'];
|
||||
|
||||
exports.info = {
|
||||
name: 'invite',
|
||||
usage: 'invite {nick}',
|
||||
description: 'Generates a unique (more or less) room name and passes it to two clients'
|
||||
};
|
||||
exports.info = { name: 'invite' };
|
||||
|
|
|
@ -128,8 +128,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['channel', 'nick'];
|
||||
|
||||
exports.info = {
|
||||
name: 'join',
|
||||
usage: 'join {channel} {nick}',
|
||||
description: 'Place calling socket into target channel with target nick & broadcast event to channel'
|
||||
};
|
||||
exports.info = { name: 'join' };
|
||||
|
|
|
@ -47,7 +47,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
core.managers.stats.increment('stats-requested');
|
||||
};
|
||||
|
||||
exports.info = {
|
||||
name: 'morestats',
|
||||
description: 'Sends back current server stats to the calling client'
|
||||
};
|
||||
exports.info = { name: 'morestats' };
|
||||
|
|
|
@ -76,8 +76,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['channel'];
|
||||
|
||||
exports.info = {
|
||||
name: 'move',
|
||||
usage: 'move {channel}',
|
||||
description: 'This will change the current channel to the new one provided'
|
||||
};
|
||||
exports.info = { name: 'move' };
|
||||
|
|
|
@ -43,9 +43,7 @@ exports.init = (core) => {
|
|||
exports.requiredData = ['echo'];
|
||||
|
||||
// optional parameters are marked, all others are required
|
||||
exports.info = {
|
||||
exports.info = {
|
||||
name: 'showcase', // actual command name
|
||||
aliases: ['templateModule'], // optional, an array of other names this module can be executed by
|
||||
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
|
||||
aliases: ['templateModule']
|
||||
};
|
||||
|
|
|
@ -26,7 +26,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
core.managers.stats.increment('stats-requested');
|
||||
};
|
||||
|
||||
exports.info = {
|
||||
name: 'stats',
|
||||
description: 'Sends back legacy server stats to the calling client'
|
||||
};
|
||||
exports.info = { name: 'stats' };
|
||||
|
|
|
@ -57,8 +57,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['nick'];
|
||||
|
||||
exports.info = {
|
||||
name: 'ban',
|
||||
usage: 'ban {nick}',
|
||||
description: 'Disconnects the target nickname in the same channel as calling socket & adds to ratelimiter'
|
||||
};
|
||||
exports.info = { name: 'ban' };
|
||||
|
|
|
@ -71,8 +71,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
|
||||
exports.requiredData = ['nick'];
|
||||
|
||||
exports.info = {
|
||||
name: 'kick',
|
||||
usage: 'kick {nick}',
|
||||
description: 'Silently forces target client(s) into another channel. `nick` may be string or array of strings'
|
||||
};
|
||||
exports.info = { name: 'kick' };
|
||||
|
|
|
@ -48,8 +48,4 @@ exports.run = async (core, server, socket, data) => {
|
|||
core.managers.stats.decrement('users-banned');
|
||||
};
|
||||
|
||||
exports.info = {
|
||||
name: 'unban',
|
||||
usage: 'unban {[ip || hash]}',
|
||||
description: 'Removes target ip from the ratelimiter'
|
||||
};
|
||||
exports.info = { name: 'unban' };
|
||||
|
|
Loading…
Reference in New Issue
Block a user