Mercurial > pidgin.yaz
diff src/protocols/irc/irc.c @ 2574:3526c5581f92
[gaim-migrate @ 2587]
we don't need to be reporting every bug that gets fixed :)
committer: Tailor Script <tailor@pidgin.im>
| author | Eric Warmenhoven <eric@warmenhoven.org> |
|---|---|
| date | Tue, 23 Oct 2001 00:35:02 +0000 |
| parents | 0e0a54e5819a |
| children | 251ecc5cd9b3 |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Tue Oct 23 00:19:38 2001 +0000 +++ b/src/protocols/irc/irc.c Tue Oct 23 00:35:02 2001 +0000 @@ -888,19 +888,19 @@ if (idata->fd != source) idata->fd = source; - g_snprintf(buf, sizeof(buf), "NICK %s\r\n", gc->username); + gethostname(hostname, sizeof(hostname) - 1); + hostname[sizeof(hostname) - 1] = 0; + if (!*hostname) + g_snprintf(hostname, sizeof(hostname), "localhost"); + g_snprintf(buf, sizeof(buf), "USER %s %s %s :Gaim (%s)\r\n", + g_get_user_name(), hostname, gc->user->proto_opt[USEROPT_SERV], WEBSITE); if (irc_write(idata->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Write error"); signoff(gc); return; } - gethostname(hostname, sizeof(hostname) - 1); - hostname[sizeof(hostname) - 1] = 0; - if (!*hostname) - g_snprintf(hostname, sizeof(hostname), "localhost"); - g_snprintf(buf, sizeof(buf), "USER %s %s %s :Gaim (%s)\r\n", - g_get_user_name(), hostname, gc->user->proto_opt[USEROPT_SERV], WEBSITE); + g_snprintf(buf, sizeof(buf), "NICK %s\r\n", gc->username); if (irc_write(idata->fd, buf, strlen(buf)) < 0) { hide_login_progress(gc, "Write error"); signoff(gc);
