Project

General

Profile

Scripting Operators » History » Version 33

Per Amundsen, 10/22/2015 04:17 PM

1 1 Per Amundsen
h1. Scripting Operators
2
3 31 Per Amundsen
AdiIRC supports various operators for use in [[/if]] [[/else]] [[/elseif]] [[/while]] and [[$iif]] expressions.
4 1 Per Amundsen
5 30 Per Amundsen
[[/var]] [[/set]] [[$calc]] supports it's own set of [[Arithmetic Operators|arithmetic expression]].
6
7 33 Per Amundsen
All operators supports the "!" sign to reverse the operation. 
8 32 Per Amundsen
9 10 Per Amundsen
h2. Math Comparison Operators
10 13 Per Amundsen
11 10 Per Amundsen
|_.Syntax |_.Name |_<.Result |
12
 |=. <notextile>%x == %y</notextile>
13 11 Per Amundsen
<notextile>%x = %y</notextile>
14 12 Per Amundsen
<notextile>%x != %y</notextile>
15 16 Per Amundsen
<notextile>%x !== %y</notextile>
16 12 Per Amundsen
<notextile>%x < %y</notextile>
17
<notextile>%x > %y</notextile>
18
<notextile>%x <= %y</notextile>
19
<notextile>%x >= %y</notextile>
20
<notextile>%x // %y</notextile>
21
<notextile>%x \\ %y</notextile>
22
<notextile>%x & %y</notextile>
23
 |^. Equal
24 15 Per Amundsen
Equal
25 1 Per Amundsen
Not equal
26 16 Per Amundsen
Not equal
27 10 Per Amundsen
Less than
28
Greater than
29
Less than or equal to
30
Greater than or equal to
31
Multiple Of (Divides)
32
Not Multiple Of (Not Divides)
33
Bitwise And
34
 |^. True, if %x is equal to %y.
35
True, if %x is equal to %y.
36 16 Per Amundsen
True, if %x is not equal to %y.
37 10 Per Amundsen
True, if %x is not equal to %y.
38
True, if %x is strictly less than %y.
39
True, if %x is strictly greater than %y.
40
True, if %x is less than or equal to %y.
41
True, if %x is greater than or equal to %y.
42
True, if %x divides %y.
43
True, if %x does not divides %y.
44
True, if (bit representation of) %x AND %y is a none zero.
45 14 Per Amundsen
 |
46 17 Per Amundsen
47
h2. String Comparison Operators
48
49
|_.Syntax |_.Name |_<.Result |
50
 |=. %x isin %y
51
%x isincs %y
52
%x iswm %y
53
%x iswmcs %y
54
%x isnum
55
%x isnum N
56
%x isnum N-
57
%x isnum N-M
58
%x isletter
59
%x isletter N
60
%x isalnum
61
%x isalpha
62
%x islower
63
%x isupper
64
 |^. Is In
65
Is In (case sensitive)
66
Wildcard Matching
67
Wildcard Matching (case sensitive)	
68
Is Digit
69
Is Digit, Equal to
70
Is Digit, Greater than or equal to
71
Is Digit, in Range
72
Is a Letter
73
Is a Letter In A List
74
Alphanumeric Characters
75
Alphabetic Characters
76
All lower case letters
77
All upper case letters
78
 |^. True, if %x is fully found inside %y.
79
True, if %x is fully found inside (case sensitive) %y.
80
True, if wildcard string %x matches %y.
81
True, if wildcard string %x matches (case sensitive) %y.
82
True, if %x is a number.
83
True, if %x is number N.
84
True, if %x is number N or greater.
85
True, if %x is a number between N and M (inclusively).
86
True, if %x is a letter.
87
True, if %x is a letter in a list of letters.
88
True, if %x contains only alphabetic or numeric characters.
89
True, if %x contains only alphabetic characters.
90
True, if %x contains only lower case letters.
91
True, if %x contains only upper case letters.
92
 |
93 19 Per Amundsen
94
h2. String Comparison Operators
95
96
|_.Syntax |_.Name |_<.Result |
97 22 Per Amundsen
 |=. <notextile>a == b</notextile>
98
<notextile >a === b</notextile>
99
<notextile >str1 == str2</notextile>
100
<notextile >str1 === str2</notextile>
101 19 Per Amundsen
a < b
102
a > b
103
str1 < str2
104 1 Per Amundsen
str1 > str2
105
 |^. Case insensitive character comparison
106
Case sensitive character comparison
107
Case insensitive String comparison
108
Case sensitive String comparison
109 25 Per Amundsen
Lexicographically Less Than
110 1 Per Amundsen
Lexicographically Greater Than
111
Lexicographically Less Than
112
Lexicographically Greater Than
113
 |^. True, if character a is equal to character b, case insensitive.
114
True, if character a is equal to character b, case sensitive.
115
True, if str1 equals str2 in a case insensitive manner.
116
True, if str1 equals str2 in a case sensitive manner.
117
True, if the [[$asc]](a) comes before [[$asc]](b)
118
True, if the [[$asc]](a) comes after [[$asc]](b)
119
True, if str1 comes before str2
120
True, if str1 comes after str2
121 23 Per Amundsen
 |
122
123
h2. Channel-related Operators
124
125
|_.Syntax |_.Name |_<.Result |
126
 |=. %x ison %y
127
%x isop %y
128
%x ishop %y
129
%x issop %y
130
%x isowner %y
131
%x isvoice %y
132
%x isreg %y
133
%x ischan
134
%x isban %y
135
%x isinvite %y 
136
%x isexcept %y
137
 |^. Is On
138
Is an Operator
139
Is a Halfop
140
is a Protected Operator
141
Is a Channel Owner
142
Is a Voice
143
Is a Regular
144
Is a Channel
145
Is a ban
146
Ia a Invite
147
Is a Except
148 24 Per Amundsen
 |^. True, if nick %x is on channel %y.
149 23 Per Amundsen
True, if nick %x is an operators on channel %y.
150
True, if nick %x is a halfop on channel %y.
151
True, if nick %x is a protected operator on channel %y.
152
True, if nick %x is a channel owner on channel %y.
153
True, if nick %x is a voice on channel %y.
154
True, if nick %x is a regular user on channel %y.
155
True, if channel %x is a channel you are on.
156
True, if ban address %x is a ban on channel %y. (taken from IBL)
157
True, if invite address %x is a invite on channel %y. (taken from IIL)
158
True, if except address %x is a except on channel %y. (taken from IEL)
159 19 Per Amundsen
 |
160 28 Per Amundsen
161
h2. List-related Operators
162
163
|_.Syntax |_.Name |_<.Result |
164
 |=. %x isaop
165
%x isaop %y
166
%x isavoice
167
%x isavoice %y	
168
 %x isignore
169
%x isignore %y
170
%x isnotify
171
 |^. TODO
172
TODO
173
TODO
174
TODO
175
In Ignore List
176
In Ignore List For Type
177
TODO
178
 |^. TODO
179
TODO
180
TODO
181
TODO
182
True, if host %x is in the ignore list.
183
True, if host %x is in the ignore list for type %y.
184
TODO
185
 |
186
187
h2. Other Operators
188
189
|_.Syntax |_.Name |_<.Result |
190
 |=. %x isurl
191
 |^. Is a url
192
 |^.  True, if %x is a url.
193
 |