示例#1
0
文件: GMModiator.cs 项目: abel/sinan
 private static void StartGM()
 {
     if (server != null)
     {
         server.Stop();
         server = null;
     }
     server = new GMServer("/gm", false);
     server.Init();
     server.Start(ConfigLoader.Config.EpGMM);
 }
示例#2
0
文件: GMModiator.cs 项目: abel/sinan
 public override void Execute(INotification notification)
 {
     GMNote note = notification as GMNote;
     if (note == null)
     {
         if (notification.Name == GMCommand.GMStart)
         {
             StartGM();
         }
         else if (notification.Name == Application.APPSTOP)
         {
             if (server != null)
             {
                 server.Stop();
                 server = null;
             }
         }
         return;
     }
 }