comparison src/protocols/irc/irc.c @ 2293:88552158f19b

[gaim-migrate @ 2303] test. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Mon, 17 Sep 2001 06:28:08 +0000
parents 6625d0755c51
children b6c6603a8915
comparison
equal deleted inserted replaced
2292:6625d0755c51 2293:88552158f19b
787 to = word[3]; 787 to = word[3];
788 msg = *word_eol[4] == ':' ? word_eol[4] + 1 : word_eol[4]; 788 msg = *word_eol[4] == ':' ? word_eol[4] + 1 : word_eol[4];
789 if (msg[0] == 1 && msg[strlen (msg) - 1] == 1) { /* ctcp */ 789 if (msg[0] == 1 && msg[strlen (msg) - 1] == 1) { /* ctcp */
790 if (!g_strncasecmp(msg + 1, "ACTION", 6)) { 790 if (!g_strncasecmp(msg + 1, "ACTION", 6)) {
791 char *po = strchr(msg + 7, 1); 791 char *po = strchr(msg + 7, 1);
792 char *tmp;
792 if (po) *po = 0; 793 if (po) *po = 0;
793 to = g_strconcat("/me", msg + 7, NULL); 794 if (is_channel(gc, to)) {
794 irc_got_im(gc, nick, to, 0, time(NULL)); 795 struct conversation *c = irc_find_chat(gc, to);
795 g_free(to); 796 if (!c)
797 return;
798 tmp = g_strconcat("/me", msg + 7, NULL);
799 irc_got_chat_in(gc, c->id, nick, 0, tmp, time(NULL));
800 g_free(tmp);
801 } else {
802 tmp = g_strconcat("/me", msg + 7, NULL);
803 to = g_malloc(strlen(nick) + 2);
804 g_snprintf(to, strlen(nick) + 2, "@%s", nick);
805 if (find_conversation(to))
806 irc_got_im(gc, to, tmp, 0, time(NULL));
807 else {
808 *to = '+';
809 if (find_conversation(to))
810 irc_got_im(gc, to, tmp, 0, time(NULL));
811 else
812 irc_got_im(gc, nick, tmp, 0, time(NULL));
813 }
814 g_free(to);
815 g_free(tmp);
816 }
796 } 817 }
797 } else { 818 } else {
798 if (is_channel(gc, to)) { 819 if (is_channel(gc, to)) {
799 struct conversation *c = irc_find_chat(gc, to); 820 struct conversation *c = irc_find_chat(gc, to);
800 if (!c) 821 if (!c)