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);
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);