X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_ircclient.c;h=06d3cc14240783467873658808fad47d48b83e07;hb=4972a9a46a1ffa16bc29787ca5ec94e4f69b015f;hp=97e28d6a563354e91952306171195a10d8d29b57;hpb=aa17942a54b43746f854bd3704f6ef6d7b799894;p=m6w6%2Fext-ircclient diff --git a/php_ircclient.c b/php_ircclient.c index 97e28d6..06d3cc1 100644 --- a/php_ircclient.c +++ b/php_ircclient.c @@ -418,7 +418,7 @@ PHP_METHOD(Session, doConnect) if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "bs|ls!", &ip6, &server_str, &server_len, &port, &passwd_str, &passwd_len)) { php_ircclient_session_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); char *nick = NULL, *user = NULL, *real = NULL; - zval *znick, *zuser, *zreal, *tmp; + zval *znick, *zuser, *zreal; znick = zend_read_property(php_ircclient_session_class_entry, getThis(), ZEND_STRL("nick"), 0 TSRMLS_CC); SEPARATE_ARG_IF_REF(znick); @@ -1420,8 +1420,12 @@ PHP_MINFO_FUNCTION(ircclient) irc_get_version(&high, &low); spprintf(&version[1], 0, "%u.%u", high, low); +#if PHP_IPHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH spprintf(&version[0], 0, "%u.%u", PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH, PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW); - +#else + /* version <= 1.6 doesn't exposed its version */ + spprintf(&version[0], 0, "-"); +#endif php_info_print_table_start(); php_info_print_table_header(2, "IRC client support", "enabled"); php_info_print_table_row(2, "Version", PHP_IRCCLIENT_VERSION);