sas Tue Apr 3 12:28:47 2001 EDT
Modified files:
/php4/ext/ircg ircg.c php_ircg.h
Log:
add ignore interface
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.54 php4/ext/ircg/ircg.c:1.55
--- php4/ext/ircg/ircg.c:1.54 Sat Mar 31 07:53:14 2001
+++ php4/ext/ircg/ircg.c Tue Apr 3 12:28:47 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.54 2001/03/31 15:53:14 sas Exp $ */
+/* $Id: ircg.c,v 1.55 2001/04/03 19:28:47 sas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -79,6 +79,8 @@
PHP_FE(ircg_html_encode, NULL)
PHP_FE(ircg_whois, NULL)
PHP_FE(ircg_kick, NULL)
+ PHP_FE(ircg_ignore_add, NULL)
+ PHP_FE(ircg_ignore_del, NULL)
PHP_FE(ircg_disconnect, NULL)
PHP_FE(ircg_is_conn_alive, NULL)
PHP_FE(ircg_lookup_format_messages, NULL)
@@ -705,6 +707,48 @@
irc_handle_command(&conn->conn, "WHOIS", 1, Z_STRVAL_PP(p2));
RETVAL_TRUE;
+#endif
+}
+
+PHP_FUNCTION(ircg_ignore_add)
+{
+#if defined(IRCG_API_VERSION) && IRCG_API_VERSION >= 20010402
+ zval **args[2];
+ php_irconn_t *conn;
+ smart_str s;
+
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(args[0]);
+ convert_to_string_ex(args[1]);
+
+ conn = lookup_irconn(Z_LVAL_PP(args[0]));
+ if (!conn) RETURN_FALSE;
+
+ smart_str_setl(&s, Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
+ irc_ignore_add(&conn->conn, &s, 1);
+#endif
+}
+
+PHP_FUNCTION(ircg_ignore_del)
+{
+#if defined(IRCG_API_VERSION) && IRCG_API_VERSION >= 20010402
+ zval **args[2];
+ php_irconn_t *conn;
+ smart_str s;
+
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) == FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(args[0]);
+ convert_to_string_ex(args[1]);
+
+ conn = lookup_irconn(Z_LVAL_PP(args[0]));
+ if (!conn) RETURN_FALSE;
+
+ smart_str_setl(&s, Z_STRVAL_PP(args[1]), Z_STRLEN_PP(args[1]));
+ irc_ignore_del(&conn->conn, &s);
#endif
}
Index: php4/ext/ircg/php_ircg.h
diff -u php4/ext/ircg/php_ircg.h:1.9 php4/ext/ircg/php_ircg.h:1.10
--- php4/ext/ircg/php_ircg.h:1.9 Sat Mar 31 07:53:14 2001
+++ php4/ext/ircg/php_ircg.h Tue Apr 3 12:28:47 2001
@@ -38,6 +38,8 @@
PHP_FUNCTION(ircg_msg);
PHP_FUNCTION(ircg_nick);
PHP_FUNCTION(ircg_html_encode);
+PHP_FUNCTION(ircg_ignore_add);
+PHP_FUNCTION(ircg_ignore_del);
PHP_FUNCTION(ircg_kick);
PHP_FUNCTION(ircg_topic);
PHP_FUNCTION(ircg_channel_mode);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]