Esempio n. 1
0
 void LoginTimerElapsed(object sender, ElapsedEventArgs e)
 {
     if (!Loading)
     {
         loginTimer.Stop();
         if (File.Exists("text/welcome.txt"))
         {
             try {
                 List <string> welcome = CP437Reader.ReadAllLines("text/welcome.txt");
                 foreach (string w in welcome)
                 {
                     SendMessage(w);
                 }
             } catch {
             }
         }
         else
         {
             Server.s.Log("Could not find Welcome.txt. Using default.");
             CP437Writer.WriteAllText("text/welcome.txt", "Welcome to my server!");
             SendMessage("Welcome to my server!");
         }
         loginTimer.Dispose();
         extraTimer.Start();
     }
 }
Esempio n. 2
0
 public static void SetLoginMessage(string name, string value)
 {
     CP437Writer.WriteAllText(LoginPath(name), value);
 }
Esempio n. 3
0
 public static void SetLogoutMessage(string name, string value)
 {
     CP437Writer.WriteAllText("text/logout/" + name.ToLower() + ".txt", value);
 }