; put into remote
; allows: /query <nick1,nick2,nick3> [text]
;
; changes also the query name to the correct nick format if possible
; if it works, it was written by me, if not, i don't know who wrote it ;)
; Allowing query for wildmask nicks too if
; for example:
; /query You*
; It will query the first nick matching that wildmask
alias query {
if ($1 == -n) { set %qminimize $true | tokenize 32 $2- }
var %x = $2-
if (, isin $1) { !tokenize 44 $1 | Ÿ $* %x }
else { Ÿ $$1 %x }
unset %qminimize
}
alias -l Ÿ {
!.query $$1
if ($ial($1 $+ !*@*).nick) {
!var %n = $v1
if ($query(%n) && %n != $1) { !window -c $1 | if (!%qminimize) { !window -a %n } }
else { !queryrn $1 %n | if (!%qminimize) { !window -a %n } }
tokenize 32 %n $2-
}
elseif (!%qminimize) { !window -a $1 }
if ($len($2)) { !msg $1 $2- }
}