summaryrefslogtreecommitdiff
path: root/src/plugins/javascript
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-02-26 20:02:07 +0100
committerSébastien Helleu <flashcode@flashtux.org>2019-02-27 07:46:22 +0100
commitc2859096cbf2030f977c9838af99bf13c8584625 (patch)
tree8d505344feee0e3e0f4af5ac8978a7527f541983 /src/plugins/javascript
parente473161c9fc3323a86d1cbf61705dcd24233de2a (diff)
downloadweechat-c2859096cbf2030f977c9838af99bf13c8584625.zip
api: add function string_match_list
Diffstat (limited to 'src/plugins/javascript')
-rw-r--r--src/plugins/javascript/weechat-js-api.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/javascript/weechat-js-api.cpp b/src/plugins/javascript/weechat-js-api.cpp
index a40f61d57..8f0032bac 100644
--- a/src/plugins/javascript/weechat-js-api.cpp
+++ b/src/plugins/javascript/weechat-js-api.cpp
@@ -305,6 +305,24 @@ API_FUNC(string_match)
API_RETURN_INT(value);
}
+API_FUNC(string_match_list)
+{
+ int value;
+
+ API_INIT_FUNC(1, "string_match_list", "ssi", API_RETURN_INT(0));
+
+ v8::String::Utf8Value string(args[0]);
+ v8::String::Utf8Value masks(args[1]);
+ int case_sensitive = args[2]->IntegerValue();
+
+ value = plugin_script_api_string_match_list (weechat_js_plugin,
+ *string,
+ *masks,
+ case_sensitive);
+
+ API_RETURN_INT(value);
+}
+
API_FUNC(string_has_highlight)
{
int value;
@@ -4806,6 +4824,7 @@ WeechatJsV8::loadLibs()
API_DEF_FUNC(ngettext);
API_DEF_FUNC(strlen_screen);
API_DEF_FUNC(string_match);
+ API_DEF_FUNC(string_match_list);
API_DEF_FUNC(string_has_highlight);
API_DEF_FUNC(string_has_highlight_regex);
API_DEF_FUNC(string_mask_to_regex);