mIRC Homepage
Posted By: fallen248 search - 16/07/03 05:31 PM
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
Posted By: LocutusofBorg Re: search - 16/07/03 05:41 PM
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
Posted By: fallen248 Re: search - 16/07/03 05:46 PM
thanks alot, now if i wanted to remove one of the nicks in the members.txt file how would i do that?
Posted By: LocutusofBorg Re: search - 16/07/03 05:49 PM
after the if statement, if the member was found, you can simply replace the
msg # $2 found
with
write $+(-dl,$readn) members.txt
© mIRC Discussion Forums