On *:TEXT:*:#:{ if ($1 == $+(.,<trigger>, *)) && ($2 == <whatever>) { do stuff here } }