mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
Comments fix
This commit is contained in:
parent
05436fa4dc
commit
0de1ece3e4
|
@ -2,7 +2,7 @@
|
|||
Description: Allows calling client to change their current nickname
|
||||
*/
|
||||
|
||||
import * as UAC from "../utility/UAC/_info";
|
||||
import * as UAC from '../utility/UAC/_info';
|
||||
|
||||
// module main
|
||||
export async function run(core, server, socket, data) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Description: Generates a semi-unique channel name then broadcasts it to each client
|
||||
*/
|
||||
|
||||
import * as UAC from "../utility/UAC/_info";
|
||||
import * as UAC from '../utility/UAC/_info';
|
||||
|
||||
// module main
|
||||
export async function run(core, server, socket, data) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Description: Display text on targets screen that only they can see
|
||||
*/
|
||||
|
||||
import * as UAC from "../utility/UAC/_info";
|
||||
import * as UAC from '../utility/UAC/_info';
|
||||
|
||||
// module support functions
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@ export const levels = {
|
|||
/**
|
||||
* Returns true if target level is equal or greater than the global admin level
|
||||
* @public
|
||||
* @param {number} level Level to verify
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function isAdmin(level) {
|
||||
|
@ -42,6 +43,7 @@ export function isAdmin(level) {
|
|||
/**
|
||||
* Returns true if target level is equal or greater than the global moderator level
|
||||
* @public
|
||||
* @param {number} level Level to verify
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function isModerator(level) {
|
||||
|
@ -51,6 +53,7 @@ export function isModerator(level) {
|
|||
/**
|
||||
* Returns true if target level is equal or greater than the channel owner level
|
||||
* @public
|
||||
* @param {number} level Level to verify
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function isChannelOwner(level) {
|
||||
|
@ -60,6 +63,7 @@ export function isChannelOwner(level) {
|
|||
/**
|
||||
* Returns true if target level is equal or greater than the channel moderator level
|
||||
* @public
|
||||
* @param {number} level Level to verify
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function isChannelModerator(level) {
|
||||
|
@ -69,6 +73,7 @@ export function isChannelModerator(level) {
|
|||
/**
|
||||
* Returns true if target level is equal or greater than the channel trust level
|
||||
* @public
|
||||
* @param {number} level Level to verify
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function isChannelTrusted(level) {
|
||||
|
@ -78,6 +83,7 @@ export function isChannelTrusted(level) {
|
|||
/**
|
||||
* Returns true if target level is equal or greater than a trusted user
|
||||
* @public
|
||||
* @param {number} level Level to verify
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function isTrustedUser(level) {
|
||||
|
@ -87,9 +93,9 @@ export function isTrustedUser(level) {
|
|||
/**
|
||||
* Returns true if the nickname is valid
|
||||
* @public
|
||||
* @param {String} nick
|
||||
* @param {string} nick Nickname to verify
|
||||
* @return {boolean}
|
||||
*/
|
||||
export function verifyNickname (nick) {
|
||||
export function verifyNickname(nick) {
|
||||
return /^[a-zA-Z0-9_]{1,24}$/.test(nick);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user