$encode is NOT meant to hide passwords. So no, there is no way to make it more secure. What I would suggest you do is something like this:
set %password $md5(the_password_the_user_set)
Then when someone enters the password, like /msg nick login mypass
You do if (%password == $md5(what_the_user_just_entered)) {
; the correct password was entered
}
MD5 is a one-way-hash meaning if you have the output of $md5, there is virtually NO way to get the original password.