I have a list.txt file that records names of users that type !join in twitch chat.
Instead of going to the direct file to remove a specific name, I wanted to find a way to remove a user's name from the list through a command on twitch chat.
This is what I have so far. This only works if there's one person on the list.

on *:text:!remove *:#: {
if ($nick isop #) {
if (!$read(list.txt,nw,$2)) { msg $chan $2- is not in the list. | return }
else { msg $chan /me removed $2 from the list.
write -dl list.txt , $2