Home World Forum
Stars! AutoHost forums

Jump to Stars! AutoHost


 
Home » Stars! 2.6/7 » Questions about Stars! AutoHost » Little Bug in Host Utility
Little Bug in Host Utility Tue, 30 August 2005 09:55 Go to next message
wizard is currently offline wizard

 
Officer Cadet 3rd Year

Messages: 279
Registered: January 2004
Location: Aachen, Germany
I think this is a bug...
I tried to insert a player email address xyz@gmx.info. This always causes the host utility to report the following:
Quote:

ERROR:
Invalid player email address for Player 9. Ensure no space in or after email address.



I suppose this is because of the 4-letter Top Level Domain .info. Obviously this causes the email address check to fail.

Mailed to Ron too.

Andreas / wizard

Report message to a moderator

Re: Little Bug in Host Utility Wed, 31 August 2005 12:51 Go to previous messageGo to next message
Ron is currently offline Ron

 
Commander
Forum Administrator

Messages: 1238
Registered: October 2002
Location: Collegedale, TN
Here's the PERL code to validate emails.

Anyone see a problem, why it has trouble with wizard's email?

sub valid_address {
        my @testmail;
        my $data;
        my $test;
        my $flag = 0;
        ($data) = @_;
        @testmail = split('\,',$data);
        if ($data !~ /,/) {
                $testmail = $data;
        }
        foreach $test (@testmail) {
                if ($test=~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $test!~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,5}|[0-9]{1,5})(\]?) $/ ) {
                        $flag = 1;
                }
                else {
                        $flag = 0;
                }
        }
        if ($flag) { return 0; }
        else { return 1; }
}



Ron Miller
Stars! AutoHost

Report message to a moderator

Re: Little Bug in Host Utility Thu, 01 September 2005 09:40 Go to previous messageGo to next message
LEit is currently offline LEit

 
Lt. Commander

Messages: 879
Registered: April 2003
Location: CT
I'm not 100% sure about perl syntax, but does '{2,5}' or '{1,5}' mean a substring, perhaps limiting the length to three characters? Although I'd read it as between 2 and 5 letters or between 1 and 5 numbers, and no combining letters and numbers. This is for the last section of the mail address only (.info in this case).

If there is a period after the email address as the original post includes, there will be a problem.

[Updated on: Thu, 01 September 2005 09:41]




- LEit

Report message to a moderator

Re: Little Bug in Host Utility Thu, 01 September 2005 13:03 Go to previous message
Kotk

 
Commander

Messages: 1227
Registered: May 2003
Quantifier {2,5} means that element preceeding it must occur at least 2 times but no more than 5 times.

Report message to a moderator

Previous Topic: faq for new users?
Next Topic: Do I need a computer connected to the net?
Goto Forum:
  


Current Time: Thu Dec 12 00:24:22 GMT-5 2024