autocomplete channel names
Platform: mIRC
Published Aug 04, 2011
Updated Aug 04, 2011
autocompletes channel(s): # into #active channel /sajoin nick # ... and it joins nick to channel you write it in, or usefull for regging multiple channels
on *:INPUT:#:{
set %tmsg $1-
if ($left($1,2) == //) {
; input starts with // do nothing ..
}
else if ($left($1,1) != /) {
if ($gettok($1-,-1,32) == $chr(35)) {
set %offs $calc($numtok($1-,32)-1)
set %tmsg $gettok(%tmsg, 1- $+ %offs,32) $chan
}
msg $chan $replace(%tmsg,$chr(35) $+ $chr(32),$chan $+ $chr(32))
halt
}
else {
if ($gettok($1-,-1,32) == $chr(35)) {
set %offs $calc($numtok($1-,32)-1)
set %tmsg $gettok(%tmsg, 1- $+ %offs,32) $chan
}
$replace(%tmsg,$chr(35) $+ $chr(32),$chan $+ $chr(32))
halt
}
}