sas Wed Apr 18 04:42:31 2001 EDT
Modified files:
/php4/ext/ircg ircg.c php_ircg.h
Log:
Support notice which should be used to query bots etc.
Index: php4/ext/ircg/ircg.c
diff -u php4/ext/ircg/ircg.c:1.59 php4/ext/ircg/ircg.c:1.60
--- php4/ext/ircg/ircg.c:1.59 Tue Apr 17 15:44:54 2001
+++ php4/ext/ircg/ircg.c Wed Apr 18 04:42:30 2001
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ircg.c,v 1.59 2001/04/17 22:44:54 sas Exp $ */
+/* $Id: ircg.c,v 1.60 2001/04/18 11:42:30 sas Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -75,6 +75,7 @@
PHP_FE(ircg_join, NULL)
PHP_FE(ircg_part, NULL)
PHP_FE(ircg_msg, NULL)
+ PHP_FE(ircg_notice, NULL)
PHP_FE(ircg_nick, NULL)
PHP_FE(ircg_topic, NULL)
PHP_FE(ircg_channel_mode, NULL)
@@ -1139,6 +1140,29 @@
irc_nick(&conn->conn, Z_STRVAL_PP(newnick));
+ RETURN_TRUE;
+}
+
+PHP_FUNCTION(ircg_notice)
+{
+ zval **id, **recipient, **msg;
+ php_irconn_t *conn;
+ smart_str l = {0};
+ smart_str m = {0};
+ smart_str tmp, tmp2;
+
+ if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &id, &recipient, &msg)
+== FAILURE)
+ WRONG_PARAM_COUNT;
+
+ convert_to_long_ex(id);
+ convert_to_string_ex(recipient);
+ convert_to_string_ex(msg);
+
+ conn = lookup_irconn(Z_LVAL_PP(id));
+
+ if (!conn) RETURN_FALSE;
+
+ irc_handle_command(&conn->conn, "NOTICE", 2, Z_STRVAL_PP(recipient),
+Z_STRVAL_PP(msg));
RETURN_TRUE;
}
Index: php4/ext/ircg/php_ircg.h
diff -u php4/ext/ircg/php_ircg.h:1.10 php4/ext/ircg/php_ircg.h:1.11
--- php4/ext/ircg/php_ircg.h:1.10 Tue Apr 3 12:28:47 2001
+++ php4/ext/ircg/php_ircg.h Wed Apr 18 04:42:30 2001
@@ -36,6 +36,7 @@
PHP_FUNCTION(ircg_register_current_conn);
PHP_FUNCTION(ircg_whois);
PHP_FUNCTION(ircg_msg);
+PHP_FUNCTION(ircg_notice);
PHP_FUNCTION(ircg_nick);
PHP_FUNCTION(ircg_html_encode);
PHP_FUNCTION(ircg_ignore_add);
--
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]