… | |
… | |
105 | $ns->send_drawinfo ( |
105 | $ns->send_drawinfo ( |
106 | "That username is currently used in another login session. " |
106 | "That username is currently used in another login session. " |
107 | . "Chose another, or wait till the other session has ended.", |
107 | . "Chose another, or wait till the other session has ended.", |
108 | cf::NDI_RED |
108 | cf::NDI_RED |
109 | ); |
109 | ); |
110 | } elsif ($user =~ /^[a-zA-Z0-9][a-zA-Z0-9\-_]{2,17}$/) { |
110 | } elsif ($user =~ /^[a-zA-Z0-9][a-zA-Z0-9\-_]{2,17}\z/) { |
111 | last; |
111 | last; |
112 | } else { |
112 | } else { |
113 | $ns->send_drawinfo ( |
113 | $ns->send_drawinfo ( |
114 | "Your username contains illegal characters " |
114 | "Your username contains illegal characters " |
115 | . "(only a-z, A-Z and 0-9 are allowed), " |
115 | . "(only a-z, A-Z and 0-9 are allowed), " |