comparison src/protocols/irc/irc.c @ 10555:761822c6f7ca

[gaim-migrate @ 11932] you'll see where i'm going with this eventually committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 29 Jan 2005 18:36:43 +0000
parents 1a97d5e88d12
children 9eb3b224face
comparison
equal deleted inserted replaced
10554:0ad82505bde8 10555:761822c6f7ca
272 272
273 err = gaim_proxy_connect(account, irc->server, 273 err = gaim_proxy_connect(account, irc->server,
274 gaim_account_get_int(account, "port", IRC_DEFAULT_PORT), 274 gaim_account_get_int(account, "port", IRC_DEFAULT_PORT),
275 irc_login_cb, gc); 275 irc_login_cb, gc);
276 276
277 if (err || !account->gc) { 277 if (err || !gaim_account_get_connection(account)) {
278 gaim_connection_error(gc, _("Couldn't create socket")); 278 gaim_connection_error(gc, _("Couldn't create socket"));
279 return; 279 return;
280 } 280 }
281 } 281 }
282 } 282 }
284 static gboolean do_login(GaimConnection *gc) { 284 static gboolean do_login(GaimConnection *gc) {
285 char *buf; 285 char *buf;
286 char hostname[256]; 286 char hostname[256];
287 const char *username, *realname; 287 const char *username, *realname;
288 struct irc_conn *irc = gc->proto_data; 288 struct irc_conn *irc = gc->proto_data;
289 289 const char *pass = gaim_account_get_password(gc->account);
290 if (gc->account->password && *gc->account->password) { 290
291 buf = irc_format(irc, "vv", "PASS", gc->account->password); 291 if (pass && *pass) {
292 buf = irc_format(irc, "vv", "PASS", pass);
292 if (irc_send(irc, buf) < 0) { 293 if (irc_send(irc, buf) < 0) {
293 gaim_connection_error(gc, "Error sending password"); 294 gaim_connection_error(gc, "Error sending password");
294 return FALSE; 295 return FALSE;
295 } 296 }
296 g_free(buf); 297 g_free(buf);