mirror of
				https://bitbucket.org/Ioncannon/project-meteor-server.git
				synced 2025-05-20 08:26:59 -04:00 
			
		
		
		
	Removed duplicate CommandProcessor. It is held by the Server object now. GetSession by name now ignores case.
This commit is contained in:
		| @@ -24,12 +24,10 @@ namespace FFXIVClassic_Map_Server | |||||||
|     class PacketProcessor |     class PacketProcessor | ||||||
|     { |     { | ||||||
|         Server mServer; |         Server mServer; | ||||||
|         CommandProcessor cp; |  | ||||||
|  |  | ||||||
|         public PacketProcessor(Server server) |         public PacketProcessor(Server server) | ||||||
|         { |         { | ||||||
|             mServer = server; |             mServer = server; | ||||||
|             cp = new CommandProcessor(); |  | ||||||
|         }      |         }      | ||||||
|  |  | ||||||
|         public void ProcessPacket(ZoneConnection client, SubPacket subpacket) |         public void ProcessPacket(ZoneConnection client, SubPacket subpacket) | ||||||
| @@ -69,7 +67,7 @@ namespace FFXIVClassic_Map_Server | |||||||
|  |  | ||||||
|                         if (chatMessage.message.StartsWith("!")) |                         if (chatMessage.message.StartsWith("!")) | ||||||
|                         { |                         { | ||||||
|                             if (cp.DoCommand(chatMessage.message, session)) |                             if (Server.GetCommandProcessor().DoCommand(chatMessage.message, session)) | ||||||
|                                 return; ; |                                 return; ; | ||||||
|                         } |                         } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -63,14 +63,14 @@ namespace FFXIVClassic_Map_Server | |||||||
|             if (startServer) |             if (startServer) | ||||||
|             { |             { | ||||||
|                 Server server = new Server(); |                 Server server = new Server(); | ||||||
|                 CommandProcessor cp = new CommandProcessor(); |                  | ||||||
|                 server.StartServer(); |                 server.StartServer(); | ||||||
|  |  | ||||||
|                 while (startServer) |                 while (startServer) | ||||||
|                 { |                 { | ||||||
|                     String input = Console.ReadLine(); |                     String input = Console.ReadLine(); | ||||||
|                     Log.Info("[Console Input] " + input); |                     Log.Info("[Console Input] " + input); | ||||||
|                     cp.DoCommand(input, null); |                     Server.GetCommandProcessor().DoCommand(input, null); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -25,6 +25,7 @@ namespace FFXIVClassic_Map_Server | |||||||
|         private Dictionary<uint, Session> mSessionList = new Dictionary<uint, Session>();         |         private Dictionary<uint, Session> mSessionList = new Dictionary<uint, Session>();         | ||||||
|         private LuaEngine mLuaEngine = new LuaEngine(); |         private LuaEngine mLuaEngine = new LuaEngine(); | ||||||
|  |  | ||||||
|  |         private static CommandProcessor mCommandProcessor = new CommandProcessor(); | ||||||
|         private static ZoneConnection mWorldConnection = new ZoneConnection(); |         private static ZoneConnection mWorldConnection = new ZoneConnection(); | ||||||
|         private static WorldManager mWorldManager; |         private static WorldManager mWorldManager; | ||||||
|         private static Dictionary<uint, Item> mGamedataItems; |         private static Dictionary<uint, Item> mGamedataItems; | ||||||
| @@ -120,7 +121,7 @@ namespace FFXIVClassic_Map_Server | |||||||
|         { |         { | ||||||
|             foreach (Session s in mSessionList.Values) |             foreach (Session s in mSessionList.Values) | ||||||
|             { |             { | ||||||
|                 if (s.GetActor().customDisplayName.Equals(name)) |                 if (s.GetActor().customDisplayName.ToLower().Equals(name.ToLower())) | ||||||
|                     return s; |                     return s; | ||||||
|             } |             } | ||||||
|             return null; |             return null; | ||||||
| @@ -248,6 +249,11 @@ namespace FFXIVClassic_Map_Server | |||||||
|             return mSelf; |             return mSelf; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         public static CommandProcessor GetCommandProcessor() | ||||||
|  |         { | ||||||
|  |             return mCommandProcessor; | ||||||
|  |         } | ||||||
|  |  | ||||||
|         public static ZoneConnection GetWorldConnection() |         public static ZoneConnection GetWorldConnection() | ||||||
|         { |         { | ||||||
|             return mWorldConnection; |             return mWorldConnection; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user