Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/msnutils.c @ 31183:0201164946a3
msn_email_is_valid looks a lot like a util function, move it there.
author | masca@cpw.pidgin.im |
---|---|
date | Fri, 28 May 2010 08:28:37 +0000 |
parents | 5a70b5364229 |
children | 230caecf5435 |
comparison
equal
deleted
inserted
replaced
31182:a34622165ecd | 31183:0201164946a3 |
---|---|
472 | 472 |
473 *ret_host = host; | 473 *ret_host = host; |
474 *ret_port = port; | 474 *ret_port = port; |
475 } | 475 } |
476 | 476 |
477 gboolean | |
478 msn_email_is_valid(const char *passport) | |
479 { | |
480 if (purple_email_is_valid(passport)) { | |
481 /* Special characters aren't allowed in domains, so only go to '@' */ | |
482 while (*passport != '@') { | |
483 if (*passport == '/') | |
484 return FALSE; | |
485 else if (*passport == '?') | |
486 return FALSE; | |
487 else if (*passport == '=') | |
488 return FALSE; | |
489 /* MSN also doesn't like colons, but that's checked already */ | |
490 | |
491 passport++; | |
492 } | |
493 | |
494 return TRUE; | |
495 } | |
496 | |
497 return FALSE; | |
498 } | |
499 | |
477 /*************************************************************************** | 500 /*************************************************************************** |
478 * MSN Challenge Computing Function | 501 * MSN Challenge Computing Function |
479 ***************************************************************************/ | 502 ***************************************************************************/ |
480 | 503 |
481 /* | 504 /* |