Thank you Wims for being willing to help others. One last question if I may?

I want to prevent users without a profile to access other profiles, I have tried various ways without success the last above your code below seems to allow users with or without a profile. Any ideas?

Quote


on *:text:!view *:#: {
;check if having profile======================

if ($2 != $null) {
if ($ini(info.ini,$2) != $null) var %nick $2
else {
msg # Sorry you nust have a profile to view other profiles... Type !setup to do so
return
}
}
elseif ($ini(info.ini,$nick) != $null) var %nick $nick
else {
msg # Sorry you nust have a profile to view other profiles... Type !setup to do so
return
}

; ====================

: your code to view regardless of having a profile

on *:text:!view *:#ChanName:{
;the code will use the variable %nick for the profile, either set to $2 or to $nick
if ($2 != $null) {
if ($ini(info.ini,$2) != $null) var %nick $2
else {
msg $chan Error: no profile for the nickname $2
;after an error, you don't want to keep going with the profile so you /return, using /halt is not necessary and can have consequences on the rest of the loaded scripts
return
}
}
elseif ($ini(info.ini,$nick) != $null) var %nick $nick
else {
msg $chan Error: no profile for the your nickname $nick
return
}
/notice $nick * * * Profile for %nick * * *
/notice $nick *
/notice $nick Age: $readini(info.ini,n,%nick,Age) - - - Gender: $readini(info.ini,n,%nick,Gender) - - - Location: $readini(info.ini,n,%nick,Location) - - - Role: $readini(info.ini,n,%nick,Role) | /notice $nick *
/notice $nick Description: $readini(info.ini,n,%nick,Description)
/notice $nick *
/notice $nick * * * End of profile * * *
}
}