cvs: php4 /ext/ircg ircg.c
| From: | Sascha Schumann | Date: | Sat, 17 Feb 2001 17:36:44 +0000 |
| Subject: | cvs: php4 /ext/ircg ircg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4072@lists.php.net to get a copy of this message | ||
sas Sat Feb 17 09:36:44 2001 EDT
Modified files:
/php4/ext/ircg ircg.c
Log:
Also format CTCP correctly when sending it to the server.
This is still quite ugly but works already quite well.
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.26 php4/ext/ircg/ircg.c:1.27
--- php4/ext/ircg/ircg.c:1.26 Sat Feb 17 09:31:36 2001
+++ php4/ext/ircg/ircg.c Sat Feb 17 09:36:44 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.26 2001/02/17 17:31:36 sas Exp $ */
+/* $Id: ircg.c,v 1.27 2001/02/17 17:36:44 sas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -713,12 +713,20 @@
switch (Z_STRVAL_PP(recipient)[0]) {
case '#':
case '&':
- format_msg(MSG(conn, FMT_MSG_CHAN), Z_STRVAL_PP(recipient),
- NULL, conn->conn.username, l.c, &m);
+ if (l.c[0] == 1) {
+ handle_ctcp(conn, Z_STRVAL_PP(recipient), conn->conn.username, &l, &m);
+ } else {
+ format_msg(MSG(conn, FMT_MSG_CHAN), Z_STRVAL_PP(recipient),
+ NULL, conn->conn.username, l.c, &m);
+ }
break;
default:
- format_msg(MSG(conn, FMT_MSG_PRIV_FROM_ME), NULL,
- Z_STRVAL_PP(recipient), conn->conn.username, l.c, &m);
+ if (l.c[0] == 1) {
+ handle_ctcp(conn, NULL, conn->conn.username, &l, &m);
+ } else {
+ format_msg(MSG(conn, FMT_MSG_PRIV_FROM_ME), NULL,
+ Z_STRVAL_PP(recipient), conn->conn.username, l.c, &m);
+ }
}
msg_send(conn, &m);