comparison src/protocols/irc/irc.c @ 3501:3335ef5fbecc

[gaim-migrate @ 3564] i18n fixes from paco-paco and msw, /topic fix from kingant. get the i18n fixes into gtk1-stable and i'm done for the night. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 14 Sep 2002 03:17:05 +0000
parents 7a3f16a375a5
children 7e1c6c16dd41
comparison
equal deleted inserted replaced
3500:b79894c97bed 3501:3335ef5fbecc
1590 char buf[IRC_BUF_LEN]; 1590 char buf[IRC_BUF_LEN];
1591 g_snprintf(buf, sizeof(buf), "INVITE %s\r\n", word_eol[2]); 1591 g_snprintf(buf, sizeof(buf), "INVITE %s\r\n", word_eol[2]);
1592 irc_write(id->fd, buf, strlen(buf)); 1592 irc_write(id->fd, buf, strlen(buf));
1593 } else if (!g_strcasecmp(pdibuf, "TOPIC")) { 1593 } else if (!g_strcasecmp(pdibuf, "TOPIC")) {
1594 if (!*word_eol[2]) { 1594 if (!*word_eol[2]) {
1595 g_free(what); 1595 struct conversation *c;
1596 return -EINVAL; 1596 c = irc_find_chat(gc, who);
1597 } 1597 g_snprintf(buf, sizeof(buf), _("Topic for %s is %s"), who, c->topic ? c->topic : "(no topic set)");
1598 g_snprintf(buf, sizeof(buf), "TOPIC %s :%s\r\n", who, word_eol[2]); 1598 write_to_conv(c, buf, WFLAG_SYSTEM | WFLAG_NOLOG, NULL, time(NULL), -1);
1599 irc_write(id->fd, buf, strlen(buf)); 1599 } else {
1600 g_snprintf(buf, sizeof(buf), "TOPIC %s :%s\r\n", who, word_eol[2]);
1601 irc_write(id->fd, buf, strlen(buf));
1602 }
1600 } else if (!g_strcasecmp(pdibuf, "NICK")) { 1603 } else if (!g_strcasecmp(pdibuf, "NICK")) {
1601 if (!*word_eol[2]) { 1604 if (!*word_eol[2]) {
1602 g_free(what); 1605 g_free(what);
1603 return -EINVAL; 1606 return -EINVAL;
1604 } 1607 }