All pastes #54043 Raw Edit

Someone

public text v1 · immutable
#54043 ·published 2006-05-07 17:08 UTC
rendered paste body
Index: /home/jru199/trunk/L2_GameServer_c4/java/net/sf/l2j/Config.java
===================================================================
--- /home/jru199/trunk/L2_GameServer_c4/java/net/sf/l2j/Config.java	(revision 1898)
+++ /home/jru199/trunk/L2_GameServer_c4/java/net/sf/l2j/Config.java	(working copy)
@@ -157,6 +157,7 @@
     public static boolean ALT_PRIVILEGES_ADMIN; 
     public static boolean ALT_PRIVILEGES_SECURE_CHECK; 
     public static int ALT_PRIVILEGES_DEFAULT_LEVEL; 
+    public static String EXTENSION_CLASS; 
      
     /*************************************************************************** 
      * GM CONFIG General GM AccessLevel * 
@@ -950,6 +951,7 @@
                 ALT_GAME_FREE_TELEPORT                              = Boolean.parseBoolean(altSettings.getProperty("AltFreeTeleporting", "False")); 
                 ALT_GAME_SUBCLASS_WITHOUT_QUESTS                    = Boolean.parseBoolean(altSettings.getProperty("AltSubClassWithoutQuests", "False")); 
                 ALT_GAME_VIEWNPC                    				= Boolean.parseBoolean(altSettings.getProperty("AltGameViewNpc", "False")); 
+                EXTENSION_CLASS         = altSettings.getProperty("ExtensionClass"); 
 	        } 
 	        catch (Exception e) 
 	        { 
Index: /home/jru199/trunk/L2_GameServer_c4/java/net/sf/l2j/gameserver/GameServer.java
===================================================================
--- /home/jru199/trunk/L2_GameServer_c4/java/net/sf/l2j/gameserver/GameServer.java	(revision 1898)
+++ /home/jru199/trunk/L2_GameServer_c4/java/net/sf/l2j/gameserver/GameServer.java	(working copy)
@@ -22,6 +22,7 @@
 import java.io.FileInputStream; 
 import java.io.InputStream; 
 import java.util.Calendar; 
+import java.util.logging.Level; 
 import java.util.logging.LogManager; 
 import java.util.logging.Logger; 
  
@@ -49,6 +50,7 @@
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEditChar; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEditNpc; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEffects; 
+import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEventEngine; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminExpSp; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminFightCalculator; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminGm; 
@@ -57,7 +59,6 @@
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminHelpPage; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminInvul; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminKick; 
-import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEventEngine; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminKill; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminLevel; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminLogin; 
@@ -65,8 +66,8 @@
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminMenu; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminMobGroup; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminMonsterRace; 
+import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminPForge; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminPathNode; 
-import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminPForge; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminPetition; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminPledge; 
 import net.sf.l2j.gameserver.handler.admincommandhandlers.AdminPolymorph; 
@@ -142,8 +143,8 @@
 import net.sf.l2j.gameserver.instancemanager.Manager; 
 import net.sf.l2j.gameserver.model.AutoChatHandler; 
 import net.sf.l2j.gameserver.model.AutoSpawnHandler; 
+import net.sf.l2j.gameserver.model.L2PetDataTable; 
 import net.sf.l2j.gameserver.model.L2World; 
-import net.sf.l2j.gameserver.model.L2PetDataTable; 
 import net.sf.l2j.gameserver.taskmanager.TaskManager; 
 import net.sf.l2j.status.Status; 
  
@@ -447,6 +448,15 @@
         ForumsBBSManager.getInstance(); 
         _log.config("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size()); 
  
+        if (Config.EXTENSION_CLASS != null) 
+            try { 
+                Class extension = Class.forName(Config.EXTENSION_CLASS); 
+                Object extensionObject = extension.newInstance(); 
+                extension.getMethod("init", new Class[0]).invoke(extensionObject, new Object[0]); 
+            } catch (Exception ex) { 
+                _log.log(Level.WARNING, "extension could not be loaded and initialized", ex); 
+            } 
+ 
 		System.gc(); 
 		// maxMemory is the upper limit the jvm can use, totalMemory the size of the current allocation pool, freeMemory the unused memory in the allocation pool 
 		long freeMem = (Runtime.getRuntime().maxMemory()-Runtime.getRuntime().totalMemory()+Runtime.getRuntime().freeMemory()) / 1024 / 1024;