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

    • Lineage2Dex x25 is opening on October 9! We are excited to announce the launch of our new Interlude x25 server, designed for players who want a balanced, competitive, and long-term Lineage 2 experience. If you are looking for a server with an active community, stable environment, and a serious project behind it, this is the perfect time to join us. Server Information Project: Lineage2Dex Chronicle: Interlude Rates: x25 Opening Date: October 9 Type: Mid Rate Platform: Stable and optimized gameplay Focus: PvP, progression, competitive environment, long-term gameplay Why join Lineage2Dex x25? Well-known and trusted project Smooth and optimized gameplay Balanced progression Competitive PvP environment Active community Serious administration and continuous support Important Dates PTS Available: Until October 5 Beta Starts: October 6 Official Launch: October 9 This is your chance to prepare early, test the server, and be ready for launch day. Join Us Website: https://lineage2dex.com⁠
    • Today I would like to introduce a new set of tools developed entirely from scratch in Java, designed to simplify and modernize one of the most important tasks for any online server: distributing, updating, and maintaining the game client quickly, securely, and efficiently. The system has been designed to work with Lineage II, Aion, World of Warcraft, or any other project that requires a file distribution and update system, providing a simple solution for both players and administrators.   The entire project features a modern dark-mode interface, is completely separated into individual tools, and is distributed as standalone Windows executables (.exe) using Launch4j.   1. GameLauncher: The Player Client     GameLauncher is the launcher used by players on their computers. Its goal is to make keeping the game client up to date a completely automatic and transparent process.   Smart Updates: Automatically compares local files with the remote server using a manifest file (manifest.json) Hash-Based Integrity: Calculates file hashes to download only new or modified files, saving time and bandwidth. Real-Time Downloads: Detailed progress bar with transfer speed and automatic ZIP package extraction. Standalone: Packaged into a single .exe with Java 17 requirement validation and automatic redirection if the required environment is not installed.   Source code: https://gitlab.com/u3games/GameLauncher   2. L2Compiler: The Administrator Tool     L2Compiler is the tool designed for server administrators and developers. It allows updates to be prepared and published quickly, automating much of the process that would otherwise have to be performed manually.   Mass Packaging: Select the root folder of your development client and automatically generate optimized compressed packages ready for distribution. Automatic Manifest Generation: Instantly generates the manifest.json file with all the required metadata, including file sizes, paths, and hashes, using Gson. Preference Management: Automatically saves the last used paths through java.util.prefs to speed up everyday development tasks. Asynchronous Interface: Background processing through SwingWorker to prevent the interface from freezing during heavy operations.   Source code: https://gitlab.com/u3games/GameCompiler   A System Designed for Online Servers   The idea behind this project is simple: the administrator prepares an update using L2Compiler, and the player receives it automatically through GameLauncher. This allows both tools to work together and provide a simple update workflow:   Development Client → L2Compiler → Server → GameLauncher → Updated Client   There is no need for players to manually search for files, download patches one by one, or go through complicated installation processes. Although the system was initially designed with projects such as Lineage II, Aion, and World of Warcraft in mind, it is not tied to any specific game. If your project needs to distribute files and keep its clients up to date, it can be easily adapted to fit your needs.   Open Source for the Community   This project was created by me for the U3Games community, with the goal of providing a modern, simple, and reusable alternative for managing updates across our servers. The source code is publicly available so that other developers can study it, adapt it, improve it, and contribute to the project.     Have a Suggestion, Found a Bug, or Want to Contribute?   Any suggestions, bug reports, improvements, or contributions are more than welcome. The goal is to continue evolving the project together with the community and turn it into an increasingly complete tool for all kinds of online servers and projects.
    • Let's do 1 for share for people? Which one? 
    • A 100-YEAR-OLD ORDERED A FLAGSHIP AND PASSED THE VIDEO CALL 🚓 Spanish police took down a gang that found a hole in a major telecom operator's online store. A script told the warehouse to ship before payment went through. The haul: over 150 smartphones worth more than €50,000. The cover was a farm of borrowed identities: documents of around fifty people, including 100-year-old pensioners. They used them to open bank accounts, register phone numbers and send parcels across the country. The cherry on top: gang members passed video KYC themselves, posing as the elderly document holders. The "customer's" age didn't bother the antifraud. Operation Sakosita: seven arrested in Madrid, the alleged ringleader caught in Italy on a European arrest warrant. Meanwhile, the frozen accounts and someone else's debts land on the people whose names were used. 🔒 Account locked because someone opened something in your name? Message us – we'll gather the evidence and see the unlock through. › TG: @mustang_service_ms ( https:// t.me/ mustang_service_ms ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #drawing #kyc #photoshop #unban #news
    • he did it for me    thanks you 😄  some of that bones is broken is some pets or is not exist so is better to buy some from the clientDev: @NevesOma
  • 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..