Jump to content

Recommended Posts

Posted

Well this code is so simple to understand... with this code you can use admin commands through e-mails.

You must choose a password that will be the subject of the email; without this password if someone knows the commands and the e-mail you use as "receptor", he won't be able to use it. You can also specify an e-mail sender that will be used to send you back a feedback email with the players on-line, but it's not necessary, you can use it from any e-mail.

 

This feature should be only used if the admin is being, for example, on holidays, so remember to "Enabled = False" if you are at home, to feel safer.

I don't really know if this needs more explanation, but here you have and old video.

 

P.S: I know some guys can think that it's not so safe to enable this, OK I know it, I don't need replies 'bout that, if you don't feel safe using it, just don't even look at the topic.

 

 

 

 

 

Credits: Mhoska & Wyatt

Index: dist/game/config/MailController.properties
===================================================================
--- dist/game/config/MailController.properties	(revision 0)
+++ dist/game/config/MailController.properties	(revision 0)
@@ -0,0 +1,43 @@
+# -----------------------------------------------------------------------------------------------------------
+# 	MailController
+# 	Developed by Mhoska & Wyatt
+# -----------------------------------------------------------------------------------------------------------
+# 	This tool it's used to land admin commands via e-mail
+# -----------------------------------------------------------------------------------------------------------
+# 	Available commands			Information										Target Status
+# -----------------------------------------------------------------------------------------------------------
+# 	Restart 120					Restart Time										-
+# 	Shutdown 120				Shutdown Time										-
+# 	Kick Wyatt					Kick PlayerName										-
+# 	Ban_Char Wyatt				Ban_Char PlayerName									Both
+# 	Ban_Acc L2jHidden			Ban_Acc PlayerName									Both
+# 	Unban_Char Wyatt			Unban_Char PlayerName								-
+# 	Unban_Acc L2jHidden			Unban_Acc PlayerName								-
+# 	Jail Wyatt	60				Jail PlayerName	Time								Both
+# 	UnJail Wyatt				UnJail PlayerName									Both
+# 	Announce blablabla			Announce Text Text...								-
+# 	Repair Wyatt				Repair PlayerName								Must be Offline
+# 	GiveItem Wyatt 57 10		GiveItem PlayerName ItemId ItemCount			Must be Online
+# 	GiveItemAll 57 10			GiveItemAll ItemId ItemCount					Must be Online
+#	GetOnlineCount				(Gives you a feedback of online players)			-
+# -----------------------------------------------------------------------------------------------------------
+# 	Configs
+# 	Note: Recommended to se a new e-mail that will only be used for this script.
+# -----------------------------------------------------------------------------------------------------------	
+# Enable/Disable the system.
+Enabled = True				
+
+# Here you must especify your GMAIL e-mail.
+Email = 123456@gmail.com
+
+# Here you must especify your GMAIL e-mail password.
+EmailPassword = 123456
+
+# IMPORTANT: Here you must especify your personal password that you'll have to put as Subject
+# in every e-mail that you send.
+SystemPassword = DumbHoe
+
+# Here you must especify your personal e-mail that will get a feedback after some commands use.
+# Just to get the feedback, you can use commands no matter which email you use.
+EmailSender = 654321@gmail.com
Index: java/com/l2jserver/gameserver/model/email/Logger.java
===================================================================
--- java/com/l2jserver/gameserver/model/email/Logger.java	(revision 0)
+++ java/com/l2jserver/gameserver/model/email/Logger.java	(revision 0)
@@ -0,0 +1,118 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.email;
+
+import java.io.*;
+import java.util.*;
+import javax.mail.*;
+import javax.mail.Flags.Flag;
+import javax.mail.search.AndTerm;
+import javax.mail.search.FlagTerm;
+import javax.mail.search.SearchTerm;
+import javax.mail.search.SubjectTerm;
+import com.sun.mail.imap.IMAPFolder;
+
+/**
+ * 
+ * @author Mhoska
+ * @rework Wyatt
+ * 
+ */
+
+public class Logger 
+{
+	public static String emailpass = "";
+	public static String email = "";
+	public static String pass = "";
+	public static String content = "";
+	public static String to = "";
+	public static boolean enabled = false;
+	
+    public static void main(String[] args) throws MessagingException, IOException 
+    {
+        IMAPFolder folder = null;
+        Store store = null;
+        @SuppressWarnings("unused")
+		String subject = null;
+        @SuppressWarnings("unused")
+		Flag flag = null;      
+        @SuppressWarnings("unused")
+		String nonsense = "restart";
+       
+        try 
+        {
+        	content = "";
+        	Properties props = System.getProperties();
+        	props.setProperty("mail.store.protocol", "imaps");
+        	Session session = Session.getDefaultInstance(props, null);
+        	store = session.getStore("imaps");
+          	store.connect("imap.googlemail.com", email, emailpass);
+          	folder = (IMAPFolder) store.getFolder("INBOX"); // This works for the whole inbox
+         
+          	if(!folder.isOpen())
+          	{
+          		folder.open(Folder.READ_WRITE);
+          	}
+          	Flags seen = new Flags(Flags.Flag.SEEN);
+          	FlagTerm unseenFlagTerm = new FlagTerm(seen, false);
+          	Flags recent = new Flags(Flags.Flag.RECENT);
+          	@SuppressWarnings("unused")
+          	FlagTerm recentFlagTerm = new FlagTerm(recent, true);       
+          	SearchTerm dumb = new SubjectTerm(pass); 
+          	SearchTerm searchTerm = new AndTerm(unseenFlagTerm, dumb);
+          	Message[] messages = folder.search(searchTerm);
+
+          	for (int i=0; i < messages.length;i++)   	  
+          	{
+        		 Message msg =  messages[i];
+        		 content = ""+msg.getContent();
+          	}
+        }
+        finally 
+        {
+        	if (folder != null && folder.isOpen()) 
+        	{
+        		folder.close(true); 
+        	}
+        	if (store != null) 
+        	{
+        		store.close(); 
+        	}
+        }
+        
+        if (!content.equals(""))
+        {
+        	Log.Load(content);
+        }
+    }
+    
+   public static void loadConfigs()
+	{
+		try
+		{
+			Properties prop = new Properties();
+			prop.load(new FileInputStream(new File("./config/MailController.properties")));
+			to = prop.getProperty("EmailSender", "123456@gmail.com");
+			emailpass = prop.getProperty("EmailPassword", "123456");
+			email = prop.getProperty("Email", "123456@gmail.com");
+			pass = prop.getProperty("SystemPassword", "DumbHoe");
+			enabled = Boolean.parseBoolean(prop.getProperty("Enabled", "True"));
+		}
+		catch(Exception e)
+		{
+			e.printStackTrace();
+		}
+	}	
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/GameServer.java
===================================================================
--- java/com/l2jserver/gameserver/GameServer.java	(revision 5822)
+++ java/com/l2jserver/gameserver/GameServer.java	(working copy)
@@ -117,8 +117,10 @@
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.PartyMatchRoomList;
import com.l2jserver.gameserver.model.PartyMatchWaitingList;
+import com.l2jserver.gameserver.model.email.Log;
import com.l2jserver.gameserver.model.entity.Hero;
import com.l2jserver.gameserver.model.entity.TvTManager;
@@ -306,11 +308,13 @@
		CursedWeaponsManager.getInstance();

		printSection("Scripts");
+		Log.getInstance();
		QuestManager.getInstance();
		TransformationManager.getInstance();
		BoatManager.getInstance();
Index: java/com/l2jserver/gameserver/model/email/Packet.java
===================================================================
--- java/com/l2jserver/gameserver/model/email/Packet.java	(revision 0)
+++ java/com/l2jserver/gameserver/model/email/Packet.java	(revision 0)
@@ -0,0 +1,69 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.email;
+
+import java.util.Properties;
+import javax.mail.Address;
+import javax.mail.Message;
+import javax.mail.Session;
+import javax.mail.Transport;
+import javax.mail.internet.InternetAddress;
+import javax.mail.internet.MimeMessage;
+import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * 
+ * @author Wyatt
+ * 
+ */
+
+public class Packet
+{
+	   
+	public static void send()
+	{  
+		try
+		{
+			Properties props = new Properties();
+			props.put("mail.smtps.host", "smtp.gmail.com");
+			props.put("mail.smtps.auth", "true");
+			props.put("mail.transport.protocol", "smtp");
+			props.put("mail.debug", "false");
+			Session mailSession = Session.getDefaultInstance(props);
+			Transport transport = mailSession.getTransport("smtps");
+			InternetAddress fromAddress = new InternetAddress(Logger.email);
+			InternetAddress toAddress = new InternetAddress(Logger.to);
+			Message simpleMessage = new MimeMessage(mailSession);
+			simpleMessage.setFrom(fromAddress);
+			simpleMessage.setRecipient(Message.RecipientType.TO, toAddress);
+			simpleMessage.setSubject("Feedback Player Online Count Report");
+			String text = "Players Online("+L2World.getInstance().getAllPlayersCount()+"):";
+			
+			for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayers().values(new L2PcInstance[0]))
+			{
+				text = text+" "+onlinePlayer.getName()+",";
+			}
+			simpleMessage.setText(text);
+			transport.connect("smtp.gmail.com", Logger.email, Logger.emailpass);
+			transport.sendMessage(simpleMessage, new Address[] { toAddress });
+			transport.close();
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+		}
+	}
+}
\ No newline at end of file
Index: java/com/l2jserver/gameserver/model/email/Log.java
===================================================================
--- java/com/l2jserver/gameserver/model/email/Log.java	(revision 0)
+++ java/com/l2jserver/gameserver/model/email/Log.java	(revision 0)
@@ -0,0 +1,483 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ * 
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ * 
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.email;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.StringTokenizer;
+import java.util.concurrent.ScheduledFuture;
+import javax.mail.MessagingException;
+import com.l2jserver.L2DatabaseFactory;
+import com.l2jserver.gameserver.Announcements;
+import com.l2jserver.gameserver.LoginServerThread;
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.communitybbs.Manager.RegionBBSManager;
+import com.l2jserver.gameserver.datatables.ItemTable;
+import com.l2jserver.gameserver.Shutdown;
+import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.items.L2Item;
+
+/**
+ * 
+ * @author Wyatt
+ * 
+ */
+
+public class Log 
+{
+	private static int time = 0;
+	private static String player = "";
+	private static String text = "";
+	private static L2PcInstance plyr = null;
+	private static L2PcInstance targetPlayer = null;
+	private static int itemid = 0;
+	private static int itemcount = 0;
+	private static ScheduledFuture<?> checkemail = null;
+	
+	public Log()
+	{
+		Logger.loadConfigs();
+		
+		if(Logger.enabled)
+		{
+			checkemail = ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new LogController(),/* 5 * 60000*/60000, /*5 * 60000*/60000);// Test 1 minute, live +-5 minutes
+		}	
+	}
+	
+	private static void cancelTask()
+	{
+		if(checkemail != null)
+		{
+			checkemail.cancel(false);
+			checkemail = null;
+		}
+	}
+	
+	private static void intialize()
+	{
+		time = 0;
+		player = "";
+		text = "";
+		plyr = null;
+		targetPlayer = null;
+		itemid = 0;
+		itemcount = 0;
+	}
+	
+	public static void Load(String command)
+	{
+		intialize();
+		
+		if(command.toLowerCase().startsWith("restart"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			
+			if (st.hasMoreTokens())
+			{
+				st.nextToken();
+				time = Integer.parseInt(st.nextToken());
+				
+				if (time <= 0)
+				{
+					return;
+				}
+			}
+			else
+			{
+				return;
+			}
+			cancelTask();	
+			Shutdown.getInstance().startShutdown(null, time, true);
+		}
+		else if(command.toLowerCase().startsWith("shutdown"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			
+			if (st.hasMoreTokens())
+			{
+				st.nextToken();
+				time = Integer.parseInt(st.nextToken());
+				
+				if (time <= 0)
+				{
+					return;
+				}
+			}
+			else
+			{
+				return;
+			}
+			cancelTask();	
+			Shutdown.getInstance().startShutdown(null, time, false);
+		}
+		else if (command.toLowerCase().startsWith("kick"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			
+			if (st.countTokens() > 1)
+			{
+				st.nextToken();
+				player = st.nextToken();
+				plyr = L2World.getInstance().getPlayer(player);
+				
+				if (plyr != null)
+				{
+					plyr.logout();
+				}
+			}
+		}
+		else if (command.toLowerCase().startsWith("ban_char"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				player = st.nextToken();
+				targetPlayer = L2World.getInstance().getPlayer(player);
+			}
+			changeCharAccessLevel(targetPlayer, player, -100);
+		}
+		else if (command.toLowerCase().startsWith("ban_acc"))
+		{	
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				player = st.nextToken();
+				targetPlayer = L2World.getInstance().getPlayer(player);
+			}
+			
+			if (targetPlayer != null)
+			{
+				targetPlayer.setPunishLevel(L2PcInstance.PunishLevel.ACC, 0);
+				targetPlayer.logout();
+			}
+			else
+			{
+				LoginServerThread.getInstance().sendAccessLevel(player, -100);
+			}
+		}
+		else if (command.toLowerCase().startsWith("unban_char"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				player = st.nextToken();
+				targetPlayer = L2World.getInstance().getPlayer(player);
+			}
+			
+			if (targetPlayer == null)
+			{
+				LoginServerThread.getInstance().sendAccessLevel(player, 0);
+				changeCharAccessLevel(null, player, 0);
+			}
+		}
+		else if (command.toLowerCase().startsWith("unban_acc"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				player = st.nextToken();
+				targetPlayer = L2World.getInstance().getPlayer(player);
+			}
+			
+			if (targetPlayer == null)
+			{
+				LoginServerThread.getInstance().sendAccessLevel(player, 0);
+			}
+		}
+		else if (command.toLowerCase().startsWith("jail"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				player = st.nextToken();
+				targetPlayer = L2World.getInstance().getPlayer(player);
+				
+				if (st.hasMoreTokens())
+				{
+					try
+					{
+						time = Integer.parseInt(st.nextToken());
+					}
+					catch (NumberFormatException nfe)
+					{
+						nfe.printStackTrace();
+					}
+				}
+			}
+			
+			if (targetPlayer != null)
+			{
+				if (targetPlayer.isFlyingMounted())
+				{
+					targetPlayer.untransform();
+				}
+				targetPlayer.setPunishLevel(L2PcInstance.PunishLevel.JAIL, time);
+			}
+			else
+			{
+				jailOfflinePlayer(player, time);
+			}
+		}
+		else if (command.toLowerCase().startsWith("getonlinecount"))
+		{
+			Packet.send();
+		}
+		else if (command.toLowerCase().startsWith("unjail"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				player = st.nextToken();
+				targetPlayer = L2World.getInstance().getPlayer(player);
+			}
+
+			if (targetPlayer != null)
+			{
+				targetPlayer.setPunishLevel(L2PcInstance.PunishLevel.NONE, 0);
+			}
+			else
+			{
+				unjailOfflinePlayer(player);
+			}
+		}
+		else if (command.toLowerCase().startsWith("announce"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			while (st.hasMoreTokens())
+			{
+				text = text+" "+st.nextToken();
+			}
+			Announcements.getInstance().announceToAll(text, false);	
+		}
+		else if (command.toLowerCase().startsWith("giveitemall"))
+		{	
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				itemid = Integer.parseInt(st.nextToken());
+				itemcount = Integer.parseInt(st.nextToken());	
+			}
+			L2Item template = ItemTable.getInstance().getTemplate(itemid);
+			
+			for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayers().values(new L2PcInstance[0]))
+			{
+					onlinePlayer.addItem("Admin Reward", itemid, itemcount, onlinePlayer, true);
+					
+					if (template != null)
+					{
+						onlinePlayer.sendMessage("Admin rewarded you with "+itemcount+" "+template.getName()+" in your inventory.");
+					}
+			}
+			Announcements.getInstance().announceToAll("Admin rewarded all online players, check your inventory.", false);	
+		}
+		else if (command.toLowerCase().startsWith("giveitem"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				player = st.nextToken();
+				targetPlayer = L2World.getInstance().getPlayer(player);
+			}
+			
+			if (targetPlayer != null)
+			{
+				itemid = Integer.parseInt(st.nextToken());
+				itemcount = Integer.parseInt(st.nextToken());
+				targetPlayer.addItem("Admin Reward", itemid, itemcount, targetPlayer, true);
+				targetPlayer.sendMessage("Admin rewarded you, check your inventory.");
+			}	
+		}	
+		else if (command.toLowerCase().startsWith("repair"))
+		{
+			StringTokenizer st = new StringTokenizer(command);
+			st.nextToken();
+			
+			if (st.hasMoreTokens())
+			{
+				handleRepair(st.nextToken());
+			}
+		}
+	}
+	
+	private static void changeCharAccessLevel(L2PcInstance targetPlayer, String player, int lvl)
+	{
+		if (targetPlayer != null)
+		{
+			targetPlayer.setAccessLevel(lvl);
+			targetPlayer.sendMessage("Your character has been banned. Goodbye.");
+			targetPlayer.logout();
+			RegionBBSManager.getInstance().changeCommunityBoard();
+		}
+		else
+		{
+			try
+			{
+				Connection con = L2DatabaseFactory.getInstance().getConnection();
+				PreparedStatement statement = con.prepareStatement("UPDATE characters SET accesslevel=? WHERE char_name=?");
+				statement.setInt(1, lvl);
+				statement.setString(2, player);
+				statement.execute();
+				statement.close();
+				con.close();
+			}
+			catch (SQLException se)
+			{
+				se.printStackTrace();
+			}
+		}
+		return;
+	}
+	
+	private static void jailOfflinePlayer(String name, int delay)
+	{
+		try
+		{
+			Connection con = L2DatabaseFactory.getInstance().getConnection();
+			PreparedStatement statement = con.prepareStatement("UPDATE characters SET x=?, y=?, z=?, punish_level=?, punish_timer=? WHERE char_name=?");
+			statement.setInt(1, -114356);
+			statement.setInt(2, -249645);
+			statement.setInt(3, -2984);
+			statement.setInt(4, L2PcInstance.PunishLevel.JAIL.value());
+			statement.setLong(5, (delay > 0 ? delay * 60000L : 0));
+			statement.setString(6, name);
+			statement.execute();
+			statement.close();
+			con.close();
+		}
+		catch (SQLException se)
+		{
+			se.printStackTrace();
+		}
+	}
+	
+	private static void unjailOfflinePlayer(String name)
+	{
+		try
+		{
+			Connection con = L2DatabaseFactory.getInstance().getConnection();
+			PreparedStatement statement = con.prepareStatement("UPDATE characters SET x=?, y=?, z=?, punish_level=?, punish_timer=? WHERE char_name=?");
+			statement.setInt(1, 17836);
+			statement.setInt(2, 170178);
+			statement.setInt(3, -3507);
+			statement.setInt(4, 0);
+			statement.setLong(5, 0);
+			statement.setString(6, name);
+			statement.execute();
+			statement.close();	
+			con.close();
+		}	
+		catch (SQLException se)
+		{
+			se.printStackTrace();
+		}
+	}
+	
+	private static void handleRepair(String charname)
+	{
+
+		String cmd = "UPDATE characters SET x=-84318, y=244579, z=-3730 WHERE char_name=?";
+		
+		try
+		{
+			Connection connection = L2DatabaseFactory.getInstance().getConnection();
+			PreparedStatement statement = connection.prepareStatement(cmd);
+			statement.setString(1, charname);
+			statement.execute();
+			statement.close();	
+			statement = connection.prepareStatement("SELECT charId FROM characters where char_name=?");
+			statement.setString(1, charname);
+			ResultSet rset = statement.executeQuery();
+			int objId = 0;
+			
+			if (rset.next())
+			{
+				objId = rset.getInt(1);
+			}	
+			rset.close();
+			statement.close();
+			
+			if (objId == 0)
+			{
+				connection.close();
+				return;
+			}
+			statement = connection.prepareStatement("DELETE FROM character_shortcuts WHERE charId=?");
+			statement.setInt(1, objId);
+			statement.execute();
+			statement.close();	
+			statement = connection.prepareStatement("UPDATE items SET loc=\"INVENTORY\" WHERE owner_id=?");
+			statement.setInt(1, objId);
+			statement.execute();
+			statement.close();
+			connection.close();
+		}
+		catch (Exception e)
+		{
+			e.printStackTrace();
+		}
+	}
+	
+	public class LogController implements Runnable
+	{ 
+		@Override
+		public void run()
+		{ 
+			try 
+			{
+				Logger.main(null);
+			} 
+			catch (MessagingException e) 
+			{	
+				e.printStackTrace();
+			} 
+			catch (IOException e)
+			{
+				e.printStackTrace();
+			}
+		}
+	 }
+	 
+	 public static Log getInstance()
+	 {
+		 return SingletonHolder._instance;
+	 }
+	 
+	 public static class SingletonHolder
+	 {
+		 protected static final Log _instance = new Log();
+	 }
+}
\ No newline at end of file

Posted

Rewarded, really made my day. Gj mate.

Ty dude.

 

Wyatt, you fill my eyes with tears.

I hope these tears are tears of happiness and not tears of sadness  :' (    : D

Posted

Nice one wyatt,keep up.

Damn man! this is hot! Thanks dude

Awesome share Wyatt :) Thank you :)

Thx, thx :D

 

Now i can control my server from holydays.

//ban_acc wyatt xD

Ban your account -.-

 

If someone wants to use it and has any idea/problem feel free to tell me.

  • 1 month later...
Posted (edited)

seen *

I don't think that you're in a position to correct other members when it comes to english as you have errors aswell. 

 

Ontopic: Good job, keep sharing.

Edited by MikeJ
Posted

I don't think that you're in a position to correct other members when it comes to english as you have errors aswell. 

 

Ontopic: Good job, keep sharing.

 

I make typos cause I type fast, but when it comes to such english my eyes get cancer.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Wooowww!! Thank you so much bruv!! Really useful!! Thank you for smart solution, work and sharing!!
    • Generate your own. There are tools. 
    • Server Athena x45 C4 is running online since 11 January 2026 without wipe.
    • L2SPIRIT OF LORENA x3 INTERLUDE Discord: Discord SPIRIT OF LORENA < WEBSITE: L2 Spirit of Lorena x3 Interlude WEBSITE: L2-LORENA Network x30 x1200 x5000 PvP GRAND OPENING – 12 JUNE 2026 19:00 UTC+2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ LONG TERM PROJECT NO WIPE CLASSIC INTERLUDE OLD SCHOOL COMMUNITY REAL PROGRESSION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ WHY L2SPIRIT OF LORENA? Are you tired of servers that die after a few weeks? L2Spirit of LORENA was created for players who miss the true Interlude feeling: Clan Wars Castle Sieges Epic Bosses Party Farming Real Economy Long Term Progression No shortcuts. No instant endgame. No seasonal wipes. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SERVER INFORMATION 🛡 Chronicle: Interlude Type: Classic Low Rate Server: Long Term International Community ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RATES EXP/SP x3 Adena x3 Drop x3 Spoil x3 Raid Boss x3 Seal Stones x3 Quest x3 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DYNAMIC EXP SYSTEM 1-20 = x3.0 20-40 = x2.7 40-52 = x2.4 52-61 = x2.1 61-70 = x1.8 70-76 = x1.5 76-77 = x1.2 77-78 = x1.1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FEATURES Auto Learn Skills Auto Farm Available 2 Windows Maximum Retail Olympiad Epic Bosses Daily Events Stable Dedicated Server Active Administration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ WHAT MAKES US DIFFERENT? No Wipe Policy Stable Economy Competitive Olympiad Clan Focused Gameplay Retail Feeling Friendly Community ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ THE JOURNEY MATTERS Every level. Every raid. Every item. Every victory. This is the Interlude experience you remember. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SERVER STATUS TOP L2JBRASIL:Top L2JBrasil de Servidores de Lineage2 - ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ OPENING DAY 12 June 2026 19:00 UTC+2 Prepare your clan. Prepare for war. The adventure begins. SEE YOU IN SPIRIT OF LORENA!
    • PlayerPort: The Ultimate In-Game Web Engine for Lineage 2 Hello. For those who don't know me, I specialize in Lineage 2 interface and client/server development. PlayerPort is my ongoing project - an attempt to build a truly universal, modular, multi-server in-game web engine. The goal is to stop "pushing" players out of the game to forums, websites, or external messengers. Instead, I want to keep them engaged by providing a seamless, high-quality experience directly within the game client. What is PlayerPort? It is a client-side module that acts as a hybrid UI. It integrates a lightweight web engine directly into the Lineage 2 client, bridging the gap between the native engine (UnrealScript/XML) and a modern web layer (HTML/JS/CSS). The Architecture: JS (Layer 0): Handles structural skeletons, widgets, and basic styling. Flash (Layer 1): Manages graphical wrappers, physics/animations, and transitions. PortNatives (C++ API): A low-level engine for math, logging, Windows interaction, WebSockets, and heavy lifting. This "sandwich" architecture allows for smooth, interactive, and high-performance UI components that don't suffer from the limitations of the legacy webkit. Key Features & Modules PortUI Framework: My own lightweight UI framework based on standard Lineage 2 methodology. No heavy external libraries - just vanilla JS with GPU-accelerated rendering. It allows for complex transitions, particles, parallax, and procedural animations without bloating the system. Advanced Report System: Fully integrated ticket management. Players can submit reports directly from the game, including attachments. It supports simple copy-paste or screenshot capture. PortNatives optimizes images (even 4K/8K) in milliseconds, reducing file size by up to 50x without losing quality, ensuring near-instant loading. Radio Module: A streamlined radio service with a vast selection of stations. Features include a mini-player (PIP), high-quality streams with jitter-fix, and a smart system that pre-checks connection status to avoid timeouts. PortStream (Streaming): Full integration for streaming platforms. You can display custom streamer lists or popular feeds directly in-game. Features include status monitoring, live preview tiles, PiP (Picture-in-Picture) playback, and native volume control (up to 200%). Communication Hub: Inter-server forums and messaging that allow collaborating projects to share news, welcome messages, and support systems without leaving the game. Admin & Analytics: Real-time dashboards tracking server population, player behavior, trade analysis, and anti-RMT/botting tools. The system builds connection chains between characters to assist administrators. Why does this matter? The current ecosystem is fragmented. By centralizing everything - support tickets, social interaction, radio, and streaming - within the client, we improve the "Quality of Life" for players and reduce administrative overhead. Performance: All network activity is handled by an external process, isolating it from the l2.exe core. We utilize "lazy" updates (periodic POSTs) and "active" subscriptions, ensuring minimal impact on game performance. Compatibility: Works on everything from ancient clients (like Grand Crusade p110) to the latest Essence/Live versions. Availability: I am looking for enthusiasts and server projects interested in adopting this. Integrating the system is fast and simple. The core service is free. Future Outlook I am currently focusing on PortCanvas, a proxy layer that will allow developers to replace native UI windows with custom web-based components. This will effectively turn Lineage 2 into a shell for fully custom web applications, accessible to anyone with basic web development skills - no complex compilers or proprietary editors required. If you are interested in implementing this on your project, or if you have questions, feel free to reach out.     Gallery https://imgur.com/a/Dqrl4L9         Contact: https://t.me/TELEGABOY See you in the next update. 🐀
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..