Scripting Commands » History » Version 163
Mr. BS, 03/01/2017 01:20 PM
| 1 | 162 | Mr. BS | {{css |
|---|---|---|---|
| 2 | body { |
||
| 3 | counter-reset: count; |
||
| 4 | } |
||
| 5 | .tcount { |
||
| 6 | counter-reset: adi; |
||
| 7 | } |
||
| 8 | .tcount a { |
||
| 9 | counter-increment: count; |
||
| 10 | } |
||
| 11 | .tcount strong { |
||
| 12 | counter-increment: adi; |
||
| 13 | } |
||
| 14 | .acounter::before { |
||
| 15 | content: "Total: " counter(count) " commands, " counter(adi) " are AdiIRC exclusive. "; |
||
| 16 | } |
||
| 17 | }} |
||
| 18 | |||
| 19 | 73 | Per Amundsen | {{>toc}} |
| 20 | 1 | Per Amundsen | |
| 21 | h1. Scripting Commands |
||
| 22 | 2 | Per Amundsen | |
| 23 | Parameters in [x] means they are optional. |
||
| 24 | Parameters in <x> means they are required. |
||
| 25 | Parameters with a x|y means either x or y can be used. |
||
| 26 | 3 | Per Amundsen | |
| 27 | Click on a command to read more about it. |
||
| 28 | 154 | Per Amundsen | |
| 29 | 27 | Per Amundsen | _Commands in bold is AdiIRC only._ |
| 30 | 1 | Per Amundsen | |
| 31 | 162 | Mr. BS | table(tcount). |
| 32 | |[[/abook]] |
||
| 33 | 123 | Per Amundsen | *[[/aclear]]* |
| 34 | 1 | Per Amundsen | [[/action]] |
| 35 | 27 | Per Amundsen | *[[/advertise]]* |
| 36 | 1 | Per Amundsen | [[/ajinvite]] |
| 37 | [[/alias]] |
||
| 38 | [[/aline]] |
||
| 39 | [[/amark]] |
||
| 40 | [[/ame]] |
||
| 41 | [[/amsg]] |
||
| 42 | 84 | Per Amundsen | *[[/allnick]]* |
| 43 | 1 | Per Amundsen | [[/anick]] |
| 44 | 74 | Per Amundsen | [[/auser]] |
| 45 | 136 | Per Amundsen | *[[/autoconnect]]* |
| 46 | 53 | Per Amundsen | [[/autojoin]] |
| 47 | 27 | Per Amundsen | *[[/aquit]]* |
| 48 | 1 | Per Amundsen | [[/away]] |
| 49 | 27 | Per Amundsen | *[[/back]]* |
| 50 | 1 | Per Amundsen | [[/background]] |
| 51 | [[/ban]] |
||
| 52 | 27 | Per Amundsen | *[[/banlist]]* |
| 53 | 1 | Per Amundsen | [[/bcopy]] |
| 54 | [[/beep]] |
||
| 55 | 27 | Per Amundsen | *[[/betaup]]* |
| 56 | *[[/bin2txt]]* |
||
| 57 | 1 | Per Amundsen | [[/bindip]] |
| 58 | [[/bread]] |
||
| 59 | [[/break]] |
||
| 60 | [[/breplace]] |
||
| 61 | [[/bset]] |
||
| 62 | [[/btrunc]] |
||
| 63 | [[/bunset]] |
||
| 64 | 27 | Per Amundsen | *[[/bw]]* |
| 65 | 1 | Per Amundsen | [[/bwrite]] |
| 66 | [[/channel]] |
||
| 67 | 147 | Per Amundsen | *[[/channels]]* |
| 68 | 27 | Per Amundsen | *[[/charset]]* |
| 69 | 1 | Per Amundsen | [[/clear]] |
| 70 | [[/clearall]] |
||
| 71 | [[/cline]] |
||
| 72 | [[/clipboard]] |
||
| 73 | [[/close]] |
||
| 74 | 141 | Per Amundsen | [[/cnick]] |
| 75 | 1 | Per Amundsen | [[/color]] |
| 76 | [[/colour]] |
||
| 77 | 145 | Per Amundsen | | [[/comclose]] |
| 78 | [[/comlist]] |
||
| 79 | 123 | Per Amundsen | [[/comopen]] |
| 80 | 84 | Per Amundsen | [[/comreg]] |
| 81 | 74 | Per Amundsen | *[[/config]]* |
| 82 | 32 | Per Amundsen | [[/continue]] |
| 83 | 66 | Per Amundsen | [[/copy]] |
| 84 | 1 | Per Amundsen | [[/ctcp]] |
| 85 | [[/ctcps]] |
||
| 86 | 57 | Per Amundsen | [[/ctcpreply]] |
| 87 | 158 | Per Amundsen | *[[/cycleall]]* |
| 88 | 54 | Per Amundsen | [[/dcc]] |
| 89 | 52 | Per Amundsen | [[/dde]] |
| 90 | 41 | Per Amundsen | [[/ddeserver]] |
| 91 | [[/debug]] |
||
| 92 | 32 | Per Amundsen | [[/dec]] |
| 93 | 27 | Per Amundsen | *[[/dehalfop]]* |
| 94 | *[[/deop]]* |
||
| 95 | 1 | Per Amundsen | [[/describe]] |
| 96 | 27 | Per Amundsen | *[[/desop]]* |
| 97 | *[[/devoice]]* |
||
| 98 | 1 | Per Amundsen | [[/dialog]] |
| 99 | [[/did]] |
||
| 100 | [[/didtok]] |
||
| 101 | [[/disable]] |
||
| 102 | [[/disconnect]] |
||
| 103 | 94 | Per Amundsen | [[/dlevel]] |
| 104 | 1 | Per Amundsen | [[/dline]] |
| 105 | [[/dll]] |
||
| 106 | [[/dns]] |
||
| 107 | 27 | Per Amundsen | *[[/dock]]* |
| 108 | *[[/dockpanels]]* |
||
| 109 | 128 | Per Amundsen | *[[/download]]* |
| 110 | 1 | Per Amundsen | [[/drawcopy]] |
| 111 | [[/drawdot]] |
||
| 112 | [[/drawfill]] |
||
| 113 | [[/drawline]] |
||
| 114 | [[/drawpic]] |
||
| 115 | [[/drawrect]] |
||
| 116 | [[/drawreplace]] |
||
| 117 | [[/drawrot]] |
||
| 118 | [[/drawsave]] |
||
| 119 | [[/drawscroll]] |
||
| 120 | 141 | Per Amundsen | [[/drawtext]] |
| 121 | 136 | Per Amundsen | [[/ebeeps]] |
| 122 | 145 | Per Amundsen | | [[/echo]] |
| 123 | *[[/echomonitor]]* |
||
| 124 | 123 | Per Amundsen | *[[/echox]]* |
| 125 | 97 | Per Amundsen | *[[/edit]]* |
| 126 | 94 | Per Amundsen | [[/editbox]] |
| 127 | 84 | Per Amundsen | [[/else]] |
| 128 | 74 | Per Amundsen | [[/elseif]] |
| 129 | 88 | Per Amundsen | [[/emailaddr]] |
| 130 | 66 | Per Amundsen | [[/enable]] |
| 131 | 1 | Per Amundsen | *[[/encoding]]* |
| 132 | [[/events]] |
||
| 133 | [[/exit]] |
||
| 134 | 60 | Per Amundsen | *[[/fakeraw]]* |
| 135 | 57 | Per Amundsen | [[/fclose]] |
| 136 | 144 | Per Amundsen | *[[/fget]]* |
| 137 | 54 | Per Amundsen | [[/filter]] |
| 138 | 52 | Per Amundsen | [[/findtext]] |
| 139 | 160 | Per Amundsen | [[/firewall]] |
| 140 | 50 | Per Amundsen | [[/flash]] |
| 141 | 1 | Per Amundsen | [[/flist]] |
| 142 | [[/flushini]] |
||
| 143 | 67 | Per Amundsen | [[/font]] |
| 144 | 124 | Per Amundsen | [[/fopen]] |
| 145 | 39 | Per Amundsen | [[/fseek]] |
| 146 | 144 | Per Amundsen | [[/fsend]] |
| 147 | 85 | Per Amundsen | [[/fullname]] |
| 148 | 45 | Per Amundsen | *[[/fullscreen]]* |
| 149 | 36 | Per Amundsen | [[/fwrite]] |
| 150 | 33 | Per Amundsen | *[[/gcmem]]* |
| 151 | 32 | Per Amundsen | *[[/google]]* |
| 152 | 23 | Per Amundsen | [[/goto]] |
| 153 | 143 | Per Amundsen | [[/groups]] |
| 154 | 77 | Per Amundsen | [[/guser]] |
| 155 | 1 | Per Amundsen | [[/hadd]] |
| 156 | 27 | Per Amundsen | *[[/halfop]]* |
| 157 | 1 | Per Amundsen | [[/halt]] |
| 158 | [[/haltdef]] |
||
| 159 | [[/hdec]] |
||
| 160 | [[/hdel]] |
||
| 161 | [[/help]] |
||
| 162 | 48 | Per Amundsen | [[/hfree]] |
| 163 | 1 | Per Amundsen | *[[/highlight]]* |
| 164 | [[/hinc]] |
||
| 165 | 144 | Per Amundsen | [[/hload]] |
| 166 | 1 | Per Amundsen | [[/hmake]] |
| 167 | 160 | Per Amundsen | | [[/hop]] |
| 168 | [[/hotlink]] |
||
| 169 | 157 | Per Amundsen | [[/hsave]] |
| 170 | 145 | Per Amundsen | [[/ialmark]] |
| 171 | 1 | Per Amundsen | [[/identd]] |
| 172 | 128 | Per Amundsen | *[[/icon]]* |
| 173 | 140 | Per Amundsen | [[/if]] |
| 174 | 124 | Per Amundsen | [[/ignore]] |
| 175 | 123 | Per Amundsen | [[/iline]] |
| 176 | 122 | Per Amundsen | [[/inc]] |
| 177 | 141 | Per Amundsen | *[[/inick]]* |
| 178 | 96 | Per Amundsen | [[/invite]] |
| 179 | 94 | Per Amundsen | [[/iuser]] |
| 180 | 89 | Per Amundsen | [[/join]] |
| 181 | 88 | Per Amundsen | [[/kick]] |
| 182 | 85 | Per Amundsen | [[/kill]] |
| 183 | 84 | Per Amundsen | *[[/lag]]* |
| 184 | 126 | Per Amundsen | [[/leave]] |
| 185 | 149 | Per Amundsen | *[[/linemarker]]* |
| 186 | 78 | Per Amundsen | [[/linesep]] |
| 187 | 77 | Per Amundsen | [[/list]] |
| 188 | 74 | Per Amundsen | [[/load]] |
| 189 | 67 | Per Amundsen | [[/loadbuf]] |
| 190 | 66 | Per Amundsen | *[[/lock]]* |
| 191 | 130 | Per Amundsen | [[/log]] |
| 192 | 1 | Per Amundsen | *[[/logs]]* |
| 193 | [[/logview]] |
||
| 194 | [[/markall]] |
||
| 195 | 69 | Per Amundsen | [[/mdi]] |
| 196 | 57 | Per Amundsen | [[/me]] |
| 197 | 1 | Per Amundsen | [[/menubar]] |
| 198 | [[/mkdir]] |
||
| 199 | 85 | Per Amundsen | [[/mnick]] |
| 200 | 52 | Per Amundsen | [[/mode]] |
| 201 | 50 | Per Amundsen | [[/msg]] |
| 202 | 95 | Per Amundsen | *[[/msgbox]]* |
| 203 | 1 | Per Amundsen | *[[/mute]]* |
| 204 | *[[/nextunread]]* |
||
| 205 | [[/nick]] |
||
| 206 | 64 | Per Amundsen | [[/nickcolumn]] |
| 207 | 1 | Per Amundsen | [[/nicklist]] |
| 208 | 39 | Per Amundsen | *[[/nmsg]]* |
| 209 | 1 | Per Amundsen | [[/noop]] |
| 210 | [[/notice]] |
||
| 211 | [[/notify]] |
||
| 212 | 160 | Per Amundsen | | *[[/np]]* |
| 213 | *[[/oline]]* |
||
| 214 | 149 | Per Amundsen | [[/omsg]] |
| 215 | 145 | Per Amundsen | [[/onotice]] |
| 216 | 132 | Per Amundsen | [[/op]] |
| 217 | 130 | Per Amundsen | *[[/options]]* |
| 218 | 128 | Per Amundsen | [[/parseline]] |
| 219 | 126 | Per Amundsen | [[/part]] |
| 220 | 125 | Per Amundsen | [[/partall]] |
| 221 | 123 | Per Amundsen | *[[/paths]]* |
| 222 | 122 | Per Amundsen | [[/perform]] |
| 223 | 121 | Per Amundsen | *[[/pgoogle]]* |
| 224 | 118 | Per Amundsen | *[[/plugins]]* |
| 225 | 99 | Per Amundsen | *[[/priv]]* |
| 226 | 137 | Per Amundsen | [[/proxy]] |
| 227 | 96 | Per Amundsen | [[/query]] |
| 228 | 95 | Per Amundsen | [[/queryrn]] |
| 229 | 94 | Per Amundsen | *[[/quickconnect]]* |
| 230 | 89 | Per Amundsen | *[[/quicksave]]* |
| 231 | 88 | Per Amundsen | [[/quit]] |
| 232 | 1 | Per Amundsen | [[/quote]] |
| 233 | 85 | Per Amundsen | [[/raw]] |
| 234 | 84 | Per Amundsen | *[[/rawx]]* |
| 235 | *[[/rawlog]]* |
||
| 236 | 85 | Per Amundsen | *[[/realname]]* |
| 237 | 77 | Per Amundsen | *[[/reconnect]]* |
| 238 | 74 | Per Amundsen | *[[/rejoin]]* |
| 239 | 69 | Per Amundsen | [[/reload]] |
| 240 | 67 | Per Amundsen | [[/remini]] |
| 241 | 66 | Per Amundsen | [[/remote]] |
| 242 | 1 | Per Amundsen | [[/remove]] |
| 243 | [[/rename]] |
||
| 244 | [[/renwin]] |
||
| 245 | [[/reseterror]] |
||
| 246 | 82 | Per Amundsen | [[/resetidle]] |
| 247 | 1 | Per Amundsen | *[[/resolve]]* |
| 248 | 57 | Per Amundsen | *[[/restart]]* |
| 249 | 54 | Per Amundsen | [[/return]] |
| 250 | 1 | Per Amundsen | [[/returnex]] |
| 251 | 79 | Per Amundsen | [[/rlevel]] |
| 252 | 1 | Per Amundsen | [[/rline]] |
| 253 | [[/rmdir]] |
||
| 254 | [[/run]] |
||
| 255 | [[/ruser]] |
||
| 256 | 140 | Per Amundsen | [[/say]] |
| 257 | 160 | Per Amundsen | |^. [[/savebuf]] |
| 258 | [[/saveini]] |
||
| 259 | 149 | Per Amundsen | [[/scid]] |
| 260 | 145 | Per Amundsen | [[/scon]] |
| 261 | 132 | Per Amundsen | *[[/scripts]]* |
| 262 | 130 | Per Amundsen | *[[/search]]* |
| 263 | 128 | Per Amundsen | [[/server]] |
| 264 | 126 | Per Amundsen | *[[/serverlist]]* |
| 265 | 124 | Per Amundsen | [[/set]] |
| 266 | 123 | Per Amundsen | *[[/setconfig]]* |
| 267 | 122 | Per Amundsen | [[/setlayer]] |
| 268 | 123 | Per Amundsen | *[[/setoption]]* |
| 269 | *[[/showadiirc]]* |
||
| 270 | 148 | Per Amundsen | *[[/showmenu]]* |
| 271 | 98 | Per Amundsen | [[/showmirc]] |
| 272 | 96 | Per Amundsen | [[/signal]] |
| 273 | 95 | Per Amundsen | *[[/slap]]* |
| 274 | 94 | Per Amundsen | *[[/sleep]]* |
| 275 | 89 | Per Amundsen | [[/sline]] |
| 276 | 88 | Per Amundsen | [[/sockaccept]] |
| 277 | 1 | Per Amundsen | [[/sockclose]] |
| 278 | [[/socklist]] |
||
| 279 | 85 | Per Amundsen | [[/socklisten]] |
| 280 | 84 | Per Amundsen | [[/sockmark]] |
| 281 | 82 | Per Amundsen | [[/sockopen]] |
| 282 | 80 | Per Amundsen | [[/sockpause]] |
| 283 | 79 | Per Amundsen | [[/sockread]] |
| 284 | 77 | Per Amundsen | [[/sockrename]] |
| 285 | 1 | Per Amundsen | [[/sockudp]] |
| 286 | [[/sockwrite]] |
||
| 287 | *[[/sop]]* |
||
| 288 | 69 | Per Amundsen | [[/splay]] |
| 289 | 1 | Per Amundsen | *[[/statusbar]]* |
| 290 | 66 | Per Amundsen | [[/switchbar]] |
| 291 | 1 | Per Amundsen | *[[/tab]]* |
| 292 | 63 | Per Amundsen | *[[/themes]]* |
| 293 | 1 | Per Amundsen | [[/time]] |
| 294 | [[/timestamp]] |
||
| 295 | [[/timer]] |
||
| 296 | [[/tip]] |
||
| 297 | [[/tips]] |
||
| 298 | [[/titlebar]] |
||
| 299 | 141 | Per Amundsen | [[/tokenize]] |
| 300 | 140 | Per Amundsen | [[/toolbar]] |
| 301 | 139 | Per Amundsen | [[/topic]] |
| 302 | 160 | Per Amundsen | |^. *[[/topicbox]]* |
| 303 | [[/treebar]] |
||
| 304 | 149 | Per Amundsen | [[/ulist]] |
| 305 | 148 | Per Amundsen | *[[/usernick]]* |
| 306 | 145 | Per Amundsen | *[[/txt2bin]]* |
| 307 | 128 | Per Amundsen | *[[/unban]]* |
| 308 | 127 | Per Amundsen | *[[/unignore]]* |
| 309 | 126 | Per Amundsen | [[/unload]] |
| 310 | 124 | Per Amundsen | *[[/unnotify]]* |
| 311 | 123 | Per Amundsen | [[/unset]] |
| 312 | 122 | Per Amundsen | [[/unsetall]] |
| 313 | *[[/update]]* |
||
| 314 | 135 | Per Amundsen | [[/updatenl]] |
| 315 | 129 | Per Amundsen | [[/url]] |
| 316 | 118 | Per Amundsen | [[/uwho]] |
| 317 | 98 | Per Amundsen | [[/var]] |
| 318 | 96 | Per Amundsen | *[[/vars]]* |
| 319 | 95 | Per Amundsen | *[[/viewlog]]* |
| 320 | 94 | Per Amundsen | *[[/voice]]* |
| 321 | 91 | Per Amundsen | [[/vol]] |
| 322 | 90 | Per Amundsen | *[[/wdown]]* |
| 323 | 89 | Per Amundsen | [[/while]] |
| 324 | 88 | Per Amundsen | [[/window]] |
| 325 | 87 | Per Amundsen | *[[/wjump]]* |
| 326 | 1 | Per Amundsen | *[[/wnext]]* |
| 327 | *[[/wpause]]* |
||
| 328 | 85 | Per Amundsen | *[[/wplay]]* |
| 329 | 84 | Per Amundsen | *[[/wprev]]* |
| 330 | 82 | Per Amundsen | [[/write]] |
| 331 | 81 | Per Amundsen | [[/writeini]] |
| 332 | 80 | Per Amundsen | *[[/wsearch]]* |
| 333 | 79 | Per Amundsen | *[[/wseekf]]* |
| 334 | 78 | Per Amundsen | *[[/wseekr]]* |
| 335 | 77 | Per Amundsen | *[[/wselect]]* |
| 336 | 1 | Per Amundsen | *[[/wstop]]* |
| 337 | *[[/wup]]* |
||
| 338 | 162 | Mr. BS | | |
| 339 | |||
| 340 | %(acounter) % |
||
| 341 | 1 | Per Amundsen | |
| 342 | 150 | Per Amundsen | h2. System information Commands |
| 343 | 117 | Per Amundsen | |
| 344 | 142 | Per Amundsen | Output from these are set in [[Options_Dialog|Options]] -> [[Sysinfo Options|Sysinfo]] and are merely convenient aliases. |
| 345 | 16 | Per Amundsen | |
| 346 | /sysinfo |
||
| 347 | 1 | Per Amundsen | /gfxinfo |
| 348 | 31 | Per Amundsen | /cpuinfo |
| 349 | 1 | Per Amundsen | /meminfo |
| 350 | /diskinfo |
||
| 351 | /audioinfo |
||
| 352 | /uptime |
||
| 353 | /bw |
||
| 354 | |||
| 355 | 150 | Per Amundsen | h2. Missing Commands |
| 356 | 1 | Per Amundsen | |
| 357 | 138 | Per Amundsen | /aop |
| 358 | 1 | Per Amundsen | /avoice |
| 359 | /creq |
||
| 360 | /dccserver |
||
| 361 | /dqwindow |
||
| 362 | /flood |
||
| 363 | /flush |
||
| 364 | /fserve |
||
| 365 | /ghide |
||
| 366 | /gload |
||
| 367 | /gopts |
||
| 368 | /gplay |
||
| 369 | /gpoint |
||
| 370 | /gqreq |
||
| 371 | /gshow |
||
| 372 | /gsize |
||
| 373 | /gstop |
||
| 374 | /gtalk |
||
| 375 | 119 | Per Amundsen | /gunload |
| 376 | 1 | Per Amundsen | /ial |
| 377 | /ialclear |
||
| 378 | 30 | Per Amundsen | /links |
| 379 | 1 | Per Amundsen | /localinfo |
| 380 | /pdcc |
||
| 381 | /play |
||
| 382 | /playctrl |
||
| 383 | /pop |
||
| 384 | /protect |
||
| 385 | /pvoice |
||
| 386 | /qme |
||
| 387 | /qmsg |
||
| 388 | /save |
||
| 389 | /sound |
||
| 390 | /speak |
||
| 391 | /sreq |
||
| 392 | /strip |
||
| 393 | /tnick |
||
| 394 | /tray |
||
| 395 | /vcadd |
||
| 396 | /vcmd |
||
| 397 | /vcrem |
||
| 398 | /winhelp |
||
| 399 | |||
| 400 | 150 | Per Amundsen | h2. Command prefixes |
| 401 | |||
| 402 | /! prefix will execute the internal command, even if there is a alias with the same name. |
||
| 403 | |||
| 404 | Example: |
||
| 405 | |||
| 406 | <pre> |
||
| 407 | ; Override the /me command, |
||
| 408 | alias me { |
||
| 409 | ; use the /! prefix to call the internal command. |
||
| 410 | /!me $1- |
||
| 411 | } |
||
| 412 | </pre> |
||
| 413 | |||
| 414 | /. prefix can be used to silence the output from many command. |
||
| 415 | |||
| 416 | Example: |
||
| 417 | |||
| 418 | <pre> |
||
| 419 | 155 | Per Amundsen | /.msg #channel This message will be hidden from your client, but still sent to the server. |
| 420 | 150 | Per Amundsen | </pre> |
| 421 | |||
| 422 | Both prefix's can be used at the same time. |
||
| 423 | |||
| 424 | Example: |
||
| 425 | |||
| 426 | <pre> |
||
| 427 | 155 | Per Amundsen | /!.msg #channel This message will be hidden from your client, but still sent to the server. |
| 428 | 150 | Per Amundsen | </pre> |
| 429 | |||
| 430 | h2. Evaluate identifiers from Editbox |
||
| 431 | 105 | Per Amundsen | |
| 432 | 156 | Per Amundsen | Typing a command in the Editbox with double slashes// will evaluate [[Scripting Identifiers|$identifiers]] in the line before running it. |
| 433 | 105 | Per Amundsen | E.g //echo -ag My nick is $me |
| 434 | |||
| 435 | 156 | Per Amundsen | You can also [[tabcomplete]] [[Scripting Identifiers|$identifiers]] manually using $me<tab>. |
| 436 | 107 | Per Amundsen | |
| 437 | 151 | Per Amundsen | h2. Creating a new command |
| 438 | 107 | Per Amundsen | |
| 439 | 112 | Per Amundsen | You can create a new command by opening the menu Tools -> Edit Aliases. |
| 440 | 107 | Per Amundsen | |
| 441 | 108 | Per Amundsen | The format for the command is <command> <script to execute>. |
| 442 | 107 | Per Amundsen | |
| 443 | *Example* |
||
| 444 | |||
| 445 | <pre> |
||
| 446 | 108 | Per Amundsen | ; Creates a new command '/p' which will evaluate and then execute the script '/part $chan'. |
| 447 | 1 | Per Amundsen | /p /part $chan |
| 448 | 108 | Per Amundsen | </pre> |
| 449 | |||
| 450 | 110 | Per Amundsen | You can also add a command from the script editor, the syntax there is alias <command> <script to execute> |
| 451 | 108 | Per Amundsen | |
| 452 | *Example* |
||
| 453 | |||
| 454 | <pre> |
||
| 455 | ; Creates a new command '/p' which will evaluate and then execute the script '/part $chan'. |
||
| 456 | ; Same as previous example. |
||
| 457 | alias p /part $chan |
||
| 458 | </pre> |
||
| 459 | |||
| 460 | 111 | Per Amundsen | If you want to use scripts with multiple lines, you can enclose them with {} brackets in both Edit Aliases and Script Editor. |
| 461 | 108 | Per Amundsen | |
| 462 | *Example* |
||
| 463 | <pre> |
||
| 464 | ; Edit Aliases |
||
| 465 | 109 | Per Amundsen | /p { |
| 466 | 108 | Per Amundsen | /echo -ag I am parting $chan |
| 467 | /part $chan |
||
| 468 | } |
||
| 469 | |||
| 470 | ; Script editor |
||
| 471 | alias p { |
||
| 472 | /echo -ag I am parting $chan |
||
| 473 | /part $chan |
||
| 474 | } |
||
| 475 | </pre> |
||
| 476 | |||
| 477 | Almost all built-in commands can be overridden to execute your own script. |
||
| 478 | |||
| 479 | *Example* |
||
| 480 | |||
| 481 | <pre> |
||
| 482 | ; Create your own /part command |
||
| 483 | alias part { |
||
| 484 | /echo -ag I am parting $chan |
||
| 485 | raw PART $chan |
||
| 486 | } |
||
| 487 | |||
| 488 | 114 | Per Amundsen | ; Create your own /part command, but execute the built-in /part command after executing your own script. |
| 489 | 108 | Per Amundsen | alias part { |
| 490 | /echo -ag I am parting $chan |
||
| 491 | |||
| 492 | ; Execute the built-in part command |
||
| 493 | !part $chan |
||
| 494 | } |
||
| 495 | 107 | Per Amundsen | </pre> |
| 496 | 113 | Per Amundsen | |
| 497 | A command can also be called as a $identifier. |
||
| 498 | |||
| 499 | *Example* |
||
| 500 | |||
| 501 | <pre> |
||
| 502 | ; Create a command. |
||
| 503 | alias mycommand { |
||
| 504 | 115 | Per Amundsen | echo -ag I was called as a $iif($isid,identifier,command) |
| 505 | 113 | Per Amundsen | } |
| 506 | |||
| 507 | ; Call the command as identifier. |
||
| 508 | //noop $mycommand |
||
| 509 | |||
| 510 | 116 | Per Amundsen | ; Call the command as a command. |
| 511 | 113 | Per Amundsen | /mycommand |
| 512 | </pre> |