1 Commits

Author SHA1 Message Date
9cb41a8693 Change nickname validation to match classic launcher 2026-02-18 08:44:16 -06:00

View File

@@ -61,10 +61,8 @@ class W3DHub
prefill: Store.settings[:server_list_username],
accept_callback: accept_callback,
cancel_callback: cancel_callback,
# See: https://gitlab.com/danpaul88/brenbot/-/blob/master/Source/renlog.pm#L136-175
valid_callback: proc do |entry|
entry.length > 1 && entry.length < 30 && (entry =~ /(:|!|&|%| )/i).nil? &&
(entry =~ /[\001\002\037]/).nil? && (entry =~ /\\/).nil?
entry.length.between?(3, 40) && (entry =~ /^[a-z0-9_\-\[\]]+$/i)
end
)
end
@@ -123,7 +121,6 @@ class W3DHub
process_info = Process.create(**hash)
pid = process_info.process_id
status = -1
until (status = Process.get_exitcode(pid))
if block