ok, i have a file called members.txt now in this file each line contains a nickname, how would i have a bot check to see if a nick is present when given the command .searchmember [nick]. i want the outputs to be either:
[nick] not found
or
[nick] found
assuming the nick is the first word on the line:
on *:TEXT:.searchmember*:#: {
if ($read(members.txt,w,$+($2,*))) msg # $2 found
else msg # $2 not found
}
note: the # in the eventline indicates a channel, use a = for a dcc chat or a ? for a query
when using a query, replace msg # with msg $nick
when using a dcc chat, replace msg # with msg =$nick
thanks alot, now if i wanted to remove one of the nicks in the members.txt file how would i do that?
after the if statement, if the member was found, you can simply replace the
msg # $2 found
with
write $+(-dl,$readn) members.txt