sas Thu Jul 3 02:27:55 2003 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/ircg ircg.c Log: always provide recipient info, already fixed in HEAD Index: php-src/ext/ircg/ircg.c diff -u php-src/ext/ircg/ircg.c:1.137.2.8 php-src/ext/ircg/ircg.c:1.137.2.9 --- php-src/ext/ircg/ircg.c:1.137.2.8 Mon Jun 2 09:17:45 2003 +++ php-src/ext/ircg/ircg.c Thu Jul 3 02:27:54 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ircg.c,v 1.137.2.8 2003/06/02 13:17:45 sas Exp $ */ +/* $Id: ircg.c,v 1.137.2.9 2003/07/03 06:27:54 sas Exp $ */ /* {{{ includes */ @@ -829,7 +829,7 @@ /* {{{ IRCG-handlers */ static void handle_ctcp(php_irconn_t *conn, smart_str *chan, smart_str *from, - smart_str *msg, smart_str *result) + smart_str *msg, smart_str *result, smart_str *recipient) { char *token_end; char *real_msg; @@ -844,7 +844,7 @@ real_msg_end = strchr(real_msg, '\001'); if (real_msg_end) { format_msg_t *fmt_msg; - smart_str tmp, tmp2; + smart_str tmp; int status = 0; *real_msg_end = '\0'; @@ -855,8 +855,7 @@ } smart_str_setl(&tmp, real_msg, real_msg_end - real_msg); - smart_str_setl(&tmp2, conn->conn.username, conn->conn.username_len); - format_msg(fmt_msg, chan, &tmp2, from, &tmp, result, conn->conn.username, conn->conn.username_len, &status); + format_msg(fmt_msg, chan, recipient, from, &tmp, result, conn->conn.username, conn->conn.username_len, &status); if (status == 1) irc_disconnect(&conn->conn, "Connection terminated by authenticated CTCP message"); @@ -2250,14 +2249,14 @@ case '#': case '&': if (l.c[0] == 1) { - handle_ctcp(conn, &tmp, &tmp2, &l, &m); + handle_ctcp(conn, &tmp, &tmp2, &l, &m, &tmp); } else { FORMAT_MSG(conn, FMT_MSG_CHAN, &tmp, NULL, &tmp2, &l, &m, conn->conn.username, conn->conn.username_len); } break; default: if (l.c[0] == 1) { - handle_ctcp(conn, NULL, &tmp2, &l, &m); + handle_ctcp(conn, NULL, &tmp2, &l, &m, &tmp); } else { FORMAT_MSG(conn, FMT_MSG_PRIV_FROM_ME, NULL, &tmp, &tmp2, &l, &m, conn->conn.username, conn->conn.username_len);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php