diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-06-11 18:59:39 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-06-11 18:59:39 +0100 | 
| commit | 4bc66aeeacdc5c585a5816ef8aafffb787b05262 (patch) | |
| tree | 61ca9d72e399ef62f71f60ea6af8a121ec022526 /protocols/twitter/twitter.c | |
| parent | c0f33f1ea6aa05543b81f4eb0b9cc3a11446f996 (diff) | |
Oops. prefix shouldn't be just "ca" for identi.ca.
Diffstat (limited to 'protocols/twitter/twitter.c')
| -rw-r--r-- | protocols/twitter/twitter.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/protocols/twitter/twitter.c b/protocols/twitter/twitter.c index 41eabc5a..692afcd2 100644 --- a/protocols/twitter/twitter.c +++ b/protocols/twitter/twitter.c @@ -282,7 +282,9 @@ static void twitter_login(account_t * acc)  	td->prefix = g_strdup(url.host);  	if (g_str_has_suffix(td->prefix, ".com"))  		td->prefix[strlen(url.host) - 4] = '\0'; -	if ((s = strrchr(td->prefix, '.'))) { +	if ((s = strrchr(td->prefix, '.')) && strlen(s) > 4) { +		/* If we have at least 3 chars after the last dot, cut off the rest. +		   (mostly a www/api prefix or sth) */  		s = g_strdup(s + 1);  		g_free(td->prefix);  		td->prefix = s; | 
