if [ ! -f /etc/ircd.conf ] ; then
  message "Configuring for a simple public standalone irc daemon"
  HOSTNAME=`/bin/hostname`
  message "Please type the location of this server : (Lunar Inc., Istanbul Turkey)"
  read LOCATION
  message "admin's email:"
  read EMAIL
  if module_installed perl ; then
    message "Please type in password for operator 'admin':"
    read -s PLAIN
    PASSWORD=`perl -e 'print crypt($PLAIN,$PLAIN)'`
    unset PLAIN
  else
    message "you do not have perl installed, the default password for operator 'admin'"
    message "set to 'IRCmaster'. please change this as soon as possible"
    PASSWORD="IRm1oxNwgmfwQ"
  fi

  echo "M:$HOSTNAME::$LOCATION:6667" > /etc/ircd.conf
  echo "A:$LOCATION:$NAME <$EMAIL>:Client Server::" >> /etc/ircd.conf
  echo "P::::6667:" >> /etc/ircd.conf
  echo "Y:2:90:300:1:4000000" >> /etc/ircd.conf
  echo "Y:10:90::100:512000:10:32" >> /etc/ircd.conf
  echo "Y:11:90::100:512000:0.1:0.2" >> /etc/ircd.conf
  echo "Y:12:90::100:512000:1:3" >> /etc/ircd.conf
  echo "Y:13:90::100:512000:1:1" >> /etc/ircd.conf
  echo "i:*@*::::13" >> /etc/ircd.conf
  echo "I:*@192.168.*::::12" >> /etc/ircd.conf
  echo "I:*@10.*::::12" >> /etc/ircd.conf
  echo "I:*@127.0.0.1::::12" >> /etc/ircd.conf
  echo "O:127.0.0.1:$PASSWORD:admin::10" >> /etc/ircd.conf
  echo "k:=*:identd (rfc1413) required:unknown::" >> /etc/ircd.conf

fi

true
