cvs: php4 /ext/ircg ircg.c php_ircg.h
| From: | Sascha Schumann | Date: | Tue, 09 Jan 2001 00:36:42 +0000 |
| Subject: | cvs: php4 /ext/ircg ircg.c php_ircg.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-3498@lists.php.net to get a copy of this message | ||
sas Mon Jan 8 16:36:42 2001 EDT
Modified files:
/php4/ext/ircg ircg.c php_ircg.h
Log:
Add ircg_is_conn_alive()
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.6 php4/ext/ircg/ircg.c:1.7
--- php4/ext/ircg/ircg.c:1.6 Mon Jan 8 16:11:48 2001
+++ php4/ext/ircg/ircg.c Mon Jan 8 16:36:41 2001
@@ -54,6 +54,7 @@
PHP_FE(ircg_part, NULL)
PHP_FE(ircg_msg, NULL)
PHP_FE(ircg_disconnect, NULL)
+ PHP_FE(ircg_is_conn_alive, NULL)
{NULL, NULL, NULL} /* Must be the last line in ircg_functions[] */
};
@@ -424,6 +425,21 @@
irc_part(&conn->conn, Z_STRVAL_PP(p2));
RETVAL_TRUE;
+}
+
+PHP_FUNCTION(ircg_is_conn_alive)
+{
+ zval **p1;
+
+ if (ZEND_NUM_ARGS() != 1
+ || zend_get_parameters_ex(1, &p1) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(p1);
+
+ if (lookup_irconn(Z_LVAL_PP(p1)))
+ RETURN_TRUE;
+ RETURN_FALSE;
}
PHP_FUNCTION(ircg_pconnect)
Index: php4/ext/ircg/php_ircg.h
diff -u php4/ext/ircg/php_ircg.h:1.1 php4/ext/ircg/php_ircg.h:1.2
--- php4/ext/ircg/php_ircg.h:1.1 Mon Nov 13 06:51:09 2000
+++ php4/ext/ircg/php_ircg.h Mon Jan 8 16:36:41 2001
@@ -36,6 +36,7 @@
PHP_FUNCTION(ircg_register_current_conn);
PHP_FUNCTION(ircg_msg);
PHP_FUNCTION(ircg_disconnect);
+PHP_FUNCTION(ircg_is_conn_alive);
PHP_MINIT_FUNCTION(ircg);
PHP_MSHUTDOWN_FUNCTION(ircg);