Mercurial > pidgin.yaz
comparison src/protocols/irc/irc.c @ 5589:343dbdcc44e2
[gaim-migrate @ 5993]
Fixed it.
committer: Tailor Script <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Sat, 31 May 2003 07:19:26 +0000 |
| parents | a569fef2a6b1 |
| children | 83991299705c |
comparison
equal
deleted
inserted
replaced
| 5588:a569fef2a6b1 | 5589:343dbdcc44e2 |
|---|---|
| 1906 gethostname(hostname, sizeof(hostname) - 1); | 1906 gethostname(hostname, sizeof(hostname) - 1); |
| 1907 hostname[sizeof(hostname) - 1] = 0; | 1907 hostname[sizeof(hostname) - 1] = 0; |
| 1908 if (!*hostname) | 1908 if (!*hostname) |
| 1909 g_snprintf(hostname, sizeof(hostname), "localhost"); | 1909 g_snprintf(hostname, sizeof(hostname), "localhost"); |
| 1910 | 1910 |
| 1911 if (*gc->account->password) { | 1911 if (gc->account->password != NULL) { |
| 1912 g_snprintf(buf, sizeof(buf), "PASS %s\r\n", gaim_account_get_password(account)); | 1912 g_snprintf(buf, sizeof(buf), "PASS %s\r\n", gaim_account_get_password(account)); |
| 1913 | 1913 |
| 1914 if (irc_write(idata->fd, buf, strlen(buf)) < 0) { | 1914 if (irc_write(idata->fd, buf, strlen(buf)) < 0) { |
| 1915 gaim_connection_error(gc, "Write error"); | 1915 gaim_connection_error(gc, "Write error"); |
| 1916 return; | 1916 return; |
| 1917 } | 1917 } |
| 1918 } | |
| 1918 | 1919 |
| 1919 g_snprintf(buf, sizeof(buf), "USER %s %s %s :%s\r\n", | 1920 g_snprintf(buf, sizeof(buf), "USER %s %s %s :%s\r\n", |
| 1920 g_get_user_name(), hostname, | 1921 g_get_user_name(), hostname, |
| 1921 idata->server, | 1922 idata->server, |
| 1922 *gc->account->alias ? gc->account->alias : "gaim"); | 1923 *gc->account->alias ? gc->account->alias : "gaim"); |
| 1974 rc = proxy_connect(account, idata->server, | 1975 rc = proxy_connect(account, idata->server, |
| 1975 gaim_account_get_int(account, "port", 6667), | 1976 gaim_account_get_int(account, "port", 6667), |
| 1976 irc_login_callback, gc); | 1977 irc_login_callback, gc); |
| 1977 | 1978 |
| 1978 if (!account->gc || (rc != 0)) { | 1979 if (!account->gc || (rc != 0)) { |
| 1979 gaim_connection_error(gc, "Unable to create socket"); | 1980 gaim_connection_error(gc, _("Unable to create socket")); |
| 1980 return; | 1981 return; |
| 1981 } | 1982 } |
| 1982 } | 1983 } |
| 1983 | 1984 |
| 1984 static void | 1985 static void |
