Wims and genius_at_work already explained how you might go about it. Here's a concrete example:
Code:
on *:TEXT:*:#FFVXI:{
  if $0 > 5 && $nick == User {
    set -u %globalvar $6
    filter -fk file.txt blah
  }
}
alias blah {
  if $replace(* $+ $1*,$chr(32),*) iswm %globalvar {
    echo -a $1
  }
}


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com