comparison src/protocols/irc/irc.c @ 2536:0e0a54e5819a

[gaim-migrate @ 2549] I got an itty bitty diff for you now ;-) committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 18 Oct 2001 12:12:38 +0000
parents 227cc42ffa6e
children 3526c5581f92
comparison
equal deleted inserted replaced
2535:b44fc148c1c7 2536:0e0a54e5819a
675 { 675 {
676 struct irc_data *id = gc->proto_data; 676 struct irc_data *id = gc->proto_data;
677 char buf[IRC_BUF_LEN]; 677 char buf[IRC_BUF_LEN];
678 678
679 if (!g_strncasecmp(msg, "VERSION", 7)) { 679 if (!g_strncasecmp(msg, "VERSION", 7)) {
680 g_snprintf(buf, sizeof(buf), "NOTICE %s :\001VERSION GAIM " VERSION ": The Pimpin " 680 g_snprintf(buf, sizeof(buf), "NOTICE %s :\001VERSION Gaim " VERSION ": The Pimpin "
681 "Penguin AIM Clone: " WEBSITE "\001\r\n", nick); 681 "Penguin AIM Clone: " WEBSITE "\001\r\n", nick);
682 irc_write(id->fd, buf, strlen(buf)); 682 irc_write(id->fd, buf, strlen(buf));
683 } 683 }
684 if (!g_strncasecmp(msg, "ACTION", 6)) { 684 if (!g_strncasecmp(msg, "ACTION", 6)) {
685 char *po = strchr(msg + 6, 1); 685 char *po = strchr(msg + 6, 1);
897 897
898 gethostname(hostname, sizeof(hostname) - 1); 898 gethostname(hostname, sizeof(hostname) - 1);
899 hostname[sizeof(hostname) - 1] = 0; 899 hostname[sizeof(hostname) - 1] = 0;
900 if (!*hostname) 900 if (!*hostname)
901 g_snprintf(hostname, sizeof(hostname), "localhost"); 901 g_snprintf(hostname, sizeof(hostname), "localhost");
902 g_snprintf(buf, sizeof(buf), "USER %s %s %s :GAIM (%s)\r\n", 902 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); 903 g_get_user_name(), hostname, gc->user->proto_opt[USEROPT_SERV], WEBSITE);
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;
941 static void irc_close(struct gaim_connection *gc) 941 static void irc_close(struct gaim_connection *gc)
942 { 942 {
943 struct irc_data *idata = (struct irc_data *)gc->proto_data; 943 struct irc_data *idata = (struct irc_data *)gc->proto_data;
944 gchar buf[IRC_BUF_LEN]; 944 gchar buf[IRC_BUF_LEN];
945 945
946 g_snprintf(buf, sizeof(buf), "QUIT :Download GAIM [%s]\r\n", WEBSITE); 946 g_snprintf(buf, sizeof(buf), "QUIT :Download Gaim [%s]\r\n", WEBSITE);
947 irc_write(idata->fd, buf, strlen(buf)); 947 irc_write(idata->fd, buf, strlen(buf));
948 948
949 g_free(idata->chantypes); 949 g_free(idata->chantypes);
950 g_free(idata->chanmodes); 950 g_free(idata->chanmodes);
951 g_free(idata->nickmodes); 951 g_free(idata->nickmodes);