There are many ways to store and retrieve data in mIRC script. Each has its uses. For what you are trying to do, the easiest way is probably to use an .ini file. For small amounts of data, an .ini file works very well. It stores data in the following format:
For instance:
- [auger-away]
undernet=f265f982r
[auger]
undernet=h43g6lsd2
DALnet=oooogabooooga
So, in essence, you can create your own little "database" with common fields for each [nick] that you wish to use, with a few
gotcha's. For instance, you have to be careful which characters you are trying to store since some characters will not be stored in an .ini properly. This is usually not a problem because you can use $replace to replace the problem characters with a different, storable-but-unusable character when you store it and reverse the process when you retrieve the data.
You use $readini to get the data out of the .ini file and /writeini to store data inside it. Assume we're using a file formatted like the example above, called
passwords.ini:
; Get the old password from the .ini file
;
var %password = $readini(passwords.ini,$me,$network)
;
; Ask the user for a new password
;
var %NewPassword = $$input(Please enter a new password:,eipo,Change Password,%password)
;
; Store the new password
;
writeini passwords.ini $me $network %NewPassword