There's no need for any storage for what you've described.

Code:
on *:text:!join:#nillens: {
  if (# [ $+ [ $nick ] ] !ischan) join $v1
  else msg # I am already in your channel, $nick $+ .
}

on *:text:!leave:#: {
  if (# == # [ $+ [ $nick ] ]) {
    msg # Sayounara! 
    part #
  }
  else msg # You do not have the required authorization to do this, $nick $+ .
}