Sure.
In your situation, you have the nick who sent the message, $nick, and the nick specified after !view, which is the second word of the message, $2, and I quote:
Quote:
When !view <nick> is used, I want it to display the profile info found in the .ini file for the nick specified after !view.


Note also that you must always use the 'n' switch with $readini when you don't want to evaluate the line being read, this is unsafe and in a typical script like this (and it's the case here) there is an exploit, people can use the current script here to do anything they want on your computer, you can read more about it here .

Code:
on *:text:!view *:#ChanName: {
;this check that $2, the nickname, is specified and that we have a profile for that nickname
if ($2 != $null) && ($ini(info.ini,$2) != $null) {
/notice $nick * * * Profile for $2 * * *
/notice $nick *
;no need to use info $+ .ini, info.ini is just fine, maybe you had something before..
/notice $nick Age: $readini(info.ini,n,$2,Age) - - - Gender: $readini(info.ini,n,$2,Gender) - - - Location: $readini(info .ini,n,$2,Location) - - - Role: $readini(info.ini,n,$2,Role) | /notice $nick *
/notice $nick Description: $readini(info.ini,n,$2,Description) 
/notice $nick * 
/notice $nick * * * End of profile * * *
;no need to halt here
}
}

Last edited by Wims; 22/06/14 08:32 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel