I found a script so that people can join a queue for viewer games but I'm trying to set it so a user can enter their in-game username after "!joinqueue" so that it will display that instead of their Twitch username. What I'm trying to do it have the command be: !joinqueue <their in-game username>



This is what I have so far:

on *:text:!joinqueue *:#: {
if ($read(list.txt,nw,$3)) { msg $chan You're already in the queue. | return }
else write list.txt $$3
msg $chan $$3 has been added to the queue!
}