diff options
Diffstat (limited to '')
-rw-r--r-- | server/src/commands/utility/UAC/_info.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/server/src/commands/utility/UAC/_info.js b/server/src/commands/utility/UAC/_info.js index 6da85d5..d34a384 100644 --- a/server/src/commands/utility/UAC/_info.js +++ b/server/src/commands/utility/UAC/_info.js @@ -1,6 +1,6 @@ /** * User Account Control information containing level constants - * and simple helper functions used to verify permissions + * and simple helper functions related to users * @property {Object} levels - Defines labels for default permission ranges * @author MinusGix ( https://github.com/MinusGix ) * @version v1.0.0 @@ -83,3 +83,13 @@ export function isChannelTrusted(level) { export function isTrustedUser(level) { return level >= levels.trustedUser; } + +/** + * Returns true if the nickname is valid + * @public + * @param {String} nick + * @return {boolean} + */ +export function verifyNickname (nick) { + return /^[a-zA-Z0-9_]{1,24}$/.test(nick); +}
\ No newline at end of file |