summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-20 04:28:50 +0200
committerHaru <haru@dotalux.com>2014-03-17 17:15:02 +0100
commit42da97d7979f5db56d50072dfd7787ebf549ab1b (patch)
tree8946b2b7e5319512b01c0116b20099d263d00196 /src/map/script.h
parent1cf8ea92f8e8e992617addc371272c78e60df219 (diff)
downloadhercules-42da97d7979f5db56d50072dfd7787ebf549ab1b.tar.gz
hercules-42da97d7979f5db56d50072dfd7787ebf549ab1b.tar.bz2
hercules-42da97d7979f5db56d50072dfd7787ebf549ab1b.tar.xz
hercules-42da97d7979f5db56d50072dfd7787ebf549ab1b.zip
Added regular expression matching script commands and operators
- The script command pcre_match and the operator ~= will return the number of regular expression matches in a given string (roughly equivalent to the php function preg_match or the perl operator =~) - The operator ~! is the opposite of ~= (roughly equivalent to the perl operator !~) - See script_commands and npc/custom/test.txt for more information. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/script.h b/src/map/script.h
index cf7f22aa9..eed0dbf1d 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -213,6 +213,10 @@ typedef enum c_op {
C_SUB_POST, // a--
C_ADD_PRE, // ++a
C_SUB_PRE, // --a
+#ifdef PCRE_SUPPORT
+ C_RE_EQ, // ~=
+ C_RE_NE, // ~!
+#endif // PCRE_SUPPORT
} c_op;
enum hQueueOpt {