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