Mercurial > pidgin.yaz
diff src/protocols/irc/irc.c @ 3789:fb519383a058
[gaim-migrate @ 3929]
IRC passwd patch from Chip.
Fixed a compile warning in conversation.c. Nathan, tell me if this breaks
anything ;-)
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Tue, 22 Oct 2002 23:31:49 +0000 |
parents | e25577506dec |
children | ed3e19143373 |
line wrap: on
line diff
--- a/src/protocols/irc/irc.c Tue Oct 22 23:18:45 2002 +0000 +++ b/src/protocols/irc/irc.c Tue Oct 22 23:31:49 2002 +0000 @@ -1669,6 +1669,17 @@ hostname[sizeof(hostname) - 1] = 0; if (!*hostname) g_snprintf(hostname, sizeof(hostname), "localhost"); + + if (*gc->user->password) { + g_snprintf(buf, sizeof(buf), "PASS %s\r\n", gc->user->password); + + if (irc_write(idata->fd, buf, strlen(buf)) < 0) { + hide_login_progress(gc, "Write error"); + signoff(gc); + return; + } + } + g_snprintf(buf, sizeof(buf), "USER %s %s %s :%s\r\n", g_get_user_name(), hostname, gc->user->proto_opt[USEROPT_SERV], @@ -2670,7 +2681,7 @@ { struct proto_user_opt *puo; ret->protocol = PROTO_IRC; - ret->options = OPT_PROTO_CHAT_TOPIC | OPT_PROTO_NO_PASSWORD; + ret->options = OPT_PROTO_CHAT_TOPIC | OPT_PROTO_PASSWORD_OPTIONAL; ret->name = g_strdup("IRC"); ret->list_icon = irc_list_icon; ret->login = irc_login;