Project

General

Profile

Scripting Operators » History » Version 29

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

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