[neXus] — File Browser
neXusv1.3 / neXusv1.3 / [neXus] / System / a-shortcuts.txt
a-shortcuts.txt — 4.52 KB — Download this file
[za-shortcutsz]
h if (# == $null) { echo 4 -a $te You must perform this command in a channel | halt } | .raw part # | .raw join #$$1
c if (# == $null) { echo 4 -a $te You must perform this command in a channel | halt } | set %key $chan(#).key | part # | .raw join # %key | halt
p if (# == $null) { echo 4 -a $te You must perform this command in a channel | halt } | .raw part # | halt
n if ($1 == $null) { echo 1 -a $pa(Nick-Error) You must specify a nickname to change to | halt } | else { nick $1 }
op raw -q mode # +oooooo $1 $2 $3 $4 $5 $6
dop raw -q mode # -oooooo $1 $2 $3 $4 $5 $6
se //server $1 | spit
w whois *1
ww whowas $1
m echo 1 -a -> $br(msg,$1) *2 | /.raw -q privmsg $1 : $+ *2
q query $1 *2
j set %ticks $ticks | .raw join #$$1 *2
wall onotice $br(OpChat,#) 5 $+ *1
hi set %x $replace(*1,$chr(32), ) | set %z $right(1,%x) | say %x $+ $str(40,%z) | unset %z
encode {
set %temp $asc($$1)
if (%temp >= 128) { set %bin 1 | set %temp %temp - 128 }
else { set %bin 0 }
if (%temp >= 64) { set %bin %bin $+ 1 | set %temp %temp - 64 }
else { set %bin %bin $+ 0 }
if (%temp >= 32) { set %bin %bin $+ 1 | set %temp %temp - 32 }
else { set %bin %bin $+ 0 }
if (%temp >= 16) { set %bin %bin $+ 1 | set %temp %temp - 16 }
else { set %bin %bin $+ 0 }
if (%temp >= 8) { set %bin %bin $+ 1 | set %temp %temp - 8 }
else { set %bin %bin $+ 0 }
if (%temp >= 4) { set %bin %bin $+ 1 | set %temp %temp - 4 }
else { set %bin %bin $+ 0 }
if (%temp >= 2) { set %bin %bin $+ 1 | set %temp %temp - 2 }
else { set %bin %bin $+ 0 }
if (%temp >= 1) { set %bin %bin $+ 1 | set %temp %temp - 1 }
else { set %bin %bin $+ 0 }
rem -
if $mid(1,2,%bin) == 00 { set %code_output %code_output $+ $chr(2) }
if $mid(1,2,%bin) == 01 { set %code_output %code_output $+ $chr(3) }
if $mid(1,2,%bin) == 10 { set %code_output %code_output $+ $chr(15) }
if $mid(1,2,%bin) == 11 { set %code_output %code_output $+ $chr(22) }
rem -
if $mid(3,2,%bin) == 00 { set %code_output %code_output $+ $chr(2) }
if $mid(3,2,%bin) == 01 { set %code_output %code_output $+ $chr(3) }
if $mid(3,2,%bin) == 10 { set %code_output %code_output $+ $chr(15) }
if $mid(3,2,%bin) == 11 { set %code_output %code_output $+ $chr(22) }
rem -
if $mid(5,2,%bin) == 00 { set %code_output %code_output $+ $chr(2) }
if $mid(5,2,%bin) == 01 { set %code_output %code_output $+ $chr(3) }
if $mid(5,2,%bin) == 10 { set %code_output %code_output $+ $chr(15) }
if $mid(5,2,%bin) == 11 { set %code_output %code_output $+ $chr(22) }
rem -
if $mid(7,2,%bin) == 00 { set %code_output %code_output $+ $chr(2) }
if $mid(7,2,%bin) == 01 { set %code_output %code_output $+ $chr(3) }
if $mid(7,2,%bin) == 10 { set %code_output %code_output $+ $chr(15) }
if $mid(7,2,%bin) == 11 { set %code_output %code_output $+ $chr(22) }
unset %bin %temp
}
decode {
set %bin $$1
set %code_input 0
rem -
if $mid(1,1,%bin) == $chr(2) { set %code_input %code_input + 0 }
if $mid(1,1,%bin) == $chr(3) { set %code_input %code_input + 64 }
if $mid(1,1,%bin) == $chr(15) { set %code_input %code_input + 128 }
if $mid(1,1,%bin) == $chr(22) { set %code_input %code_input + 192 }
rem -
if $mid(2,1,%bin) == $chr(2) { set %code_input %code_input + 0 }
if $mid(2,1,%bin) == $chr(3) { set %code_input %code_input + 16 }
if $mid(2,1,%bin) == $chr(15) { set %code_input %code_input + 32 }
if $mid(2,1,%bin) == $chr(22) { set %code_input %code_input + 48 }
rem -
if $mid(3,1,%bin) == $chr(2) { set %code_input %code_input + 0 }
if $mid(3,1,%bin) == $chr(3) { set %code_input %code_input + 4 }
if $mid(3,1,%bin) == $chr(15) { set %code_input %code_input + 8 }
if $mid(3,1,%bin) == $chr(22) { set %code_input %code_input + 12 }
rem -
if $mid(4,1,%bin) == $chr(2) { set %code_input %code_input + 0 }
if $mid(4,1,%bin) == $chr(3) { set %code_input %code_input + 1 }
if $mid(4,1,%bin) == $chr(15) { set %code_input %code_input + 2 }
if $mid(4,1,%bin) == $chr(22) { set %code_input %code_input + 3 }
unset %bin %temp
}
lnames set %window.show 1 | names #
lwho .enable #lwho | who #
code {
if (%code_output == $null) { set %code_output ] }
set %code_parms *1
set %code_parms_len $len(%code_parms)
set %code_count 1
:code_loop
set %code_temp $mid(%code_count,1,*1)
if (%code_temp == $chr(32)) { set %code_temp $chr(31) }
encode %code_temp
if (%code_count == %code_parms_len) {
say [10!z10!1 $+ %code_output
unset %code*
halt
}
else {
inc %code_count
goto code_loop
}
}