Just a little snippet to list all the channels you are on in alphabetical order.
Been useful for me sometimes. Thought other people might get some use from it.
alias chans {
var %x = $chan(0)
while (%x) {
var %chan %chan $chan(%x)
dec %x
}
var %chan $sorttok($replace(%chan,$chr(32),$chr(44)),44,a)
echo -a %chan
}
As you know ..nick completions only apears at the begining of the text , my idea is to make it apears anywhere on the text ...here is the part i asume it has to be modificate or change it .. if someone cane help me with this ...
/corrige.nicks {
if ( $right($1,1) = : ) {
%nc = 0
%nn = $nick(#,0)
:1
inc %nc 1
if (%nc > %nn) goto 3
%nac = $nick(#,%nc)
%ntm = $len(%nac)
%nsf = $ncmuestra(%nac)
%npart = $remove( $1 ,:)
if (%npart isin %nac) {
%texto = %nsf $+ $right(%texto,$calc($len(%texto) - $len($$1)))
goto 3
}
else { goto 1 }
:3
unset %nac %ntm %nsf %nn %nc %npart
}
elseif ($$1 ison #) {
; %texto = $replace(%texto,$$1,$ncmuestra($nick(#,$nick(#,$$1))))
%texto = $ncmuestra($nick(#,$nick(#,$$1))) $+ $right(%texto,$calc($len(%texto) - $len($$1)))
}
}
ncmuestra {
return $+ %nc1.c $+ $+ %nc1 $+ [ $ $+ [ texto $+ [ %ncnick ] $+ ($$1) ] ] $+ $+ %nc2.c $+ $+ %nc2 $+
}
No sorttok is necessary unless you didn't check the "sort buttons" under mirc's display option. When checked, the list will be listed alphabetically. You can do this the non-regex way in one line with a loop:
alias chans while ($chan($0)) tokenize 32 $1- $v1 | echo -a $2-
Sort buttons
If this option is turned on, window buttons are sorted alphabetically as opposed to the order in which windows were opened.Why go the extra mile when something is handy for you to grab?