Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
2573:fc54c1a070e7 | 2574:3526c5581f92 |
---|---|
886 } | 886 } |
887 | 887 |
888 if (idata->fd != source) | 888 if (idata->fd != source) |
889 idata->fd = source; | 889 idata->fd = source; |
890 | 890 |
891 g_snprintf(buf, sizeof(buf), "NICK %s\r\n", gc->username); | |
892 if (irc_write(idata->fd, buf, strlen(buf)) < 0) { | |
893 hide_login_progress(gc, "Write error"); | |
894 signoff(gc); | |
895 return; | |
896 } | |
897 | |
898 gethostname(hostname, sizeof(hostname) - 1); | 891 gethostname(hostname, sizeof(hostname) - 1); |
899 hostname[sizeof(hostname) - 1] = 0; | 892 hostname[sizeof(hostname) - 1] = 0; |
900 if (!*hostname) | 893 if (!*hostname) |
901 g_snprintf(hostname, sizeof(hostname), "localhost"); | 894 g_snprintf(hostname, sizeof(hostname), "localhost"); |
902 g_snprintf(buf, sizeof(buf), "USER %s %s %s :Gaim (%s)\r\n", | 895 g_snprintf(buf, sizeof(buf), "USER %s %s %s :Gaim (%s)\r\n", |
903 g_get_user_name(), hostname, gc->user->proto_opt[USEROPT_SERV], WEBSITE); | 896 g_get_user_name(), hostname, gc->user->proto_opt[USEROPT_SERV], WEBSITE); |
897 if (irc_write(idata->fd, buf, strlen(buf)) < 0) { | |
898 hide_login_progress(gc, "Write error"); | |
899 signoff(gc); | |
900 return; | |
901 } | |
902 | |
903 g_snprintf(buf, sizeof(buf), "NICK %s\r\n", gc->username); | |
904 if (irc_write(idata->fd, buf, strlen(buf)) < 0) { | 904 if (irc_write(idata->fd, buf, strlen(buf)) < 0) { |
905 hide_login_progress(gc, "Write error"); | 905 hide_login_progress(gc, "Write error"); |
906 signoff(gc); | 906 signoff(gc); |
907 return; | 907 return; |
908 } | 908 } |