I just wrote this code, trying to cover up all idea in this thread as much as i can do, but i didnt test it. Hope it works.

!welcome - shows welcome status is on/off
!welcome <on/off> - enables/disables auto welcome.
!welcome reset - removes all unknown users in file, so bot will welcome them again.
!welcome <user> (without msg) - removes custom msg for <user>
!welcome <user> <msg> - adds custom msg for <user>

Note: Only mods can use command.

flood handling: welcomes all unknown users at once if bot got flooded

Code:
on *:TEXT:!welcome *:#:{
  var %file welcome.ini
  if $nick isop # {
    if !$2 { msg # !welcome is $iif($readini(%file,$+(stat.,#),welcome),$v1,on) }
    elseif $2 == on || $2 == off { 
      writeini %file $+(stat.,#) welcome $lower($2) 
      msg # !welcome turned $lower($2)
    }
    elseif $2 == reset {
      remini %file $+(unknown.,#)
      msg # !welcome has been reset.
    }
    elseif !$3 { 
      remini %file $+(vip.,#) $2 
      msg # $2 $+ 's custom message removed.
    }
    else { 
      writeini %file $+(vip.,#) $2 $3- 
      msg # $2 $+ 's custom message added ( $3- )
    }
  }
}

on @!*:JOIN:#:{
  var %file welcome.ini, %stat $iif($readini(%file,$+(stat.,#),welcome),$v1,on)
  if %stat == off { return }
  if $readini(%file,$+(vip.,#),$nick) { msg # $v1 }
  elseif !$readini(%file,$+(unknown.,#),$nick) {
    writeini %file $+(unknown.,#) $nick $ctime
    var %nicks $readini(%file,$+(stat.,#),delay) $nick
    if !%flood.welcome. [ $+ [ # ] ] { 
      msg # Welcome to the stream $replace(%nicks,$chr(32),$+($chr(44),$chr(32))) $+ .
      remini %file $+(stat.,#) delay
      set -u10 %flood.welcome. [ $+ [ # ] ] on
    }
    else { 
      writeini %file $+(stat.,#) delay %nicks 
      $+(.timerwelcome.,#) 1 5 welcome %file # 
    }
  } 
}

alias -l welcome {
  var %nicks $replace($readini($1,$+(stat.,$2),delay),$chr(32),$+($chr(44),$chr(32)))
  if %nicks {
    if $me ison $2 { msg $2 Welcome to the stream %nicks $+ . }
    remini $1 $+(stat.,$2) delay
  }
}