Help with $read - 27/08/05 11:02 PM
Hi, I have a text file that keeps a list of username and ips. In the list are some duplicate names but with a different ip. I have a command !search <name> that searches the text for the name and then messages the result to the channel. But the problem is that it only returns the first result found and not all of them. How can it be changed to return all results found?
Example
[Joe] !search Joe
[Me] 3 results found for 'Joe'
[Me] Joe - 127.0.0.1
[Me] Joe - 192.168.1.1
[Me] Joe - 192.168.254.254
[Me] Finished search database.
Here is my code
on 1:text:!search *:#mychannel:{
msg #mychannel $read(database.txt,w,$2)
}
I looked in mirc help but I did not find anything that helps, I am not very good at mirc scripting.
Also, how can I make an autoresponse in query if the first character of a message is not an exclamation point ( ! ).
I tried this but it doesn't work
on 1:text:*:?:{
if ($right($1,1) != $chr(33)) { msg $nick You are talking to a bot. }
}
Example
[Joe] !search Joe
[Me] 3 results found for 'Joe'
[Me] Joe - 127.0.0.1
[Me] Joe - 192.168.1.1
[Me] Joe - 192.168.254.254
[Me] Finished search database.
Here is my code
on 1:text:!search *:#mychannel:{
msg #mychannel $read(database.txt,w,$2)
}
I looked in mirc help but I did not find anything that helps, I am not very good at mirc scripting.
Also, how can I make an autoresponse in query if the first character of a message is not an exclamation point ( ! ).
I tried this but it doesn't work
on 1:text:*:?:{
if ($right($1,1) != $chr(33)) { msg $nick You are talking to a bot. }
}