Esempio n. 1
0
        public void Save(string file)
        {
            this.file = file;
            string outfile = "";

            if (Nick != null)
            {
                outfile += "Nick " + Nick + "\n";
            }
            if (otherNick != null)
            {
                outfile += "otherNick " + otherNick + "\n";
            }
            if (User != null)
            {
                outfile += "User " + User + "\n";
            }
            if (Real != null)
            {
                outfile += "Real " + Real + "\n";
            }
            if (Host != null)
            {
                outfile += "Host " + Host + "\n";
            }
            if (domain != null)
            {
                outfile += "Domain " + domain + "\n";
            }
            if (port != -1)
            {
                outfile += "Port " + port.ToString() + "\n";
            }
            outfile += "useSSL " + useSSL.ToString() + "\n";
            if (name != null)
            {
                outfile += "Name " + name + "\n";
            }
            if (wwwFolder != null)
            {
                outfile += "WWWFolder " + wwwFolder + "\n";
            }
            if (dataFolder != null)
            {
                outfile += "DataFolder " + dataFolder + "\n";
            }
            if (version != null)
            {
                outfile += "Version " + version + "\n";
            }
            foreach (string chan in channels)
            {
                outfile += "Channel " + chan + "\n";
            }
            EncFile.WriteAllText(file, outfile);
        }
 public void Save()
 {
     try
     {
         string output = "";
         foreach (KeyValuePair <string, byte[]> login in Logins)
         {
             output += OperatorLevels[login.Key] + " " + login.Key + " " + ByteArrayToString(login.Value);
         }
         Directory.CreateDirectory(server.Data);
         EncFile.WriteAllText(server.Data + Path.DirectorySeparatorChar + "operatorList.db", output);
     }
     catch { }
 }