… | |
… | |
230 | $ns->send_drawinfo ( |
230 | $ns->send_drawinfo ( |
231 | "That username is currently used in another login session. " |
231 | "That username is currently used in another login session. " |
232 | . "Chose another, or wait till the other session has ended.", |
232 | . "Chose another, or wait till the other session has ended.", |
233 | cf::NDI_RED |
233 | cf::NDI_RED |
234 | ); |
234 | ); |
235 | } elsif ($user =~ /^[a-zA-Z0-9][a-zA-Z0-9\-_]{2,17}\z/) { |
235 | } elsif ($user =~ /^[a-zA-Z0-9][a-zA-Z0-9\-_]{2,19}\z/) { |
236 | last; |
236 | last; |
237 | } else { |
237 | } else { |
238 | $ns->send_drawinfo ( |
238 | $ns->send_drawinfo ( |
239 | "Your username contains illegal characters " |
239 | "Your username contains illegal characters " |
240 | . "(only a-z, A-Z and 0-9 are allowed), " |
240 | . "(only a-z, A-Z and 0-9 are allowed), " |
241 | . "or is not between 3 and 18 characters in length.", |
241 | . "or is not between 3 and 20 characters in length.", |
242 | cf::NDI_RED |
242 | cf::NDI_RED |
243 | ); |
243 | ); |
244 | } |
244 | } |
245 | Coro::Timer::sleep 0.4; |
245 | Coro::Timer::sleep 0.4; |
246 | } |
246 | } |