mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-15 11:12:16 -05:00
no asterisks allowed in nicknames
This commit is contained in:
@@ -9,7 +9,8 @@ function sanitizeNickname(raw) {
|
|||||||
if (typeof raw !== 'string') return '';
|
if (typeof raw !== 'string') return '';
|
||||||
const trimmed = raw.trim();
|
const trimmed = raw.trim();
|
||||||
if (!trimmed) return '';
|
if (!trimmed) return '';
|
||||||
return trimmed.slice(0, 32);
|
const sanitized = trimmed.replace(/\*/g, 'nope');
|
||||||
|
return sanitized.slice(0, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
function getNickname(socket) {
|
function getNickname(socket) {
|
||||||
|
|||||||
Reference in New Issue
Block a user