Beispiel #1
0
 public string active(string rnick, string rmsg)
 {
     try
     {
         System.IO.StreamReader sr2 = new System.IO.StreamReader(".activeusers");
         string old = sr2.ReadToEnd();
         sr2.Close();
         System.IO.StreamReader sr = new System.IO.StreamReader("users.bin");
         string[] registeredusers = sr.ReadToEnd().Split(':');
         sr.Close();
         string returnvalue = "Log in failed!";
         foreach (string x in registeredusers)
         {
             if (x == rnick)
             {
                 string query = rmsg.Remove(0, 8);
                 int indexuser = Array.IndexOf(registeredusers, rnick);
                 ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions();
                 bool passcorrect = ObsidFunc.isVerified(indexuser, query);
                 System.IO.StreamWriter sw = new System.IO.StreamWriter(".activeusers");
                 if (passcorrect == true)
                 {
                     sw.Write(old + rnick + ":");
                     returnvalue = "Success! You are logged in!";
                 }
                 sw.Close();
             }
         }
         return returnvalue;
     }
     catch (Exception ex)
     {
         return ex.ToString();
     }
 }
Beispiel #2
0
 static void Main(string[] args)
 {
     System.Console.WriteLine(args.Length);
     System.Console.WriteLine("CodeDOM test");
     System.Console.WriteLine("Line 2");
     ObsidianFunctions.Functions ObsidFunc = new ObsidianFunctions.Functions();
     System.Console.WriteLine(ObsidFunc.md5calc("test"));
     //System.Console.WriteLine(args[0]);
     FervorLibrary.Library FervLib = new FervorLibrary.Library();
     System.Console.WriteLine(FervLib.greet(0));
 }