forked from Hri7566/mpp-server-dev2
Comments
This commit is contained in:
parent
16b4a93e72
commit
3994368f3c
|
@ -1,3 +1,9 @@
|
||||||
|
/**
|
||||||
|
* Socket connection module
|
||||||
|
*
|
||||||
|
* Represents user connections
|
||||||
|
*/
|
||||||
|
|
||||||
import { createColor, createID, createUserID } from "../util/id";
|
import { createColor, createID, createUserID } from "../util/id";
|
||||||
import EventEmitter from "events";
|
import EventEmitter from "events";
|
||||||
import {
|
import {
|
||||||
|
@ -303,6 +309,7 @@ export class Socket extends EventEmitter {
|
||||||
public async userset(name?: string, color?: string) {
|
public async userset(name?: string, color?: string) {
|
||||||
let isColor = false;
|
let isColor = false;
|
||||||
|
|
||||||
|
// Color changing
|
||||||
if (color && config.enableColorChanging) {
|
if (color && config.enableColorChanging) {
|
||||||
isColor =
|
isColor =
|
||||||
typeof color === "string" && !!color.match(/^#[0-9a-f]{6}$/i);
|
typeof color === "string" && !!color.match(/^#[0-9a-f]{6}$/i);
|
||||||
|
|
Loading…
Reference in New Issue