Mercurial > pidgin
comparison plugins/irc.c @ 1304:7f4302f6fd64
[gaim-migrate @ 1314]
No more port crashy.
committer: Tailor Script <tailor@pidgin.im>
author | Rob Flynn <gaim@robflynn.com> |
---|---|
date | Tue, 19 Dec 2000 03:46:13 +0000 |
parents | e973ef7a8a87 |
children | 3b5c7f8bb2b5 |
comparison
equal
deleted
inserted
replaced
1303:9c34f99af79e | 1304:7f4302f6fd64 |
---|---|
976 return; | 976 return; |
977 } | 977 } |
978 | 978 |
979 site.sin_family = AF_INET; | 979 site.sin_family = AF_INET; |
980 site.sin_addr.s_addr = *(long *)(host->h_addr); | 980 site.sin_addr.s_addr = *(long *)(host->h_addr); |
981 site.sin_port = htons(atoi(user->proto_opt[1])); | 981 |
982 if (user->proto_opt[1][0]) | |
983 site.sin_port = htons(atoi(user->proto_opt[1])); | |
984 else { | |
985 site.sin_port = htons(6667); | |
986 g_snprintf(user->proto_opt[1], 5, "6667"); | |
987 } | |
982 | 988 |
983 fd = socket(AF_INET, SOCK_STREAM, 0); | 989 fd = socket(AF_INET, SOCK_STREAM, 0); |
984 if (fd < 0) { | 990 if (fd < 0) { |
985 hide_login_progress(gc, "Unable to create socket"); | 991 hide_login_progress(gc, "Unable to create socket"); |
986 signoff(gc); | 992 signoff(gc); |
1062 entry = gtk_entry_new(); | 1068 entry = gtk_entry_new(); |
1063 gtk_box_pack_end(GTK_BOX(hbox), entry, FALSE, FALSE, 5); | 1069 gtk_box_pack_end(GTK_BOX(hbox), entry, FALSE, FALSE, 5); |
1064 if (user->proto_opt[1][0]) { | 1070 if (user->proto_opt[1][0]) { |
1065 debug_printf("setting text %s\n", user->proto_opt[1]); | 1071 debug_printf("setting text %s\n", user->proto_opt[1]); |
1066 gtk_entry_set_text(GTK_ENTRY(entry), user->proto_opt[1]); | 1072 gtk_entry_set_text(GTK_ENTRY(entry), user->proto_opt[1]); |
1073 } else { | |
1074 gtk_entry_set_text(GTK_ENTRY(entry), "6667"); | |
1067 } | 1075 } |
1068 gtk_object_set_user_data(GTK_OBJECT(entry), user); | 1076 gtk_object_set_user_data(GTK_OBJECT(entry), user); |
1069 gtk_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(irc_print_option), user); | 1077 gtk_signal_connect(GTK_OBJECT(entry), "changed", GTK_SIGNAL_FUNC(irc_print_option), user); |
1070 gtk_widget_show(entry); | 1078 gtk_widget_show(entry); |
1071 } | 1079 } |