cvs: php4 /ext/ircg ircg.c
| From: | Sascha Schumann | Date: | Sat, 10 Mar 2001 23:51:56 +0000 |
| Subject: | cvs: php4 /ext/ircg ircg.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-4475@lists.php.net to get a copy of this message | ||
sas Sat Mar 10 15:51:56 2001 EDT
Modified files:
/php4/ext/ircg ircg.c
Log:
Send pointless HTML, if nothing else happens to avoid timeouts.
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.52 php4/ext/ircg/ircg.c:1.53
--- php4/ext/ircg/ircg.c:1.52 Sat Mar 10 15:38:06 2001
+++ php4/ext/ircg/ircg.c Sat Mar 10 15:51:56 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.52 2001/03/10 23:38:06 sas Exp $ */
+/* $Id: ircg.c,v 1.53 2001/03/10 23:51:56 sas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -571,6 +571,15 @@
msg_send(conn, &m);
}
+static void idle_recv_queue(irconn_t *ircc, void *dummy)
+{
+ php_irconn_t *conn = dummy;
+ smart_str m = {0};
+
+ smart_str_appendl_ex(&m, "<!---->", 7, 1);
+ msg_send(conn, &m);
+}
+
static void user_kick(irconn_t *ircc, smart_str *channel, smart_str *who, smart_str *kicked_by,
smart_str *reason, void *dummy)
{
php_irconn_t *conn = dummy;
@@ -897,6 +906,10 @@
#if IRCG_API_VERSION >= 20010307
irc_register_hook(conn, IRCG_MODE_CHANNEL, mode_channel_handler);
+#endif
+
+#if IRCG_API_VERSION >= 20010310
+ irc_register_hook(conn, IRCG_IDLE_RECV_QUEUE, idle_recv_queue);
#endif
}