From 7af4aa035d1937787f64ed8b995ed623ab0538b8 Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sat, 5 Nov 2022 23:24:59 +0000 Subject: [PATCH] New networking. --- L2J_Mobius_CT_2.6_HighFive/.classpath | 5 - .../dist/game/config/Server.ini | 50 ++- .../dist/game/config/Telnet.ini | 31 -- .../HallOfErosionAttack.java | 4 +- .../HallOfErosionDefence.java | 4 +- .../HeartInfinityAttack.java | 4 +- .../HeartInfinityDefence.java | 4 +- .../data/scripts/handlers/MasterHandler.java | 54 --- .../admincommandhandlers/AdminEditChar.java | 8 +- .../admincommandhandlers/AdminEffects.java | 4 +- .../telnethandlers/chat/Announce.java | 56 --- .../handlers/telnethandlers/chat/GMChat.java | 58 --- .../handlers/telnethandlers/chat/Msg.java | 64 --- .../telnethandlers/player/AccessLevel.java | 59 --- .../handlers/telnethandlers/player/Ban.java | 84 ---- .../telnethandlers/player/BanChat.java | 84 ---- .../telnethandlers/player/Enchant.java | 198 --------- .../telnethandlers/player/GMList.java | 58 --- .../handlers/telnethandlers/player/Give.java | 85 ---- .../handlers/telnethandlers/player/Jail.java | 84 ---- .../handlers/telnethandlers/player/Kick.java | 59 --- .../telnethandlers/player/SendMail.java | 97 ---- .../handlers/telnethandlers/player/Unban.java | 63 --- .../telnethandlers/player/UnbanChat.java | 63 --- .../telnethandlers/player/Unjail.java | 63 --- .../handlers/telnethandlers/server/Debug.java | 366 --------------- .../telnethandlers/server/ForceGC.java | 46 -- .../telnethandlers/server/Memusage.java | 69 --- .../telnethandlers/server/Performance.java | 53 --- .../handlers/telnethandlers/server/Purge.java | 53 --- .../telnethandlers/server/Reload.java | 226 ---------- .../telnethandlers/server/ServerAbort.java | 47 -- .../telnethandlers/server/ServerRestart.java | 53 --- .../telnethandlers/server/ServerShutdown.java | 53 --- .../telnethandlers/server/Status.java | 45 -- .../FinalEmperialTomb/FinalEmperialTomb.java | 6 +- .../Q00726_LightWithinTheDarkness.java | 4 +- L2J_Mobius_CT_2.6_HighFive/dist/game/java.cfg | 2 +- .../dist/game/log/accounting0.log | 2 + .../dist/game/log/java0.log | 259 +++++++++++ .../dist/login/java.cfg | 2 +- .../dist/login/log/java0.log | 15 + .../java/org/l2jmobius/Config.java | 42 +- .../{util => }/crypt/BlowfishEngine.java | 2 +- .../commons/{util => }/crypt/NewCrypt.java | 4 +- .../commons/network/BaseRecievePacket.java | 106 ----- .../commons/network/BaseSendablePacket.java | 137 ------ .../network/ChannelInboundHandler.java | 46 -- .../commons/network/EncryptionInterface.java | 16 + .../commons/network/ExecuteThread.java | 85 ++++ .../commons/network/IConnectionState.java | 27 -- .../org/l2jmobius/commons/network/ICrypt.java | 29 -- .../commons/network/IIncomingPacket.java | 34 -- .../commons/network/IIncomingPackets.java | 32 -- .../commons/network/IOutgoingPacket.java | 29 -- .../l2jmobius/commons/network/NetClient.java | 157 +++++++ .../l2jmobius/commons/network/NetConfig.java | 153 +++++++ .../l2jmobius/commons/network/NetServer.java | 206 +++++++++ .../commons/network/NetworkManager.java | 76 ---- .../network/PacketHandlerInterface.java | 13 + .../commons/network/PacketReader.java | 163 ------- .../commons/network/PacketWriter.java | 141 ------ .../l2jmobius/commons/network/ReadThread.java | 127 ++++++ .../commons/network/ReadablePacket.java | 165 +++++++ .../commons/network/WritablePacket.java | 300 +++++++++++++ .../commons/network/codecs/CryptCodec.java | 71 --- .../codecs/LengthFieldBasedFrameEncoder.java | 41 -- .../commons/network/codecs/PacketDecoder.java | 91 ---- .../commons/network/codecs/PacketEncoder.java | 71 --- .../commons/util/crypt/LoginCrypt.java | 148 ------- .../org/l2jmobius/gameserver/GameServer.java | 20 +- .../gameserver/LoginServerThread.java | 72 +-- .../org/l2jmobius/gameserver/Shutdown.java | 27 +- .../gameserver/data/BotReportTable.java | 2 +- .../gameserver/data/xml/AdminData.java | 4 +- .../instancemanager/AntiFeedManager.java | 10 +- .../instancemanager/BoatManager.java | 20 +- .../instancemanager/DuelManager.java | 4 +- .../instancemanager/TerritoryWarManager.java | 4 +- .../gameserver/model/AbstractPlayerGroup.java | 4 +- .../model/ArenaParticipantsHolder.java | 4 +- .../org/l2jmobius/gameserver/model/Duel.java | 6 +- .../org/l2jmobius/gameserver/model/Party.java | 8 +- .../l2jmobius/gameserver/model/Petition.java | 6 +- .../l2jmobius/gameserver/model/Request.java | 14 +- .../gameserver/model/WorldObject.java | 4 +- .../gameserver/model/actor/Creature.java | 14 +- .../gameserver/model/actor/Player.java | 24 +- .../gameserver/model/actor/Summon.java | 4 +- .../gameserver/model/actor/Vehicle.java | 6 +- .../model/actor/instance/Decoy.java | 4 +- .../gameserver/model/actor/instance/Trap.java | 10 +- .../l2jmobius/gameserver/model/clan/Clan.java | 8 +- .../gameserver/model/clan/ClanMember.java | 2 +- .../model/instancezone/InstanceWorld.java | 6 +- .../model/itemauction/ItemAuction.java | 6 +- .../model/olympiad/AbstractOlympiadGame.java | 4 +- .../model/olympiad/OlympiadGameNormal.java | 4 +- .../model/olympiad/OlympiadGameTeams.java | 4 +- .../gameserver/model/zone/ZoneType.java | 4 +- .../model/zone/type/OlympiadStadiumZone.java | 6 +- .../gameserver/network/ClientInitializer.java | 50 --- .../network/ClientNetworkManager.java | 41 -- ...ncomingPackets.java => ClientPackets.java} | 42 +- .../gameserver/network/ConnectionState.java | 4 +- .../gameserver/network/Disconnection.java | 6 +- .../network/{Crypt.java => Encryption.java} | 74 ++-- .../network/EventLoopGroupManager.java | 56 --- ...omingPackets.java => ExClientPackets.java} | 39 +- .../gameserver/network/GameClient.java | 221 +++++----- .../gameserver/network/PacketHandler.java | 128 ++++++ ...utgoingPackets.java => ServerPackets.java} | 39 +- .../clientpackets/AbstractRefinePacket.java | 2 +- .../network/clientpackets/Action.java | 17 +- .../network/clientpackets/AddTradeItem.java | 13 +- .../network/clientpackets/AllyDismiss.java | 9 +- .../network/clientpackets/AllyLeave.java | 9 +- .../clientpackets/AnswerCoupleAction.java | 13 +- .../clientpackets/AnswerJoinPartyRoom.java | 9 +- .../AnswerPartyLootModification.java | 9 +- .../clientpackets/AnswerTradeRequest.java | 9 +- .../network/clientpackets/Appearing.java | 9 +- .../network/clientpackets/AttackRequest.java | 17 +- .../network/clientpackets/AuthLogin.java | 28 +- .../clientpackets/BrEventRankerList.java | 13 +- .../network/clientpackets/BypassUserCmd.java | 9 +- .../clientpackets/CannotMoveAnymore.java | 15 +- .../CannotMoveAnymoreInVehicle.java | 17 +- .../clientpackets/CharacterCreate.java | 33 +- .../clientpackets/CharacterDelete.java | 9 +- .../clientpackets/CharacterRestore.java | 9 +- .../clientpackets/CharacterSelect.java | 19 +- ...tIncomingPacket.java => ClientPacket.java} | 14 +- .../network/clientpackets/DlgAnswer.java | 13 +- .../network/clientpackets/DummyPacket.java | 37 -- .../network/clientpackets/EndScenePlayer.java | 9 +- .../network/clientpackets/EnterWorld.java | 29 +- .../clientpackets/ExBookmarkPacket.java | 25 +- .../network/clientpackets/ExGetOnAirShip.java | 15 +- .../network/clientpackets/ExPacket.java | 70 +-- .../network/clientpackets/FinishRotating.java | 11 +- .../network/clientpackets/GameGuardReply.java | 19 +- .../network/clientpackets/Logout.java | 9 +- .../clientpackets/MoveBackwardToLocation.java | 35 +- .../clientpackets/MoveToLocationAirShip.java | 15 +- .../MoveToLocationInAirShip.java | 21 +- .../network/clientpackets/MoveWithDelta.java | 13 +- .../clientpackets/MultiSellChoose.java | 35 +- .../network/clientpackets/NewCharacter.java | 9 +- .../network/clientpackets/ObserverReturn.java | 9 +- .../clientpackets/ProtocolVersion.java | 15 +- .../clientpackets/RequestAcquireSkill.java | 15 +- .../RequestAcquireSkillInfo.java | 13 +- .../clientpackets/RequestActionUse.java | 415 +++++++++--------- .../clientpackets/RequestAllAgitInfo.java | 9 +- .../clientpackets/RequestAllCastleInfo.java | 9 +- .../clientpackets/RequestAllFortressInfo.java | 9 +- .../clientpackets/RequestAllyCrest.java | 9 +- .../clientpackets/RequestAllyInfo.java | 9 +- .../RequestAnswerFriendInvite.java | 9 +- .../clientpackets/RequestAnswerJoinAlly.java | 9 +- .../clientpackets/RequestAnswerJoinParty.java | 9 +- .../RequestAnswerJoinPledge.java | 9 +- .../RequestAskJoinPartyRoom.java | 9 +- .../clientpackets/RequestAutoSoulShot.java | 11 +- .../clientpackets/RequestBBSwrite.java | 19 +- .../clientpackets/RequestBidItemAuction.java | 11 +- .../network/clientpackets/RequestBlock.java | 11 +- .../RequestBookMarkSlotInfo.java | 9 +- .../clientpackets/RequestBrBuyProduct.java | 11 +- .../clientpackets/RequestBrGamePoint.java | 9 +- .../clientpackets/RequestBrProductInfo.java | 9 +- .../clientpackets/RequestBrProductList.java | 9 +- .../RequestBrRecentProductList.java | 9 +- .../network/clientpackets/RequestBuyItem.java | 21 +- .../network/clientpackets/RequestBuySeed.java | 21 +- .../clientpackets/RequestBuySellUIClose.java | 9 +- .../clientpackets/RequestBypassToServer.java | 9 +- .../RequestCancelPostAttachment.java | 9 +- .../RequestChangeBookMarkSlot.java | 15 +- .../RequestChangeNicknameColor.java | 13 +- .../RequestChangePartyLeader.java | 9 +- .../clientpackets/RequestChangePetName.java | 9 +- .../RequestConfirmCancelItem.java | 9 +- .../clientpackets/RequestConfirmGemStone.java | 13 +- .../RequestConfirmRefinerItem.java | 9 +- .../RequestConfirmSiegeWaitingList.java | 13 +- .../RequestConfirmTargetItem.java | 7 +- .../clientpackets/RequestCrystallizeItem.java | 11 +- .../RequestCursedWeaponList.java | 9 +- .../RequestCursedWeaponLocation.java | 9 +- .../RequestDeleteBookMarkSlot.java | 9 +- .../clientpackets/RequestDeleteMacro.java | 9 +- .../RequestDeleteReceivedPost.java | 15 +- .../clientpackets/RequestDeleteSentPost.java | 16 +- .../clientpackets/RequestDestroyItem.java | 11 +- .../clientpackets/RequestDismissAlly.java | 9 +- .../RequestDismissPartyRoom.java | 11 +- .../network/clientpackets/RequestDispel.java | 13 +- .../clientpackets/RequestDominionInfo.java | 9 +- .../clientpackets/RequestDropItem.java | 17 +- .../clientpackets/RequestDuelAnswerStart.java | 13 +- .../clientpackets/RequestDuelStart.java | 11 +- .../clientpackets/RequestDuelSurrender.java | 9 +- .../clientpackets/RequestEnchantItem.java | 11 +- .../RequestEx2ndPasswordCheck.java | 9 +- .../RequestEx2ndPasswordReq.java | 13 +- .../RequestEx2ndPasswordVerify.java | 9 +- .../RequestExAcceptJoinMPCC.java | 9 +- .../RequestExAddContactToContactList.java | 9 +- .../clientpackets/RequestExAskJoinMPCC.java | 9 +- .../RequestExCancelEnchantItem.java | 9 +- .../clientpackets/RequestExChangeName.java | 13 +- .../RequestExCubeGameChangeTeam.java | 11 +- .../RequestExCubeGameReadyAnswer.java | 11 +- ...RequestExDeleteContactFromContactList.java | 9 +- .../RequestExEnchantItemAttribute.java | 9 +- .../clientpackets/RequestExEnchantSkill.java | 11 +- .../RequestExEnchantSkillInfo.java | 11 +- .../RequestExEnchantSkillInfoDetail.java | 13 +- .../RequestExEnchantSkillRouteChange.java | 11 +- .../RequestExEnchantSkillSafe.java | 11 +- .../RequestExEnchantSkillUntrain.java | 13 +- .../clientpackets/RequestExFishRanking.java | 9 +- .../RequestExFriendListExtended.java | 9 +- .../RequestExMPCCShowPartyMembersInfo.java | 9 +- .../RequestExMagicSkillUseGround.java | 19 +- .../RequestExOlympiadMatchListRefresh.java | 9 +- .../clientpackets/RequestExOustFromMPCC.java | 9 +- .../RequestExPledgeCrestLarge.java | 9 +- .../RequestExRemoveItemAttribute.java | 11 +- .../clientpackets/RequestExRqItemLink.java | 9 +- .../RequestExSetPledgeCrestLarge.java | 18 +- .../RequestExShowContactList.java | 9 +- .../RequestExTryToPutEnchantSupportItem.java | 11 +- .../RequestExTryToPutEnchantTargetItem.java | 9 +- .../RequestExitPartyMatchingWaitingRoom.java | 9 +- .../clientpackets/RequestFortressMapInfo.java | 9 +- .../RequestFortressSiegeInfo.java | 9 +- .../clientpackets/RequestFriendDel.java | 9 +- .../clientpackets/RequestFriendInvite.java | 9 +- .../clientpackets/RequestFriendList.java | 9 +- .../clientpackets/RequestGMCommand.java | 13 +- .../clientpackets/RequestGetBossRecord.java | 9 +- .../clientpackets/RequestGetItemFromPet.java | 13 +- .../clientpackets/RequestGetOffVehicle.java | 15 +- .../clientpackets/RequestGetOnVehicle.java | 11 +- .../clientpackets/RequestGiveItemToPet.java | 11 +- .../clientpackets/RequestGiveNickName.java | 11 +- .../network/clientpackets/RequestGmList.java | 9 +- .../clientpackets/RequestGotoLobby.java | 9 +- .../clientpackets/RequestHardWareInfo.java | 53 ++- .../clientpackets/RequestHennaEquip.java | 9 +- .../clientpackets/RequestHennaItemInfo.java | 9 +- .../clientpackets/RequestHennaItemList.java | 12 +- .../RequestHennaItemRemoveInfo.java | 9 +- .../clientpackets/RequestHennaRemove.java | 9 +- .../clientpackets/RequestHennaRemoveList.java | 12 +- .../clientpackets/RequestInfoItemAuction.java | 9 +- .../clientpackets/RequestItemList.java | 9 +- .../clientpackets/RequestJoinAlly.java | 9 +- .../clientpackets/RequestJoinDominionWar.java | 13 +- .../clientpackets/RequestJoinParty.java | 11 +- .../clientpackets/RequestJoinPledge.java | 11 +- .../clientpackets/RequestJoinSiege.java | 13 +- .../clientpackets/RequestKeyMapping.java | 9 +- .../clientpackets/RequestLinkHtml.java | 9 +- .../RequestListPartyMatchingWaitingRoom.java | 15 +- .../clientpackets/RequestMagicSkillUse.java | 13 +- .../clientpackets/RequestMakeMacro.java | 29 +- .../clientpackets/RequestManorList.java | 9 +- .../RequestModifyBookMarkSlot.java | 26 +- .../RequestMoveToLocationInVehicle.java | 21 +- .../RequestOlympiadMatchList.java | 9 +- .../RequestOlympiadObserverEnd.java | 9 +- .../RequestOustFromPartyRoom.java | 9 +- .../clientpackets/RequestOustPartyMember.java | 9 +- .../RequestOustPledgeMember.java | 9 +- .../clientpackets/RequestPCCafeCouponUse.java | 9 +- .../clientpackets/RequestPVPMatchRecord.java | 15 +- .../clientpackets/RequestPackageSend.java | 21 +- .../RequestPackageSendableItemList.java | 9 +- .../RequestPartyLootModification.java | 9 +- .../RequestPartyMatchConfig.java | 13 +- .../RequestPartyMatchDetail.java | 15 +- .../clientpackets/RequestPartyMatchList.java | 19 +- .../clientpackets/RequestPetGetItem.java | 9 +- .../clientpackets/RequestPetUseItem.java | 13 +- .../clientpackets/RequestPetition.java | 11 +- .../clientpackets/RequestPetitionCancel.java | 11 +- .../RequestPetitionFeedback.java | 13 +- .../clientpackets/RequestPledgeCrest.java | 9 +- .../RequestPledgeExtendedInfo.java | 9 +- .../clientpackets/RequestPledgeInfo.java | 9 +- .../RequestPledgeMemberInfo.java | 11 +- .../RequestPledgeMemberList.java | 9 +- .../RequestPledgeMemberPowerInfo.java | 11 +- .../clientpackets/RequestPledgePower.java | 13 +- .../RequestPledgePowerGradeList.java | 9 +- .../RequestPledgeReorganizeMember.java | 15 +- .../RequestPledgeSetAcademyMaster.java | 13 +- .../RequestPledgeSetMemberPowerGrade.java | 11 +- .../clientpackets/RequestPledgeWarList.java | 11 +- .../clientpackets/RequestPostAttachment.java | 9 +- .../clientpackets/RequestPostItemList.java | 9 +- .../clientpackets/RequestPreviewItem.java | 17 +- .../clientpackets/RequestPrivateStoreBuy.java | 23 +- .../RequestPrivateStoreManageBuy.java | 15 +- .../RequestPrivateStoreManageSell.java | 11 +- .../RequestPrivateStoreQuitBuy.java | 9 +- .../RequestPrivateStoreQuitSell.java | 9 +- .../RequestPrivateStoreSell.java | 30 +- .../clientpackets/RequestProcureCropList.java | 23 +- .../clientpackets/RequestQuestAbort.java | 9 +- .../clientpackets/RequestQuestList.java | 9 +- .../clientpackets/RequestReceivedPost.java | 9 +- .../RequestReceivedPostList.java | 9 +- .../RequestRecipeBookDestroy.java | 9 +- .../clientpackets/RequestRecipeBookOpen.java | 9 +- .../RequestRecipeItemMakeInfo.java | 9 +- .../RequestRecipeItemMakeSelf.java | 9 +- .../RequestRecipeShopListSet.java | 19 +- .../RequestRecipeShopMakeInfo.java | 11 +- .../RequestRecipeShopMakeItem.java | 13 +- .../RequestRecipeShopManageList.java | 9 +- .../RequestRecipeShopManagePrev.java | 9 +- .../RequestRecipeShopManageQuit.java | 9 +- .../RequestRecipeShopMessageSet.java | 9 +- .../clientpackets/RequestRecordInfo.java | 9 +- .../network/clientpackets/RequestRefine.java | 13 +- .../clientpackets/RequestRefineCancel.java | 9 +- .../clientpackets/RequestRefundItem.java | 17 +- .../RequestRejectPostAttachment.java | 9 +- .../RequestReplyStartPledgeWar.java | 11 +- .../RequestReplyStopPledgeWar.java | 11 +- .../RequestReplySurrenderPledgeWar.java | 11 +- .../clientpackets/RequestResetNickname.java | 9 +- .../network/clientpackets/RequestRestart.java | 11 +- .../clientpackets/RequestRestartPoint.java | 9 +- .../clientpackets/RequestSSQStatus.java | 9 +- .../RequestSaveBookMarkSlot.java | 13 +- .../RequestSaveInventoryOrder.java | 13 +- .../clientpackets/RequestSaveKeyMapping.java | 37 +- .../clientpackets/RequestSeedPhase.java | 9 +- .../clientpackets/RequestSellItem.java | 23 +- .../clientpackets/RequestSendFriendMsg.java | 11 +- .../clientpackets/RequestSendPost.java | 29 +- .../clientpackets/RequestSentPost.java | 9 +- .../clientpackets/RequestSentPostList.java | 9 +- .../clientpackets/RequestSetAllyCrest.java | 13 +- .../RequestSetCastleSiegeTime.java | 11 +- .../network/clientpackets/RequestSetCrop.java | 25 +- .../clientpackets/RequestSetPledgeCrest.java | 13 +- .../network/clientpackets/RequestSetSeed.java | 23 +- .../clientpackets/RequestShortCutDel.java | 9 +- .../clientpackets/RequestShortCutReg.java | 17 +- .../clientpackets/RequestShowBoard.java | 12 +- .../clientpackets/RequestShowMiniMap.java | 9 +- .../RequestSiegeAttackerList.java | 9 +- .../RequestSiegeDefenderList.java | 9 +- .../clientpackets/RequestSiegeInfo.java | 16 +- .../clientpackets/RequestSkillList.java | 9 +- .../clientpackets/RequestStartPledgeWar.java | 9 +- .../clientpackets/RequestStopPledgeWar.java | 9 +- .../RequestSurrenderPledgeWar.java | 9 +- .../clientpackets/RequestTargetCanceld.java | 9 +- .../RequestTeleportBookMark.java | 13 +- .../RequestTutorialClientEvent.java | 9 +- .../RequestTutorialLinkHtml.java | 9 +- .../RequestTutorialPassCmdToServer.java | 9 +- .../RequestTutorialQuestionMark.java | 9 +- .../clientpackets/RequestUnEquipItem.java | 9 +- .../network/clientpackets/RequestVoteNew.java | 9 +- .../RequestWithDrawPremiumItem.java | 13 +- .../clientpackets/RequestWithDrawalParty.java | 9 +- .../RequestWithdrawPartyRoom.java | 11 +- .../RequestWithdrawalPledge.java | 9 +- .../clientpackets/RequestWriteHeroWords.java | 9 +- .../network/clientpackets/Say2.java | 13 +- .../clientpackets/SendBypassBuildCmd.java | 9 +- .../SendWareHouseDepositList.java | 19 +- .../SendWareHouseWithDrawList.java | 19 +- .../clientpackets/SetPrivateStoreListBuy.java | 31 +- .../SetPrivateStoreListSell.java | 23 +- .../clientpackets/SetPrivateStoreMsgBuy.java | 9 +- .../clientpackets/SetPrivateStoreMsgSell.java | 9 +- .../SetPrivateStoreWholeMsg.java | 9 +- .../network/clientpackets/SnoopQuit.java | 9 +- .../network/clientpackets/StartRotating.java | 11 +- .../network/clientpackets/TradeDone.java | 9 +- .../network/clientpackets/TradeRequest.java | 9 +- .../network/clientpackets/UseItem.java | 11 +- .../clientpackets/ValidatePosition.java | 17 +- .../loginserverpackets/game/AuthRequest.java | 32 +- .../loginserverpackets/game/BlowFishKey.java | 16 +- .../game/ChangeAccessLevel.java | 16 +- .../game/ChangePassword.java | 20 +- .../game/PlayerAuthRequest.java | 22 +- .../loginserverpackets/game/PlayerInGame.java | 24 +- .../loginserverpackets/game/PlayerLogout.java | 14 +- .../game/PlayerTracert.java | 24 +- .../game/ReplyCharacters.java | 20 +- .../loginserverpackets/game/SendMail.java | 20 +- .../loginserverpackets/game/ServerStatus.java | 15 +- .../loginserverpackets/game/TempBan.java | 24 +- .../login/AuthResponse.java | 10 +- .../login/ChangePasswordResponse.java | 12 +- .../loginserverpackets/login/InitLS.java | 12 +- .../loginserverpackets/login/KickPlayer.java | 8 +- .../login/LoginServerFail.java | 8 +- .../login/PlayerAuthResponse.java | 9 +- .../login/RequestCharacters.java | 8 +- .../serverpackets/AbnormalStatusUpdate.java | 18 +- .../serverpackets/AbstractHtmlPacket.java | 8 +- .../AbstractInventoryUpdate.java | 9 +- .../serverpackets/AbstractItemPacket.java | 61 ++- .../serverpackets/AbstractNpcInfo.java | 340 +++++++------- .../serverpackets/AcquireSkillDone.java | 10 +- .../serverpackets/AcquireSkillInfo.java | 28 +- .../serverpackets/AcquireSkillList.java | 30 +- .../network/serverpackets/ActionFailed.java | 10 +- .../serverpackets/AdminForgePacket.java | 25 +- .../network/serverpackets/AgitDecoInfo.java | 80 ++-- .../network/serverpackets/AllianceInfo.java | 34 +- .../network/serverpackets/AllyCrest.java | 18 +- .../network/serverpackets/AskJoinAlly.java | 14 +- .../network/serverpackets/AskJoinParty.java | 14 +- .../network/serverpackets/AskJoinPledge.java | 18 +- .../network/serverpackets/Attack.java | 39 +- .../serverpackets/AutoAttackStart.java | 15 +- .../network/serverpackets/AutoAttackStop.java | 12 +- .../network/serverpackets/BuyList.java | 60 ++- .../network/serverpackets/BuyListSeed.java | 58 ++- .../network/serverpackets/CSShowComBoard.java | 14 +- .../network/serverpackets/CameraMode.java | 12 +- .../network/serverpackets/ChairSit.java | 14 +- .../network/serverpackets/ChangeMoveType.java | 16 +- .../network/serverpackets/ChangeWaitType.java | 20 +- .../network/serverpackets/CharCreateFail.java | 12 +- .../network/serverpackets/CharCreateOk.java | 12 +- .../network/serverpackets/CharDeleteFail.java | 12 +- .../serverpackets/CharDeleteSuccess.java | 10 +- .../network/serverpackets/CharInfo.java | 168 +++---- .../network/serverpackets/CharSelected.java | 80 ++-- .../serverpackets/CharSelectionInfo.java | 114 +++-- .../serverpackets/ChooseInventoryItem.java | 12 +- .../network/serverpackets/ClientSetTime.java | 14 +- .../network/serverpackets/ConfirmDlg.java | 36 +- .../network/serverpackets/CreatureSay.java | 32 +- .../network/serverpackets/DeleteObject.java | 14 +- .../network/serverpackets/Dice.java | 22 +- .../gameserver/network/serverpackets/Die.java | 52 +-- .../network/serverpackets/DoorInfo.java | 14 +- .../serverpackets/DoorStatusUpdate.java | 24 +- .../network/serverpackets/DropItem.java | 28 +- .../network/serverpackets/Earthquake.java | 22 +- .../network/serverpackets/EnchantResult.java | 16 +- .../network/serverpackets/EquipUpdate.java | 16 +- .../serverpackets/EtcStatusUpdate.java | 28 +- .../serverpackets/Ex2ndPasswordAck.java | 16 +- .../serverpackets/Ex2ndPasswordCheck.java | 14 +- .../serverpackets/Ex2ndPasswordVerify.java | 14 +- .../network/serverpackets/ExAirShipInfo.java | 56 ++- .../serverpackets/ExAirShipStopMove.java | 20 +- .../serverpackets/ExAirShipTeleportList.java | 26 +- .../serverpackets/ExAskCoupleAction.java | 14 +- .../network/serverpackets/ExAskJoinMPCC.java | 12 +- .../serverpackets/ExAskJoinPartyRoom.java | 12 +- .../ExAskModifyPartyLooting.java | 14 +- .../ExAttributeEnchantResult.java | 12 +- .../network/serverpackets/ExAutoSoulShot.java | 18 +- .../ExBaseAttributeCancelResult.java | 16 +- .../serverpackets/ExBasicActionList.java | 16 +- .../serverpackets/ExBirthdayPopup.java | 10 +- .../ExBrBroadcastEventState.java | 28 +- .../serverpackets/ExBrBuffEventState.java | 18 +- .../network/serverpackets/ExBrBuyProduct.java | 12 +- .../serverpackets/ExBrExtraUserInfo.java | 16 +- .../network/serverpackets/ExBrGamePoint.java | 16 +- .../ExBrLoadEventTopRankers.java | 20 +- .../serverpackets/ExBrPremiumState.java | 14 +- .../serverpackets/ExBrProductInfo.java | 27 +- .../serverpackets/ExBrProductList.java | 44 +- .../serverpackets/ExBrRecentProductList.java | 41 +- .../network/serverpackets/ExBuySellList.java | 30 +- .../network/serverpackets/ExCaptureOrc.java | 12 +- .../ExChangeClientEffectInfo.java | 16 +- .../serverpackets/ExChangeNpcState.java | 14 +- .../serverpackets/ExChangePostState.java | 18 +- .../ExChooseInventoryAttributeItem.java | 26 +- .../network/serverpackets/ExCloseMPCC.java | 10 +- .../serverpackets/ExClosePartyRoom.java | 10 +- .../serverpackets/ExColosseumFenceInfo.java | 24 +- .../serverpackets/ExConfirmAddingContact.java | 14 +- .../serverpackets/ExCubeGameAddPlayer.java | 24 +- .../serverpackets/ExCubeGameChangePoints.java | 24 +- .../serverpackets/ExCubeGameChangeTeam.java | 22 +- .../ExCubeGameChangeTimeToStart.java | 16 +- .../serverpackets/ExCubeGameCloseUI.java | 12 +- .../network/serverpackets/ExCubeGameEnd.java | 16 +- .../ExCubeGameExtendedChangePoints.java | 36 +- .../serverpackets/ExCubeGameRemovePlayer.java | 22 +- .../serverpackets/ExCubeGameRequestReady.java | 12 +- .../serverpackets/ExCubeGameTeamList.java | 28 +- .../serverpackets/ExCursedWeaponList.java | 14 +- .../serverpackets/ExCursedWeaponLocation.java | 26 +- .../serverpackets/ExDominionWarEnd.java | 10 +- .../serverpackets/ExDominionWarStart.java | 20 +- .../network/serverpackets/ExDuelAskStart.java | 14 +- .../network/serverpackets/ExDuelEnd.java | 16 +- .../network/serverpackets/ExDuelReady.java | 12 +- .../network/serverpackets/ExDuelStart.java | 12 +- .../serverpackets/ExDuelUpdateUserInfo.java | 30 +- .../serverpackets/ExEnchantSkillInfo.java | 22 +- .../ExEnchantSkillInfoDetail.java | 42 +- .../serverpackets/ExEnchantSkillList.java | 18 +- .../serverpackets/ExEnchantSkillResult.java | 12 +- .../serverpackets/ExEventMatchMessage.java | 14 +- .../network/serverpackets/ExFishingEnd.java | 14 +- .../serverpackets/ExFishingHpRegen.java | 26 +- .../network/serverpackets/ExFishingStart.java | 24 +- .../serverpackets/ExFishingStartCombat.java | 22 +- .../ExGetBookMarkInfoPacket.java | 30 +- .../serverpackets/ExGetBossRecord.java | 30 +- .../serverpackets/ExGetOffAirShip.java | 20 +- .../network/serverpackets/ExGetOnAirShip.java | 20 +- .../serverpackets/ExGetPremiumItemList.java | 24 +- .../network/serverpackets/ExHeroList.java | 26 +- .../ExItemAuctionInfoPacket.java | 24 +- .../ExListPartyMatchingWaitingRoom.java | 27 +- .../serverpackets/ExMPCCPartyInfoUpdate.java | 18 +- .../ExMPCCShowPartyMemberInfo.java | 18 +- .../network/serverpackets/ExMailArrived.java | 10 +- .../ExManagePartyRoomMember.java | 28 +- .../ExMoveToLocationAirShip.java | 24 +- .../ExMoveToLocationInAirShip.java | 22 +- .../ExMultiPartyCommandChannelInfo.java | 27 +- .../serverpackets/ExNeedToChangeName.java | 17 +- .../serverpackets/ExNevitAdventEffect.java | 12 +- .../ExNevitAdventPointInfoPacket.java | 12 +- .../ExNevitAdventTimeChange.java | 14 +- .../serverpackets/ExNoticePostArrived.java | 12 +- .../serverpackets/ExNoticePostSent.java | 12 +- .../serverpackets/ExNotifyPremiumItem.java | 10 +- .../serverpackets/ExOlympiadMatchEnd.java | 10 +- .../serverpackets/ExOlympiadMatchList.java | 32 +- .../serverpackets/ExOlympiadMatchResult.java | 52 ++- .../network/serverpackets/ExOlympiadMode.java | 12 +- .../serverpackets/ExOlympiadSpelledInfo.java | 20 +- .../serverpackets/ExOlympiadUserInfo.java | 34 +- .../network/serverpackets/ExOpenMPCC.java | 10 +- .../serverpackets/ExPCCafePointInfo.java | 22 +- .../serverpackets/ExPVPMatchCCMyRecord.java | 12 +- .../serverpackets/ExPVPMatchCCRecord.java | 18 +- .../serverpackets/ExPartyPetWindowAdd.java | 30 +- .../serverpackets/ExPartyPetWindowDelete.java | 16 +- .../serverpackets/ExPartyPetWindowUpdate.java | 30 +- .../serverpackets/ExPartyRoomMember.java | 32 +- .../network/serverpackets/ExPlayScene.java | 10 +- .../network/serverpackets/ExPledgeEmblem.java | 20 +- .../ExPrivateStoreSetWholeMsg.java | 14 +- ...ExPutCommissionResultForVariationMake.java | 22 +- .../ExPutEnchantSupportItemResult.java | 12 +- .../ExPutEnchantTargetItemResult.java | 12 +- .../ExPutIntensiveResultForVariationMake.java | 20 +- .../ExPutItemResultForVariationCancel.java | 22 +- .../ExPutItemResultForVariationMake.java | 16 +- .../serverpackets/ExQuestItemList.java | 14 +- .../serverpackets/ExQuestNpcLogList.java | 20 +- .../network/serverpackets/ExRedSky.java | 12 +- .../network/serverpackets/ExRegenMax.java | 18 +- .../serverpackets/ExReplyDominionInfo.java | 24 +- .../serverpackets/ExReplyPostItemList.java | 12 +- .../serverpackets/ExReplyReceivedPost.java | 34 +- .../serverpackets/ExReplySentPost.java | 32 +- .../ExRequestChangeNicknameColor.java | 12 +- .../serverpackets/ExRequestHackShield.java | 10 +- .../serverpackets/ExRestartClient.java | 10 +- .../network/serverpackets/ExRotation.java | 14 +- .../network/serverpackets/ExRpItemLink.java | 46 +- .../network/serverpackets/ExSearchOrc.java | 10 +- .../serverpackets/ExSendManorList.java | 16 +- .../network/serverpackets/ExSendUIEvent.java | 32 +- .../serverpackets/ExServerPrimitive.java | 66 ++- .../serverpackets/ExSetCompassZoneCode.java | 12 +- .../serverpackets/ExSetPartyLooting.java | 14 +- .../ExShowAdventurerGuideBook.java | 10 +- .../network/serverpackets/ExShowAgitInfo.java | 20 +- .../ExShowBaseAttributeCancelWindow.java | 16 +- .../serverpackets/ExShowCastleInfo.java | 24 +- .../serverpackets/ExShowContactList.java | 14 +- .../network/serverpackets/ExShowCropInfo.java | 53 ++- .../serverpackets/ExShowCropSetting.java | 58 ++- .../serverpackets/ExShowDominionRegistry.java | 64 ++- .../serverpackets/ExShowFortressInfo.java | 20 +- .../serverpackets/ExShowFortressMapInfo.java | 28 +- .../ExShowFortressSiegeInfo.java | 36 +- .../serverpackets/ExShowManorDefaultInfo.java | 30 +- .../serverpackets/ExShowOwnthingPos.java | 34 +- .../ExShowProcureCropDetail.java | 22 +- .../serverpackets/ExShowQuestInfo.java | 10 +- .../serverpackets/ExShowQuestMark.java | 12 +- .../serverpackets/ExShowReceivedPostList.java | 38 +- .../serverpackets/ExShowScreenMessage.java | 89 ++-- .../network/serverpackets/ExShowSeedInfo.java | 50 +-- .../serverpackets/ExShowSeedMapInfo.java | 22 +- .../serverpackets/ExShowSeedSetting.java | 50 +-- .../serverpackets/ExShowSellCropList.java | 46 +- .../serverpackets/ExShowSentPostList.java | 32 +- .../serverpackets/ExShowTerritory.java | 20 +- .../network/serverpackets/ExShowTrace.java | 22 +- .../ExShowVariationCancelWindow.java | 10 +- .../ExShowVariationMakeWindow.java | 10 +- .../network/serverpackets/ExSpawnEmitter.java | 16 +- .../serverpackets/ExStartScenePlayer.java | 12 +- .../serverpackets/ExStopMoveAirShip.java | 20 +- .../serverpackets/ExStopMoveInAirShip.java | 22 +- .../serverpackets/ExStorageMaxCount.java | 28 +- .../serverpackets/ExSubPledgeSkillAdd.java | 16 +- .../network/serverpackets/ExUISetting.java | 46 +- .../serverpackets/ExUseSharedGroupItem.java | 18 +- .../ExValidateLocationInAirShip.java | 22 +- .../ExVariationCancelResult.java | 12 +- .../serverpackets/ExVariationResult.java | 16 +- .../serverpackets/ExVitalityPointInfo.java | 12 +- .../serverpackets/ExVoteSystemInfo.java | 20 +- .../network/serverpackets/FakePlayerInfo.java | 206 ++++----- .../network/serverpackets/FlyToLocation.java | 26 +- .../serverpackets/FriendAddRequest.java | 14 +- .../network/serverpackets/FriendList.java | 20 +- .../serverpackets/FriendListExtended.java | 24 +- .../network/serverpackets/FriendPacket.java | 20 +- .../serverpackets/FriendStatusPacket.java | 16 +- .../network/serverpackets/GMHennaInfo.java | 30 +- .../network/serverpackets/GMHide.java | 12 +- .../serverpackets/GMViewCharacterInfo.java | 182 ++++---- .../network/serverpackets/GMViewItemList.java | 18 +- .../serverpackets/GMViewPledgeInfo.java | 64 ++- .../serverpackets/GMViewSkillInfo.java | 24 +- .../GMViewWarehouseWithdrawList.java | 18 +- .../network/serverpackets/GameGuardQuery.java | 18 +- .../network/serverpackets/GetItem.java | 20 +- .../network/serverpackets/GetOffVehicle.java | 20 +- .../network/serverpackets/GetOnVehicle.java | 20 +- .../serverpackets/GmViewQuestInfo.java | 29 +- .../network/serverpackets/HennaEquipList.java | 26 +- .../network/serverpackets/HennaInfo.java | 30 +- .../serverpackets/HennaItemDrawInfo.java | 46 +- .../serverpackets/HennaItemRemoveInfo.java | 46 +- .../serverpackets/HennaRemoveList.java | 30 +- .../serverpackets/InventoryUpdate.java | 10 +- .../network/serverpackets/ItemList.java | 18 +- .../network/serverpackets/JoinParty.java | 12 +- .../network/serverpackets/JoinPledge.java | 12 +- .../network/serverpackets/KeyPacket.java | 22 +- .../network/serverpackets/L2FriendSay.java | 18 +- .../network/serverpackets/LeaveWorld.java | 10 +- .../serverpackets/ListPartyWating.java | 40 +- .../network/serverpackets/LoginFail.java | 12 +- .../serverpackets/MagicSkillCanceled.java | 12 +- .../serverpackets/MagicSkillLaunched.java | 20 +- .../network/serverpackets/MagicSkillUse.java | 47 +- .../serverpackets/ManagePledgePower.java | 16 +- .../network/serverpackets/MonRaceInfo.java | 46 +- .../network/serverpackets/MoveToLocation.java | 24 +- .../MoveToLocationInVehicle.java | 26 +- .../network/serverpackets/MoveToPawn.java | 28 +- .../network/serverpackets/MultiSellList.java | 158 ++++--- .../serverpackets/MyTargetSelected.java | 16 +- .../serverpackets/NewCharacterSuccess.java | 52 ++- .../serverpackets/NicknameChanged.java | 14 +- .../network/serverpackets/NormalCamera.java | 10 +- .../network/serverpackets/NpcHtmlMessage.java | 14 +- .../serverpackets/NpcQuestHtmlMessage.java | 14 +- .../network/serverpackets/NpcSay.java | 28 +- .../serverpackets/ObservationMode.java | 22 +- .../serverpackets/ObservationReturn.java | 16 +- .../network/serverpackets/OnEventTrigger.java | 20 +- .../serverpackets/PackageSendableList.java | 18 +- .../network/serverpackets/PackageToList.java | 16 +- .../serverpackets/PartyMatchDetail.java | 26 +- .../serverpackets/PartyMemberPosition.java | 20 +- .../serverpackets/PartySmallWindowAdd.java | 38 +- .../serverpackets/PartySmallWindowAll.java | 64 ++- .../serverpackets/PartySmallWindowDelete.java | 14 +- .../PartySmallWindowDeleteAll.java | 10 +- .../serverpackets/PartySmallWindowUpdate.java | 30 +- .../network/serverpackets/PartySpelled.java | 22 +- .../network/serverpackets/PetDelete.java | 14 +- .../network/serverpackets/PetInfo.java | 154 ++++--- .../serverpackets/PetInventoryUpdate.java | 10 +- .../network/serverpackets/PetItemList.java | 12 +- .../network/serverpackets/PetStatusShow.java | 12 +- .../serverpackets/PetStatusUpdate.java | 42 +- .../serverpackets/PetitionVotePacket.java | 10 +- .../network/serverpackets/PlaySound.java | 26 +- .../network/serverpackets/PledgeCrest.java | 18 +- .../network/serverpackets/PledgeInfo.java | 16 +- .../serverpackets/PledgePowerGradeList.java | 16 +- .../PledgeReceiveMemberInfo.java | 24 +- .../serverpackets/PledgeReceivePowerInfo.java | 16 +- .../PledgeReceiveSubPledgeCreated.java | 18 +- .../serverpackets/PledgeReceiveWarList.java | 22 +- .../serverpackets/PledgeShowInfoUpdate.java | 38 +- .../PledgeShowMemberListAdd.java | 24 +- .../PledgeShowMemberListAll.java | 72 ++- .../PledgeShowMemberListDelete.java | 12 +- .../PledgeShowMemberListDeleteAll.java | 10 +- .../PledgeShowMemberListUpdate.java | 46 +- .../serverpackets/PledgeSkillList.java | 25 +- .../serverpackets/PledgeSkillListAdd.java | 14 +- .../serverpackets/PledgeStatusChanged.java | 24 +- .../network/serverpackets/PremiumState.java | 14 +- .../serverpackets/PrivateStoreListBuy.java | 24 +- .../serverpackets/PrivateStoreListSell.java | 22 +- .../PrivateStoreManageListBuy.java | 28 +- .../PrivateStoreManageListSell.java | 28 +- .../serverpackets/PrivateStoreMsgBuy.java | 14 +- .../serverpackets/PrivateStoreMsgSell.java | 14 +- .../network/serverpackets/QuestList.java | 22 +- .../network/serverpackets/RadarControl.java | 20 +- .../serverpackets/RecipeBookItemList.java | 22 +- .../serverpackets/RecipeItemMakeInfo.java | 27 +- .../serverpackets/RecipeShopItemInfo.java | 20 +- .../serverpackets/RecipeShopManageList.java | 34 +- .../network/serverpackets/RecipeShopMsg.java | 14 +- .../serverpackets/RecipeShopSellList.java | 28 +- .../serverpackets/RelationChanged.java | 38 +- .../network/serverpackets/RequestEnchant.java | 12 +- .../serverpackets/RestartResponse.java | 12 +- .../network/serverpackets/Revive.java | 12 +- .../network/serverpackets/Ride.java | 28 +- .../network/serverpackets/SSQInfo.java | 12 +- .../network/serverpackets/SSQStatus.java | 184 ++++---- .../serverpackets/SellListProcure.java | 30 +- .../network/serverpackets/SendMacroList.java | 40 +- .../serverpackets/SendTradeRequest.java | 12 +- .../network/serverpackets/ServerClose.java | 10 +- .../serverpackets/ServerObjectInfo.java | 42 +- ...tOutgoingPacket.java => ServerPacket.java} | 33 +- .../serverpackets/SetSummonRemainTime.java | 14 +- .../network/serverpackets/SetupGauge.java | 18 +- .../serverpackets/ShopPreviewInfo.java | 50 +-- .../serverpackets/ShopPreviewList.java | 34 +- .../serverpackets/ShortBuffStatusUpdate.java | 16 +- .../network/serverpackets/ShortCutInit.java | 42 +- .../serverpackets/ShortCutRegister.java | 38 +- .../network/serverpackets/ShowBoard.java | 30 +- .../network/serverpackets/ShowCalculator.java | 12 +- .../network/serverpackets/ShowMiniMap.java | 14 +- .../serverpackets/ShowPCCafeCouponShowUI.java | 10 +- .../network/serverpackets/ShowTownMap.java | 16 +- .../network/serverpackets/ShowXMasSeal.java | 12 +- .../serverpackets/SiegeAttackerList.java | 78 ++-- .../serverpackets/SiegeDefenderList.java | 72 ++- .../network/serverpackets/SiegeInfo.java | 72 ++- .../network/serverpackets/SkillCoolTime.java | 20 +- .../network/serverpackets/SkillList.java | 51 ++- .../network/serverpackets/Snoop.java | 22 +- .../network/serverpackets/SocialAction.java | 14 +- .../SortedWareHouseWithdrawalList.java | 54 ++- .../network/serverpackets/SpawnItem.java | 28 +- .../network/serverpackets/SpecialCamera.java | 32 +- .../network/serverpackets/SpecialString.java | 24 +- .../network/serverpackets/StartPledgeWar.java | 14 +- .../network/serverpackets/StartRotation.java | 18 +- .../serverpackets/StaticObjectInfo.java | 32 +- .../network/serverpackets/StatusUpdate.java | 18 +- .../network/serverpackets/StopMove.java | 20 +- .../serverpackets/StopMoveInVehicle.java | 22 +- .../network/serverpackets/StopPledgeWar.java | 14 +- .../network/serverpackets/StopRotation.java | 18 +- .../network/serverpackets/SunRise.java | 10 +- .../network/serverpackets/SunSet.java | 10 +- .../serverpackets/SurrenderPledgeWar.java | 14 +- .../network/serverpackets/SystemMessage.java | 43 +- .../network/serverpackets/TargetSelected.java | 22 +- .../serverpackets/TargetUnselected.java | 20 +- .../serverpackets/TeleportToLocation.java | 22 +- .../network/serverpackets/TradeDone.java | 12 +- .../network/serverpackets/TradeOtherAdd.java | 32 +- .../network/serverpackets/TradeOtherDone.java | 10 +- .../network/serverpackets/TradeOwnAdd.java | 32 +- .../network/serverpackets/TradeStart.java | 17 +- .../serverpackets/TutorialCloseHtml.java | 12 +- .../TutorialEnableClientEvent.java | 12 +- .../serverpackets/TutorialShowHtml.java | 10 +- .../TutorialShowQuestionMark.java | 12 +- .../network/serverpackets/UserInfo.java | 242 +++++----- .../serverpackets/ValidateLocation.java | 20 +- .../ValidateLocationInVehicle.java | 22 +- .../serverpackets/VehicleCheckLocation.java | 20 +- .../serverpackets/VehicleDeparture.java | 22 +- .../network/serverpackets/VehicleInfo.java | 20 +- .../network/serverpackets/VehicleStarted.java | 14 +- .../serverpackets/WareHouseDepositList.java | 18 +- .../WareHouseWithdrawalList.java | 18 +- .../network/telnet/TelnetServer.java | 140 ------ .../network/telnet/TelnetServerHandler.java | 172 -------- .../telnet/TelnetServerInitializer.java | 47 -- .../security/SecondaryPasswordAuth.java | 6 +- .../l2jmobius/gameserver/util/Broadcast.java | 36 +- .../gameserver/util/FloodProtectorAction.java | 6 +- .../log/formatter/AccountingFormatter.java | 5 +- .../log/formatter/EnchantFormatter.java | 2 +- .../loginserver/GameServerThread.java | 52 ++- .../loginserver/LoginController.java | 103 ++--- .../l2jmobius/loginserver/LoginServer.java | 15 +- .../loginserver/enums/LoginFailReason.java | 1 + .../loginserver/network/BannedIpFilter.java | 39 -- .../network/ClientInitializer.java | 56 --- .../network/ClientNetworkManager.java | 41 -- .../loginserver/network/ConnectionState.java | 4 +- .../network/EventLoopGroupManager.java | 56 --- .../network/GameServerPacketHandler.java | 6 +- .../loginserver/network/LoginClient.java | 138 +++--- ...ngPackets.java => LoginClientPackets.java} | 38 +- .../loginserver/network/LoginEncryption.java | 122 +++++ .../network/LoginPacketHandler.java | 114 +++++ ...ngPackets.java => LoginServerPackets.java} | 36 +- .../network}/ScrambledKeyPair.java | 2 +- .../network/clientpackets/AuthGameGuard.java | 21 +- .../clientpackets/LoginClientPacket.java} | 19 +- .../clientpackets/RequestAuthLogin.java | 25 +- .../clientpackets/RequestServerList.java | 15 +- .../clientpackets/RequestServerLogin.java | 19 +- .../gameserverpackets/BlowFishKey.java | 16 +- .../gameserverpackets/ChangeAccessLevel.java | 14 +- .../gameserverpackets/ChangePassword.java | 21 +- .../gameserverpackets/GameServerAuth.java | 24 +- .../gameserverpackets/PlayerAuthRequest.java | 20 +- .../gameserverpackets/PlayerInGame.java | 14 +- .../gameserverpackets/PlayerLogout.java | 12 +- .../gameserverpackets/PlayerTracert.java | 21 +- .../gameserverpackets/ReplyCharacters.java | 18 +- .../gameserverpackets/RequestTempBan.java | 29 +- .../gameserverpackets/ServerStatus.java | 16 +- .../loginserverpackets/AuthResponse.java | 19 +- .../ChangePasswordResponse.java | 18 +- .../network/loginserverpackets/InitLS.java | 18 +- .../loginserverpackets/KickPlayer.java | 14 +- .../loginserverpackets/LoginServerFail.java | 24 +- .../PlayerAuthResponse.java | 16 +- .../loginserverpackets/RequestCharacters.java | 14 +- .../network/serverpackets/AccountKicked.java | 18 +- .../network/serverpackets/GGAuth.java | 22 +- .../network/serverpackets/Init.java | 31 +- .../network/serverpackets/LoginFail.java | 14 +- .../network/serverpackets/LoginOk.java | 30 +- .../network/serverpackets/PlayFail.java | 14 +- .../network/serverpackets/PlayOk.java | 16 +- .../network/serverpackets/ServerList.java | 66 ++- 852 files changed, 9374 insertions(+), 13343 deletions(-) delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/config/Telnet.ini delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Announce.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/GMChat.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Msg.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/AccessLevel.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Ban.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/BanChat.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Enchant.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/GMList.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Give.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Jail.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Kick.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/SendMail.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unban.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/UnbanChat.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unjail.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ForceGC.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Memusage.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Performance.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Purge.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerAbort.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerRestart.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerShutdown.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Status.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/log/accounting0.log create mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/game/log/java0.log create mode 100644 L2J_Mobius_CT_2.6_HighFive/dist/login/log/java0.log rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/{util => }/crypt/BlowfishEngine.java (95%) rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/{util => }/crypt/NewCrypt.java (95%) delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/BaseRecievePacket.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/BaseSendablePacket.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/ChannelInboundHandler.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/EncryptionInterface.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/ExecuteThread.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/IConnectionState.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/ICrypt.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/IIncomingPacket.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/IIncomingPackets.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/IOutgoingPacket.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/NetClient.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/NetConfig.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/NetServer.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/NetworkManager.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/PacketHandlerInterface.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/PacketReader.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/PacketWriter.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/ReadThread.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/ReadablePacket.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/WritablePacket.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/codecs/CryptCodec.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/codecs/LengthFieldBasedFrameEncoder.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/codecs/PacketDecoder.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/network/codecs/PacketEncoder.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/commons/util/crypt/LoginCrypt.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/ClientInitializer.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/ClientNetworkManager.java rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/{IncomingPackets.java => ClientPackets.java} (90%) rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/{Crypt.java => Encryption.java} (74%) delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/EventLoopGroupManager.java rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/{ExIncomingPackets.java => ExClientPackets.java} (90%) create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/PacketHandler.java rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/{OutgoingPackets.java => ServerPackets.java} (93%) rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/{IClientIncomingPacket.java => ClientPacket.java} (77%) delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/clientpackets/DummyPacket.java rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/serverpackets/{IClientOutgoingPacket.java => ServerPacket.java} (70%) delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/telnet/TelnetServer.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/telnet/TelnetServerHandler.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/gameserver/network/telnet/TelnetServerInitializer.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/BannedIpFilter.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/ClientInitializer.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/ClientNetworkManager.java delete mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/EventLoopGroupManager.java rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/{IncomingPackets.java => LoginClientPackets.java} (61%) create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/LoginEncryption.java create mode 100644 L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/LoginPacketHandler.java rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/loginserver/network/{OutgoingPackets.java => LoginServerPackets.java} (64%) rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/{commons/util/crypt => loginserver/network}/ScrambledKeyPair.java (95%) rename L2J_Mobius_CT_2.6_HighFive/java/org/l2jmobius/{gameserver/network/telnet/ITelnetCommand.java => loginserver/network/clientpackets/LoginClientPacket.java} (67%) diff --git a/L2J_Mobius_CT_2.6_HighFive/.classpath b/L2J_Mobius_CT_2.6_HighFive/.classpath index 702c37cf9b..03800cfa33 100644 --- a/L2J_Mobius_CT_2.6_HighFive/.classpath +++ b/L2J_Mobius_CT_2.6_HighFive/.classpath @@ -6,11 +6,6 @@ - - - - - diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Server.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Server.ini index 91a2f3eb53..b56e30d07d 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Server.ini +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Server.ini @@ -31,6 +31,49 @@ GameserverHostname = 0.0.0.0 # Default: 7777 GameserverPort = 7777 +# Client pool size for reading client packets. +# Each pool is executed on a separate thread. +# Default: 100 +ClientReadPoolSize = 100 + +# Client pool size for executing client packets. +# Each pool is executed on a separate thread. +# Default: 50 +ClientExecutePoolSize = 50 + +# Expected client packet count queued by the server. +# Default: 80 +PacketQueueLimit = 80 + +# Disconnect client when queue has reached the queue packet limit. +# Default: False +PacketFloodDisconnect = False + +# Drop packets when queue has reached the queue packet limit. +# Default: False +PacketFloodDrop = False + +# Log message when queue has reached the queue packet limit. +# Default: True +PacketFloodLogged = True + +# Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent. +# When applications wish to decrease network latency, they can disable Nagle's algorithm (by enabling TcpNoDelay). +# Data will be sent earlier, at the cost of an increase in bandwidth consumption. +# Default: True (disabled) +TcpNoDelay = True + +# Connection timeout in milliseconds. +# Default 800 +ConnectionTimeout = 800 + +# Packet encryption. +# By default packets sent or received are encrypted using the Blowfish algorithm. +# Disabling this reduces the resources needed to process any packets transfered, +# also broadcasted packets do not need to be re-encrypted for each client sent. +# Retail: True +PacketEncryption = False + # --------------------------------------------------------------------------- # Database @@ -138,8 +181,11 @@ InstantThreadPoolCount = -1 # Specifies how many threads will be in a single instant pool. ThreadsPerInstantThreadPool = 2 -# Urgent packet thread core size. -UrgentPacketThreadCoreSize = -1 +# Use threads to run client packets individually. +# Less lag when using threads, but more CPU consumption. +# Can try disabling it when server is highly populated and CPU is high. +# Default: True +ThreadsForClientPackets = True # Use threads to decrease startup time. # Default: False diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Telnet.ini b/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Telnet.ini deleted file mode 100644 index c10912945b..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/config/Telnet.ini +++ /dev/null @@ -1,31 +0,0 @@ -# --------------------------------------------------------------------------- -# Telnet Settings -# --------------------------------------------------------------------------- -# The defaults are set to be retail-like. If you modify any of these settings your server will deviate from being retail-like. -# Warning: -# Please take extreme caution when changing anything. Also please understand what you are changing before you do so on a live server. -# --------------------------------------------------------------------------- -# Allows text based monitoring and administration of L2J GS -# by using a telnet client. Communication protocol is insecure -# and you should use SSL tunnels, VPN, etc. if you plan to connect -# over non-trusted channels. -# Default: False -EnableTelnet = False - -# This is the hostname address on which telnet server will be listening. -# Note for all adapters use: * -# Default: 127.0.0.1 -BindAddress = 127.0.0.1 - -# This is the port L2J should listen to for incoming telnet -# requests. -# Default: 54321 -Port = 54321 - -# If the following is not set, a random password is generated on server startup. -Password = somepassword - -# This list can contain IPs or Hosts of clients you wish to allow. Hostnames must be resolvable to an IP. -# Example: 0.0.0.0,host,0.0.0.1,host2,host3,host4,0.0.0.3 -# Default: 127.0.0.1,localhost,::1 -ListOfHosts = 127.0.0.1,localhost,::1 \ No newline at end of file diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionAttack/HallOfErosionAttack.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionAttack/HallOfErosionAttack.java index 470c61ddc4..3413482b13 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionAttack/HallOfErosionAttack.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionAttack/HallOfErosionAttack.java @@ -38,8 +38,8 @@ import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; import org.l2jmobius.gameserver.network.serverpackets.NpcSay; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.util.Util; @@ -672,7 +672,7 @@ public class HallOfErosionAttack extends AbstractNpcAI } } - protected void broadCastPacket(HEAWorld world, IClientOutgoingPacket packet) + protected void broadCastPacket(HEAWorld world, ServerPacket packet) { for (Player player : world.getAllowed()) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionDefence/HallOfErosionDefence.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionDefence/HallOfErosionDefence.java index 16ccb77a3e..25e6c67678 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionDefence/HallOfErosionDefence.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HallOfErosionDefence/HallOfErosionDefence.java @@ -38,8 +38,8 @@ import org.l2jmobius.gameserver.model.quest.QuestState; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; import org.l2jmobius.gameserver.network.serverpackets.NpcSay; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.util.Util; @@ -665,7 +665,7 @@ public class HallOfErosionDefence extends AbstractNpcAI } } - protected void broadCastPacket(HEDWorld world, IClientOutgoingPacket packet) + protected void broadCastPacket(HEDWorld world, ServerPacket packet) { for (Player player : world.getAllowed()) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java index 382a1a2275..54bcf427d5 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityAttack/HeartInfinityAttack.java @@ -42,8 +42,8 @@ import org.l2jmobius.gameserver.model.skill.Skill; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; import org.l2jmobius.gameserver.network.serverpackets.NpcSay; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.util.Util; @@ -855,7 +855,7 @@ public class HeartInfinityAttack extends AbstractNpcAI } } - protected void broadCastPacket(HIAWorld world, IClientOutgoingPacket packet) + protected void broadCastPacket(HIAWorld world, ServerPacket packet) { for (Player player : world.getAllowed()) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityDefence/HeartInfinityDefence.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityDefence/HeartInfinityDefence.java index 3a0a069c5d..da65b2e042 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityDefence/HeartInfinityDefence.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/ai/areas/Gracia/instances/HeartInfinityDefence/HeartInfinityDefence.java @@ -40,8 +40,8 @@ import org.l2jmobius.gameserver.model.zone.ZoneType; import org.l2jmobius.gameserver.network.NpcStringId; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage; -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; import org.l2jmobius.gameserver.network.serverpackets.NpcSay; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; import org.l2jmobius.gameserver.util.Util; @@ -749,7 +749,7 @@ public class HeartInfinityDefence extends AbstractNpcAI return null; } - protected void broadCastPacket(HIDWorld world, IClientOutgoingPacket packet) + protected void broadCastPacket(HIDWorld world, ServerPacket packet) { for (Player player : world.getAllowed()) { diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/MasterHandler.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/MasterHandler.java index f5a9839478..58c86d832b 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/MasterHandler.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/MasterHandler.java @@ -36,7 +36,6 @@ import org.l2jmobius.gameserver.handler.PunishmentHandler; import org.l2jmobius.gameserver.handler.TargetHandler; import org.l2jmobius.gameserver.handler.UserCommandHandler; import org.l2jmobius.gameserver.handler.VoicedCommandHandler; -import org.l2jmobius.gameserver.network.telnet.TelnetServer; import handlers.actionhandlers.ArtefactAction; import handlers.actionhandlers.DecoyAction; @@ -254,30 +253,6 @@ import handlers.targethandlers.Servitor; import handlers.targethandlers.Summon; import handlers.targethandlers.TargetParty; import handlers.targethandlers.Unlockable; -import handlers.telnethandlers.chat.Announce; -import handlers.telnethandlers.chat.GMChat; -import handlers.telnethandlers.chat.Msg; -import handlers.telnethandlers.player.AccessLevel; -import handlers.telnethandlers.player.Ban; -import handlers.telnethandlers.player.BanChat; -import handlers.telnethandlers.player.Enchant; -import handlers.telnethandlers.player.GMList; -import handlers.telnethandlers.player.Give; -import handlers.telnethandlers.player.Jail; -import handlers.telnethandlers.player.Kick; -import handlers.telnethandlers.player.SendMail; -import handlers.telnethandlers.player.Unban; -import handlers.telnethandlers.player.UnbanChat; -import handlers.telnethandlers.player.Unjail; -import handlers.telnethandlers.server.ForceGC; -import handlers.telnethandlers.server.Memusage; -import handlers.telnethandlers.server.Performance; -import handlers.telnethandlers.server.Purge; -import handlers.telnethandlers.server.Reload; -import handlers.telnethandlers.server.ServerAbort; -import handlers.telnethandlers.server.ServerRestart; -import handlers.telnethandlers.server.ServerShutdown; -import handlers.telnethandlers.server.Status; import handlers.usercommandhandlers.ChannelDelete; import handlers.usercommandhandlers.ChannelInfo; import handlers.usercommandhandlers.ChannelLeave; @@ -653,35 +628,6 @@ public class MasterHandler } } - if (Config.TELNET_ENABLED) - { - TelnetServer.getInstance().addHandler(new Announce()); - TelnetServer.getInstance().addHandler(new GMChat()); - TelnetServer.getInstance().addHandler(new Msg()); - TelnetServer.getInstance().addHandler(new AccessLevel()); - TelnetServer.getInstance().addHandler(new Ban()); - TelnetServer.getInstance().addHandler(new BanChat()); - TelnetServer.getInstance().addHandler(new Enchant()); - TelnetServer.getInstance().addHandler(new Give()); - TelnetServer.getInstance().addHandler(new GMList()); - TelnetServer.getInstance().addHandler(new Jail()); - TelnetServer.getInstance().addHandler(new Kick()); - TelnetServer.getInstance().addHandler(new Unban()); - TelnetServer.getInstance().addHandler(new UnbanChat()); - TelnetServer.getInstance().addHandler(new Unjail()); - TelnetServer.getInstance().addHandler(new ForceGC()); - TelnetServer.getInstance().addHandler(new Memusage()); - TelnetServer.getInstance().addHandler(new Performance()); - TelnetServer.getInstance().addHandler(new Purge()); - TelnetServer.getInstance().addHandler(new Reload()); - TelnetServer.getInstance().addHandler(new SendMail()); - TelnetServer.getInstance().addHandler(new ServerAbort()); - TelnetServer.getInstance().addHandler(new ServerRestart()); - TelnetServer.getInstance().addHandler(new ServerShutdown()); - TelnetServer.getInstance().addHandler(new Status()); - TelnetServer.getInstance().addHandler(new handlers.telnethandlers.server.Debug()); - } - for (IHandler loadInstance : LOAD_INSTANCES) { LOGGER.log(Level.INFO, loadInstance.getClass().getSimpleName() + ": Loaded " + loadInstance.size() + " handlers."); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index a81e9b6ef0..d92121da08 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -1042,7 +1042,7 @@ public class AdminEditChar implements IAdminCommandHandler } else { - ip = client.getConnectionAddress().getHostAddress(); + ip = client.getIp(); // if (client.getHWID() != null) // { // hwid = client.getHWID(); @@ -1263,7 +1263,7 @@ public class AdminEditChar implements IAdminCommandHandler continue; } - ip = client.getConnectionAddress().getHostAddress(); + ip = client.getIp(); if (!ip.equals(ipAdress)) { continue; @@ -1357,7 +1357,7 @@ public class AdminEditChar implements IAdminCommandHandler continue; } - ip = client.getConnectionAddress().getHostAddress(); + ip = client.getIp(); if (ipMap.get(ip) == null) { ipMap.put(ip, new ArrayList<>()); @@ -1410,7 +1410,7 @@ public class AdminEditChar implements IAdminCommandHandler continue; } - final IpPack pack = new IpPack(client.getConnectionAddress().getHostAddress(), client.getTrace()); + final IpPack pack = new IpPack(client.getIp(), client.getTrace()); if (ipMap.get(pack) == null) { ipMap.put(pack, new ArrayList<>()); diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEffects.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEffects.java index bfba55f803..fa8e48d537 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEffects.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminEffects.java @@ -31,11 +31,11 @@ import org.l2jmobius.gameserver.model.skill.AbnormalVisualEffect; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.Earthquake; import org.l2jmobius.gameserver.network.serverpackets.ExRedSky; -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.network.serverpackets.OnEventTrigger; import org.l2jmobius.gameserver.network.serverpackets.PlaySound; import org.l2jmobius.gameserver.network.serverpackets.SSQInfo; +import org.l2jmobius.gameserver.network.serverpackets.ServerPacket; import org.l2jmobius.gameserver.network.serverpackets.SocialAction; import org.l2jmobius.gameserver.network.serverpackets.SunRise; import org.l2jmobius.gameserver.network.serverpackets.SunSet; @@ -655,7 +655,7 @@ public class AdminEffects implements IAdminCommandHandler */ private void adminAtmosphere(String type, String state, int duration, Player activeChar) { - IClientOutgoingPacket packet = null; + ServerPacket packet = null; if (type.equals("signsky")) { if (state.equals("dawn")) diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Announce.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Announce.java deleted file mode 100644 index 4fd4996298..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Announce.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.chat; - -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Broadcast; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Announce implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "announce"; - } - - @Override - public String getUsage() - { - return "Announce "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final StringBuilder sb = new StringBuilder(); - for (String str : args) - { - sb.append(str + " "); - } - Broadcast.toAllOnlinePlayers(sb.toString()); - return "Announcement sent!"; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/GMChat.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/GMChat.java deleted file mode 100644 index 0961785c94..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/GMChat.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.chat; - -import org.l2jmobius.gameserver.data.xml.AdminData; -import org.l2jmobius.gameserver.enums.ChatType; -import org.l2jmobius.gameserver.network.serverpackets.CreatureSay; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class GMChat implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "gmchat"; - } - - @Override - public String getUsage() - { - return "Gmchat "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final StringBuilder sb = new StringBuilder(); - for (String str : args) - { - sb.append(str + " "); - } - AdminData.getInstance().broadcastToGMs(new CreatureSay(null, ChatType.ALLIANCE, "Telnet GM Broadcast", sb.toString())); - return "GMChat sent!"; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Msg.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Msg.java deleted file mode 100644 index 8caa7d04e1..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/chat/Msg.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.chat; - -import org.l2jmobius.gameserver.enums.ChatType; -import org.l2jmobius.gameserver.model.World; -import org.l2jmobius.gameserver.model.actor.Player; -import org.l2jmobius.gameserver.network.serverpackets.CreatureSay; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Msg implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "msg"; - } - - @Override - public String getUsage() - { - return "Msg "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length < 2) || args[0].isEmpty()) - { - return null; - } - final Player player = World.getInstance().getPlayer(args[0]); - if (player != null) - { - final StringBuilder sb = new StringBuilder(); - for (int i = 1; i < args.length; i++) - { - sb.append(args[i] + " "); - } - player.sendPacket(new CreatureSay(null, ChatType.WHISPER, "Telnet Priv", sb.toString())); - return "Announcement sent!"; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/AccessLevel.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/AccessLevel.java deleted file mode 100644 index d05179fbff..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/AccessLevel.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.model.World; -import org.l2jmobius.gameserver.model.actor.Player; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class AccessLevel implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "accesslevel"; - } - - @Override - public String getUsage() - { - return "AccessLevel "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length < 2) || args[0].isEmpty() || !Util.isDigit(args[1])) - { - return null; - } - final Player player = World.getInstance().getPlayer(args[0]); - if (player != null) - { - final int level = Integer.parseInt(args[1]); - player.setAccessLevel(level); - return "Player " + player.getName() + "'s access level has been changed to: " + level; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Ban.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Ban.java deleted file mode 100644 index 3dd1cdc97d..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Ban.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.data.sql.CharNameTable; -import org.l2jmobius.gameserver.instancemanager.PunishmentManager; -import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; -import org.l2jmobius.gameserver.model.punishment.PunishmentTask; -import org.l2jmobius.gameserver.model.punishment.PunishmentType; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Ban implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "ban"; - } - - @Override - public String getUsage() - { - return "Ban [time in minutes]"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final int objectId = CharNameTable.getInstance().getIdByName(args[0]); - if (objectId > 0) - { - if (PunishmentManager.getInstance().hasPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.BAN)) - { - return "Player is already banned."; - } - long time = -1; - String reason = "You have been banned by telnet admin."; - if (args.length > 1) - { - final String token = args[1]; - if (Util.isDigit(token)) - { - time = Integer.parseInt(token) * 60 * 1000; - time += System.currentTimeMillis(); - } - if (args.length > 2) - { - reason = args[2]; - for (int i = 3; i < args.length; i++) - { - reason += " " + args[i]; - } - } - } - PunishmentManager.getInstance().startPunishment(new PunishmentTask(objectId, PunishmentAffect.CHARACTER, PunishmentType.BAN, time, reason, "Telnet Admin")); - return "Player has been successfully banned."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/BanChat.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/BanChat.java deleted file mode 100644 index f653561c0d..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/BanChat.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.data.sql.CharNameTable; -import org.l2jmobius.gameserver.instancemanager.PunishmentManager; -import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; -import org.l2jmobius.gameserver.model.punishment.PunishmentTask; -import org.l2jmobius.gameserver.model.punishment.PunishmentType; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author lion - */ -public class BanChat implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "ban_chat"; - } - - @Override - public String getUsage() - { - return "ban_chat [time in minutes]"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final int objectId = CharNameTable.getInstance().getIdByName(args[0]); - if (objectId > 0) - { - if (PunishmentManager.getInstance().hasPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN)) - { - return "Player is already chat banned."; - } - long time = -1; - String reason = "Your chat have been banned by telnet admin."; - if (args.length > 1) - { - final String token = args[1]; - if (Util.isDigit(token)) - { - time = Integer.parseInt(token) * 60 * 1000; - time += System.currentTimeMillis(); - } - if (args.length > 2) - { - reason = args[2]; - for (int i = 3; i < args.length; i++) - { - reason += " " + args[i]; - } - } - } - PunishmentManager.getInstance().startPunishment(new PunishmentTask(objectId, PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN, time, reason, "Telnet Admin")); - return "Player has been successfully banned."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Enchant.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Enchant.java deleted file mode 100644 index 066891e2dd..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Enchant.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.model.World; -import org.l2jmobius.gameserver.model.actor.Player; -import org.l2jmobius.gameserver.model.item.instance.Item; -import org.l2jmobius.gameserver.model.itemcontainer.Inventory; -import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.GMAudit; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Enchant implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "enchant"; - } - - @Override - public String getUsage() - { - return "Enchant [item amount] [item enchant]"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length < 3) || args[0].isEmpty() || !Util.isDigit(args[1]) || !Util.isDigit(args[2])) - { - return null; - } - final Player player = World.getInstance().getPlayer(args[0]); - if (player != null) - { - int itemType = Integer.parseInt(args[1]); - int enchant = Integer.parseInt(args[2]); - enchant = Math.min(enchant, 127); - enchant = Math.max(enchant, 0); - - switch (itemType) - { - case 1: - { - itemType = Inventory.PAPERDOLL_HEAD; - break; - } - case 2: - { - itemType = Inventory.PAPERDOLL_CHEST; - break; - } - case 3: - { - itemType = Inventory.PAPERDOLL_GLOVES; - break; - } - case 4: - { - itemType = Inventory.PAPERDOLL_FEET; - break; - } - case 5: - { - itemType = Inventory.PAPERDOLL_LEGS; - break; - } - case 6: - { - itemType = Inventory.PAPERDOLL_RHAND; - break; - } - case 7: - { - itemType = Inventory.PAPERDOLL_LHAND; - break; - } - case 8: - { - itemType = Inventory.PAPERDOLL_LEAR; - break; - } - case 9: - { - itemType = Inventory.PAPERDOLL_REAR; - break; - } - case 10: - { - itemType = Inventory.PAPERDOLL_LFINGER; - break; - } - case 11: - { - itemType = Inventory.PAPERDOLL_RFINGER; - break; - } - case 12: - { - itemType = Inventory.PAPERDOLL_NECK; - break; - } - case 13: - { - itemType = Inventory.PAPERDOLL_UNDER; - break; - } - case 14: - { - itemType = Inventory.PAPERDOLL_CLOAK; - break; - } - case 15: - { - itemType = Inventory.PAPERDOLL_BELT; - break; - } - default: - { - itemType = 0; - break; - } - } - final boolean success = setEnchant(player, enchant, itemType); - return success ? "Item has been successfully enchanted." : "Failed to enchant player's item!"; - } - return "Couldn't find player with such name."; - } - - private boolean setEnchant(Player player, int ench, int armorType) - { - // now we need to find the equipped weapon of the targeted character... - int curEnchant = 0; // display purposes only - Item itemInstance = null; - - // only attempt to enchant if there is a weapon equipped - Item parmorInstance = player.getInventory().getPaperdollItem(armorType); - if ((parmorInstance != null) && (parmorInstance.getLocationSlot() == armorType)) - { - itemInstance = parmorInstance; - } - else - { - // for bows/crossbows and double handed weapons - parmorInstance = player.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND); - if ((parmorInstance != null) && (parmorInstance.getLocationSlot() == Inventory.PAPERDOLL_RHAND)) - { - itemInstance = parmorInstance; - } - } - - if (itemInstance != null) - { - curEnchant = itemInstance.getEnchantLevel(); - - // set enchant value - player.getInventory().unEquipItemInSlot(armorType); - itemInstance.setEnchantLevel(ench); - player.getInventory().equipItem(itemInstance); - - // send packets - final InventoryUpdate iu = new InventoryUpdate(); - iu.addModifiedItem(itemInstance); - player.sendPacket(iu); - player.broadcastUserInfo(); - - // informations - player.sendMessage("Changed enchantment of " + player.getName() + "'s " + itemInstance.getTemplate().getName() + " from " + curEnchant + " to " + ench + "."); - player.sendMessage("Admin has changed the enchantment of your " + itemInstance.getTemplate().getName() + " from " + curEnchant + " to " + ench + "."); - - // log - GMAudit.auditGMAction("TelnetAdmin", "enchant", player.getName(), itemInstance.getTemplate().getName() + "(" + itemInstance.getObjectId() + ") from " + curEnchant + " to " + ench); - return true; - } - return false; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/GMList.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/GMList.java deleted file mode 100644 index 33b535ae23..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/GMList.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.data.xml.AdminData; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class GMList implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "gmlist"; - } - - @Override - public String getUsage() - { - return "GMList"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - int i = 0; - String gms = ""; - for (String player : AdminData.getInstance().getAllGmNames(true)) - { - gms += player + ", "; - i++; - } - if (!gms.isEmpty()) - { - gms = gms.substring(0, gms.length() - 2) + "."; - } - return "There are currently " + i + " GM(s) online..." + Config.EOL + gms; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Give.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Give.java deleted file mode 100644 index 5cc5d2c39b..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Give.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.data.ItemTable; -import org.l2jmobius.gameserver.model.World; -import org.l2jmobius.gameserver.model.actor.Player; -import org.l2jmobius.gameserver.model.item.instance.Item; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Give implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "give"; - } - - @Override - public String getUsage() - { - return "Give [item amount] [item enchant] [donators]"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length < 2) || args[0].isEmpty() || !Util.isDigit(args[1])) - { - return null; - } - final Player player = World.getInstance().getPlayer(args[0]); - if (player != null) - { - final int itemId = Integer.parseInt(args[1]); - long amount = 1; - int enchanted = 0; - if (args.length > 2) - { - String token = args[2]; - if (Util.isDigit(token)) - { - amount = Long.parseLong(token); - } - if (args.length > 3) - { - token = args[3]; - if (Util.isDigit(token)) - { - enchanted = Integer.parseInt(token); - } - } - } - - final Item item = ItemTable.getInstance().createItem("Telnet-Admin", itemId, amount, player, null); - if (enchanted > 0) - { - item.setEnchantLevel(enchanted); - } - player.addItem("Telnet-Admin", item, null, true); - return "Item has been successfully given to the player."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Jail.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Jail.java deleted file mode 100644 index cf3736fc0e..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Jail.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.data.sql.CharNameTable; -import org.l2jmobius.gameserver.instancemanager.PunishmentManager; -import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; -import org.l2jmobius.gameserver.model.punishment.PunishmentTask; -import org.l2jmobius.gameserver.model.punishment.PunishmentType; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Jail implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "jail"; - } - - @Override - public String getUsage() - { - return "Jail [time in minutes]"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final int objectId = CharNameTable.getInstance().getIdByName(args[0]); - if (objectId > 0) - { - if (PunishmentManager.getInstance().hasPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.JAIL)) - { - return "Player is already jailed."; - } - String reason = "You have been jailed by telnet admin."; - long time = -1; - if (args.length > 1) - { - final String token = args[1]; - if (Util.isDigit(token)) - { - time = Integer.parseInt(token) * 60 * 1000; - time += System.currentTimeMillis(); - } - if (args.length > 2) - { - reason = args[2]; - for (int i = 3; i < args.length; i++) - { - reason += " " + args[i]; - } - } - } - PunishmentManager.getInstance().startPunishment(new PunishmentTask(objectId, PunishmentAffect.CHARACTER, PunishmentType.JAIL, time, reason, "Telnet Admin")); - return "Player has been successfully jailed."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Kick.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Kick.java deleted file mode 100644 index 030fc63b22..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Kick.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.model.World; -import org.l2jmobius.gameserver.model.actor.Player; -import org.l2jmobius.gameserver.network.Disconnection; -import org.l2jmobius.gameserver.network.serverpackets.LeaveWorld; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Kick implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "kick"; - } - - @Override - public String getUsage() - { - return "Kick "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final Player player = World.getInstance().getPlayer(args[0]); - if (player != null) - { - Disconnection.of(player).defaultSequence(LeaveWorld.STATIC_PACKET); - return "Player has been successfully kicked."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/SendMail.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/SendMail.java deleted file mode 100644 index c2523f7954..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/SendMail.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import java.util.ArrayList; -import java.util.List; - -import org.l2jmobius.gameserver.data.sql.CharNameTable; -import org.l2jmobius.gameserver.enums.MessageSenderType; -import org.l2jmobius.gameserver.instancemanager.MailManager; -import org.l2jmobius.gameserver.model.Message; -import org.l2jmobius.gameserver.model.holders.ItemHolder; -import org.l2jmobius.gameserver.model.itemcontainer.Mail; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author Mobius - */ -public class SendMail implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "sendmail"; - } - - @Override - public String getUsage() - { - return "sendmail "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length < 3) || args[0].isEmpty()) - { - return null; - } - final int objectId = CharNameTable.getInstance().getIdByName(args[0]); - if (objectId > 0) - { - final Message msg = new Message(objectId, args[1].replace("_", " "), args[2].replace("_", " "), MessageSenderType.NEWS); - final List itemHolders = new ArrayList<>(); - int counter = -1; - for (String str : args) - { - counter++; - if (counter < 3) - { - continue; - } - if (str.toLowerCase().contains("x")) - { - final String itemId = str.toLowerCase().split("x")[0]; - final String itemCount = str.toLowerCase().split("x")[1]; - if (Util.isDigit(itemId) && Util.isDigit(itemCount)) - { - itemHolders.add(new ItemHolder(Integer.parseInt(itemId), Long.parseLong(itemCount))); - } - } - else if (Util.isDigit(str)) - { - itemHolders.add(new ItemHolder(Integer.parseInt(str), 1)); - } - } - if (!itemHolders.isEmpty()) - { - final Mail attachments = msg.createAttachments(); - for (ItemHolder itemHolder : itemHolders) - { - attachments.addItem("Telnet-Mail", itemHolder.getId(), itemHolder.getCount(), null, null); - } - } - MailManager.getInstance().sendMessage(msg); - return "An ingame mail has been sent to " + args[0] + "."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unban.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unban.java deleted file mode 100644 index 5635913361..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unban.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.data.sql.CharNameTable; -import org.l2jmobius.gameserver.instancemanager.PunishmentManager; -import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; -import org.l2jmobius.gameserver.model.punishment.PunishmentType; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Unban implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "unban"; - } - - @Override - public String getUsage() - { - return "Unban "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final int objectId = CharNameTable.getInstance().getIdByName(args[0]); - if (objectId > 0) - { - if (!PunishmentManager.getInstance().hasPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.BAN)) - { - return "Player is not banned at all."; - } - PunishmentManager.getInstance().stopPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.BAN); - return "Player has been successfully unbanned."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/UnbanChat.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/UnbanChat.java deleted file mode 100644 index 2e128c949b..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/UnbanChat.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.data.sql.CharNameTable; -import org.l2jmobius.gameserver.instancemanager.PunishmentManager; -import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; -import org.l2jmobius.gameserver.model.punishment.PunishmentType; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class UnbanChat implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "unban_chat"; - } - - @Override - public String getUsage() - { - return "unban_chat "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final int objectId = CharNameTable.getInstance().getIdByName(args[0]); - if (objectId > 0) - { - if (!PunishmentManager.getInstance().hasPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN)) - { - return "Player is not banned at all."; - } - PunishmentManager.getInstance().stopPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.CHAT_BAN); - return "Player chat has been successfully unbanned."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unjail.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unjail.java deleted file mode 100644 index efcf5bcefa..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/player/Unjail.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.player; - -import org.l2jmobius.gameserver.data.sql.CharNameTable; -import org.l2jmobius.gameserver.instancemanager.PunishmentManager; -import org.l2jmobius.gameserver.model.punishment.PunishmentAffect; -import org.l2jmobius.gameserver.model.punishment.PunishmentType; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Unjail implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "unjail"; - } - - @Override - public String getUsage() - { - return "Unjail "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - final int objectId = CharNameTable.getInstance().getIdByName(args[0]); - if (objectId > 0) - { - if (!PunishmentManager.getInstance().hasPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.JAIL)) - { - return "Player is not jailed at all."; - } - PunishmentManager.getInstance().stopPunishment(objectId, PunishmentAffect.CHARACTER, PunishmentType.JAIL); - return "Player has been successfully unjailed."; - } - return "Couldn't find player with such name."; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java deleted file mode 100644 index 920eadb0b6..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Debug.java +++ /dev/null @@ -1,366 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import java.io.File; -import java.io.IOException; -import java.lang.management.ManagementFactory; -import java.lang.management.ThreadInfo; -import java.lang.management.ThreadMXBean; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.StandardOpenOption; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.l2jmobius.commons.threads.ThreadPool; -import org.l2jmobius.gameserver.GameServer; -import org.l2jmobius.gameserver.LoginServerThread; -import org.l2jmobius.gameserver.data.xml.AdminData; -import org.l2jmobius.gameserver.enums.ItemLocation; -import org.l2jmobius.gameserver.model.World; -import org.l2jmobius.gameserver.model.WorldObject; -import org.l2jmobius.gameserver.model.actor.Creature; -import org.l2jmobius.gameserver.model.actor.Player; -import org.l2jmobius.gameserver.model.actor.instance.Monster; -import org.l2jmobius.gameserver.model.item.instance.Item; -import org.l2jmobius.gameserver.network.serverpackets.AdminForgePacket; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.taskmanager.DecayTaskManager; -import org.l2jmobius.gameserver.taskmanager.GameTimeTaskManager; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Debug implements ITelnetCommand -{ - private static final Logger LOGGER = Logger.getLogger(Debug.class.getName()); - - @Override - public String getCommand() - { - return "debug"; - } - - @Override - public String getUsage() - { - return "Debug "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - switch (args[0]) - { - case "decay": - { - return DecayTaskManager.getInstance().toString(); - } - case "packetsend": - { - if (args.length < 4) - { - return "Usage: debug packetsend "; - } - final Player player = World.getInstance().getPlayer(args[1]); - if (player == null) - { - return "Couldn't find player with such name."; - } - - final AdminForgePacket sp = new AdminForgePacket(); - for (int i = 2; i < args.length; i++) - { - final String b = args[i]; - if (!b.isEmpty()) - { - sp.addPart("C".getBytes()[0], "0x" + b); - } - } - player.sendPacket(sp); - return "Packet has been sent!"; - } - case "full": - { - final Calendar cal = Calendar.getInstance(); - final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); - final StringBuilder sb = new StringBuilder(); - sb.append(sdf.format(cal.getTime())); - sb.append("\r\nServer"); - sb.append("\r\n"); - sb.append(getServerStatus()); - sb.append("\r\n"); - sb.append("\r\n## Java Platform Information ##"); - sb.append("\r\nJava Runtime Name: " + System.getProperty("java.runtime.name")); - sb.append("\r\nJava Version: " + System.getProperty("java.version")); - sb.append("\r\nJava Class Version: " + System.getProperty("java.class.version")); - sb.append("\r\n"); - sb.append("\r\n## Virtual Machine Information ##"); - sb.append("\r\nVM Name: " + System.getProperty("java.vm.name")); - sb.append("\r\nVM Version: " + System.getProperty("java.vm.version")); - sb.append("\r\nVM Vendor: " + System.getProperty("java.vm.vendor")); - sb.append("\r\nVM Info: " + System.getProperty("java.vm.info")); - sb.append("\r\n"); - sb.append("\r\n## OS Information ##"); - sb.append("\r\nName: " + System.getProperty("os.name")); - sb.append("\r\nArchiteture: " + System.getProperty("os.arch")); - sb.append("\r\nVersion: " + System.getProperty("os.version")); - sb.append("\r\n"); - sb.append("\r\n## Runtime Information ##"); - sb.append("\r\nCPU Count: " + Runtime.getRuntime().availableProcessors()); - sb.append("\r\nCurrent Free Heap Size: " + (Runtime.getRuntime().freeMemory() / 1024 / 1024) + " mb"); - sb.append("\r\nCurrent Heap Size: " + (Runtime.getRuntime().totalMemory() / 1024 / 1024) + " mb"); - sb.append("\r\nMaximum Heap Size: " + (Runtime.getRuntime().maxMemory() / 1024 / 1024) + " mb"); - sb.append("\r\n"); - sb.append("\r\n## Class Path Information ##\r\n"); - final String cp = System.getProperty("java.class.path"); - final String[] libs = cp.split(File.pathSeparator); - for (String lib : libs) - { - sb.append(lib); - sb.append("\r\n"); - } - - sb.append("\r\n"); - sb.append("## Threads Information ##\r\n"); - final Map allThread = Thread.getAllStackTraces(); - final List> entries = new ArrayList<>(allThread.entrySet()); - Collections.sort(entries, (e1, e2) -> e1.getKey().getName().compareTo(e2.getKey().getName())); - for (Entry entry : entries) - { - final StackTraceElement[] stes = entry.getValue(); - final Thread t = entry.getKey(); - sb.append("--------------\r\n"); - sb.append(t + " (" + t.getId() + ")\r\n"); - sb.append("State: " + t.getState() + "\r\n"); - sb.append("isAlive: " + t.isAlive() + " | isDaemon: " + t.isDaemon() + " | isInterrupted: " + t.isInterrupted() + "\r\n"); - sb.append("\r\n"); - for (StackTraceElement ste : stes) - { - sb.append(ste.toString()); - sb.append("\r\n"); - } - sb.append("\r\n"); - } - - sb.append("\r\n"); - final ThreadMXBean mbean = ManagementFactory.getThreadMXBean(); - final long[] ids = findDeadlockedThreads(mbean); - if ((ids != null) && (ids.length > 0)) - { - final Thread[] threads = new Thread[ids.length]; - for (int i = 0; i < threads.length; i++) - { - threads[i] = findMatchingThread(mbean.getThreadInfo(ids[i])); - } - sb.append("Deadlocked Threads:\r\n"); - sb.append("-------------------\r\n"); - for (Thread thread : threads) - { - System.out.println(thread); - for (StackTraceElement ste : thread.getStackTrace()) - { - sb.append("\t" + ste); - sb.append("\r\n"); - } - } - } - - sb.append("\r\n## Thread Pool Manager Statistics ##\r\n"); - for (String line : ThreadPool.getStats()) - { - sb.append(line); - sb.append("\r\n"); - } - - int i = 0; - File f = new File("./log/Debug-" + i + ".txt"); - while (f.exists()) - { - i++; - f = new File("./log/Debug-" + i + ".txt"); - } - f.getParentFile().mkdirs(); - - try - { - Files.write(f.toPath(), sb.toString().getBytes(StandardCharsets.UTF_8), StandardOpenOption.CREATE_NEW, StandardOpenOption.WRITE); - } - catch (IOException e) - { - LOGGER.log(Level.WARNING, "Couldn't write packet tp.", e); - } - return "Debug output saved to log/" + f.getName(); - } - } - return null; - } - - private long[] findDeadlockedThreads(ThreadMXBean mbean) - { - // JDK 1.5 only supports the findMonitorDeadlockedThreads() - // method, so you need to comment out the following three lines - if (mbean.isSynchronizerUsageSupported()) - { - return mbean.findDeadlockedThreads(); - } - return mbean.findMonitorDeadlockedThreads(); - } - - private Thread findMatchingThread(ThreadInfo inf) - { - for (Thread thread : Thread.getAllStackTraces().keySet()) - { - if (thread.getId() == inf.getThreadId()) - { - return thread; - } - } - throw new IllegalStateException("Deadlocked Thread not found"); - } - - static String getServerStatus() - { - int playerCount = 0; - int objectCount = 0; - final int max = LoginServerThread.getInstance().getMaxPlayer(); - playerCount = World.getInstance().getPlayers().size(); - objectCount = World.getInstance().getVisibleObjectsCount(); - int itemCount = 0; - int itemVoidCount = 0; - int monsterCount = 0; - int minionCount = 0; - int minionsGroupCount = 0; - int npcCount = 0; - int charCount = 0; - int pcCount = 0; - int detachedCount = 0; - int doorCount = 0; - int summonCount = 0; - int aiCount = 0; - for (WorldObject obj : World.getInstance().getVisibleObjects()) - { - if (obj == null) - { - continue; - } - if (obj.isCreature() && ((Creature) obj).hasAI()) - { - aiCount++; - } - if (obj.isItem()) - { - if (((Item) obj).getItemLocation() == ItemLocation.VOID) - { - itemVoidCount++; - } - else - { - itemCount++; - } - } - else if (obj.isMonster()) - { - monsterCount++; - if (((Monster) obj).hasMinions()) - { - minionCount += ((Monster) obj).getMinionList().countSpawnedMinions(); - minionsGroupCount += ((Monster) obj).getMinionList().lazyCountSpawnedMinionsGroups(); - } - } - else if (obj.isNpc()) - { - npcCount++; - } - else if (obj.isPlayer()) - { - pcCount++; - if ((((Player) obj).getClient() != null) && ((Player) obj).getClient().isDetached()) - { - detachedCount++; - } - } - else if (obj.isSummon()) - { - summonCount++; - } - else if (obj.isDoor()) - { - doorCount++; - } - else if (obj.isCreature()) - { - charCount++; - } - } - final StringBuilder sb = new StringBuilder(); - sb.append("Server Status: "); - sb.append("\r\n ---> Player Count: " + playerCount + "/" + max); - sb.append("\r\n ---> Offline Count: " + detachedCount + "/" + playerCount); - sb.append("\r\n +--> Object Count: " + objectCount); - sb.append("\r\n +--> AI Count: " + aiCount); - sb.append("\r\n +.... Item(Void): " + itemVoidCount); - sb.append("\r\n +.......... Item: " + itemCount); - sb.append("\r\n +....... Monster: " + monsterCount); - sb.append("\r\n +......... Minions: " + minionCount); - sb.append("\r\n +.. Minions Groups: " + minionsGroupCount); - sb.append("\r\n +........... Npc: " + npcCount); - sb.append("\r\n +............ Player: " + pcCount); - sb.append("\r\n +........ Summon: " + summonCount); - sb.append("\r\n +.......... Door: " + doorCount); - sb.append("\r\n +.......... Creature: " + charCount); - sb.append("\r\n ---> Ingame Time: " + gameTime()); - sb.append("\r\n ---> Server Uptime: " + GameServer.getInstance().getUptime()); - sb.append("\r\n ---> GM Count: " + getOnlineGMS()); - sb.append("\r\n ---> Threads: " + Thread.activeCount()); - sb.append("\r\n RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576)); // 1024 * 1024 = 1048576 - sb.append("\r\n"); - - return sb.toString(); - } - - private static int getOnlineGMS() - { - return AdminData.getInstance().getAllGms(true).size(); - } - - private static String gameTime() - { - final int t = GameTimeTaskManager.getInstance().getGameTime(); - final int h = t / 60; - final int m = t % 60; - final SimpleDateFormat format = new SimpleDateFormat("H:mm"); - final Calendar cal = Calendar.getInstance(); - cal.set(Calendar.HOUR_OF_DAY, h); - cal.set(Calendar.MINUTE, m); - return format.format(cal.getTime()); - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ForceGC.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ForceGC.java deleted file mode 100644 index 508b268c3d..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ForceGC.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class ForceGC implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "forcegc"; - } - - @Override - public String getUsage() - { - return "ForceGC"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - System.gc(); - return "RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576); - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Memusage.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Memusage.java deleted file mode 100644 index 529a173eef..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Memusage.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import java.text.DecimalFormat; - -import org.l2jmobius.Config; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Memusage implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "memusage"; - } - - @Override - public String getUsage() - { - return "MemUsage"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - final double max = Runtime.getRuntime().maxMemory() / 1024; // maxMemory is the upper - // limit the jvm can use - final double allocated = Runtime.getRuntime().totalMemory() / 1024; // totalMemory the - // size of the current allocation pool - final double nonAllocated = max - allocated; // non allocated memory till jvm limit - final double cached = Runtime.getRuntime().freeMemory() / 1024; // freeMemory the - // unused memory in the allocation pool - final double used = allocated - cached; // really used memory - final double useable = max - used; // allocated, but non-used and non-allocated memory - final StringBuilder sb = new StringBuilder(); - final DecimalFormat df = new DecimalFormat(" (0.0000'%')"); - final DecimalFormat df2 = new DecimalFormat(" # 'KB'"); - sb.append("+----" + Config.EOL); // ... - sb.append("| Allowed Memory:" + df2.format(max) + Config.EOL); - sb.append("| |= Allocated Memory:" + df2.format(allocated) + df.format((allocated / max) * 100) + Config.EOL); - sb.append("| |= Non-Allocated Memory:" + df2.format(nonAllocated) + df.format((nonAllocated / max) * 100) + Config.EOL); - sb.append("| Allocated Memory:" + df2.format(allocated) + Config.EOL); - sb.append("| |= Used Memory:" + df2.format(used) + df.format((used / max) * 100) + Config.EOL); - sb.append("| |= Unused (cached) Memory:" + df2.format(cached) + df.format((cached / max) * 100) + Config.EOL); - sb.append("| Useable Memory:" + df2.format(useable) + df.format((useable / max) * 100) + Config.EOL); // ... - sb.append("+----" + Config.EOL); - return sb.toString(); - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Performance.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Performance.java deleted file mode 100644 index 8c632dfa0b..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Performance.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import org.l2jmobius.Config; -import org.l2jmobius.commons.threads.ThreadPool; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Performance implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "performance"; - } - - @Override - public String getUsage() - { - return "Performance"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - // ThreadPoolManager.purge(); - final StringBuilder sb = new StringBuilder(); - for (String line : ThreadPool.getStats()) - { - sb.append(line + Config.EOL); - } - return sb.toString(); - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Purge.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Purge.java deleted file mode 100644 index 72aab3d598..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Purge.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import org.l2jmobius.Config; -import org.l2jmobius.commons.threads.ThreadPool; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Purge implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "purge"; - } - - @Override - public String getUsage() - { - return "Purge"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - ThreadPool.purge(); - final StringBuilder sb = new StringBuilder("STATUS OF THREAD POOLS AFTER PURGE COMMAND:" + Config.EOL); - for (String line : ThreadPool.getStats()) - { - sb.append(line + Config.EOL); - } - return sb.toString(); - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java deleted file mode 100644 index 3bd803e2c8..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/Reload.java +++ /dev/null @@ -1,226 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import java.io.File; -import java.nio.file.Paths; -import java.util.logging.Level; -import java.util.logging.Logger; - -import org.l2jmobius.Config; -import org.l2jmobius.commons.enums.ServerMode; -import org.l2jmobius.gameserver.cache.HtmCache; -import org.l2jmobius.gameserver.data.ItemTable; -import org.l2jmobius.gameserver.data.sql.CrestTable; -import org.l2jmobius.gameserver.data.xml.AdminData; -import org.l2jmobius.gameserver.data.xml.ArmorSetData; -import org.l2jmobius.gameserver.data.xml.BuyListData; -import org.l2jmobius.gameserver.data.xml.DoorData; -import org.l2jmobius.gameserver.data.xml.EnchantItemData; -import org.l2jmobius.gameserver.data.xml.EnchantItemGroupsData; -import org.l2jmobius.gameserver.data.xml.MultisellData; -import org.l2jmobius.gameserver.data.xml.NpcData; -import org.l2jmobius.gameserver.data.xml.SkillData; -import org.l2jmobius.gameserver.data.xml.TransformData; -import org.l2jmobius.gameserver.instancemanager.QuestManager; -import org.l2jmobius.gameserver.instancemanager.WalkingManager; -import org.l2jmobius.gameserver.instancemanager.ZoneManager; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.scripting.ScriptEngineManager; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class Reload implements ITelnetCommand -{ - private static final Logger LOGGER = Logger.getLogger(Reload.class.getName()); - - @Override - public String getCommand() - { - return "reload"; - } - - @Override - public String getUsage() - { - return "Reload "; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - if ((args.length == 0) || args[0].isEmpty()) - { - return null; - } - switch (args[0]) - { - case "config": - { - Config.load(ServerMode.GAME); - return "Telnet Admin: Reloaded Configs."; - } - case "access": - { - AdminData.getInstance().load(); - return "Telnet Admin: Reloaded Access."; - } - case "npc": - { - NpcData.getInstance().load(); - return "Telnet Admin: Reloaded Npcs."; - } - case "quest": - { - if (args.length > 1) - { - final String value = args[1]; - if (!Util.isDigit(value)) - { - QuestManager.getInstance().reload(value); - return "Telnet Admin: Reloaded Quest Name:" + value + "."; - } - final int questId = Integer.parseInt(value); - QuestManager.getInstance().reload(questId); - return "Telnet Admin: Reloaded Quest ID:" + questId + "."; - } - QuestManager.getInstance().reloadAllScripts(); - return "Telnet Admin: Reloaded Quests."; - } - case "walker": - { - WalkingManager.getInstance().load(); - return "Telnet Admin: Reloaded Walkers."; - } - case "htm": - case "html": - { - if (args.length > 1) - { - final String path = args[1]; - final File file = new File(Config.DATAPACK_ROOT, "data/html/" + path); - if (file.exists()) - { - HtmCache.getInstance().reload(file); - return "Telnet Admin: Reloaded Htm File:" + file.getName() + "."; - } - return "File or Directory does not exist."; - } - HtmCache.getInstance().reload(); - return "Cache[HTML]: " + HtmCache.getInstance().getMemoryUsage() + " megabytes on " + HtmCache.getInstance().getLoadedFiles() + " files loaded"; - } - case "multisell": - { - MultisellData.getInstance().load(); - return "Telnet Admin: Reloaded Multisells."; - } - case "buylist": - { - BuyListData.getInstance().load(); - return "Telnet Admin: Reloaded Buylists."; - } - case "skill": - { - SkillData.getInstance().reload(); - return "Telnet Admin: Reloaded Skills."; - } - case "item": - { - ItemTable.getInstance().reload(); - return "Telnet Admin: Reloaded Items."; - } - case "door": - { - DoorData.getInstance().load(); - return "Telnet Admin: Reloaded Doors."; - } - case "zone": - { - ZoneManager.getInstance().reload(); - return "Telnet Admin: Reloaded Zones."; - } - case "crest": - { - CrestTable.getInstance().load(); - return "Telnet Admin: Reloaded Crests."; - } - case "effect": - { - try - { - ScriptEngineManager.getInstance().executeScript(ScriptEngineManager.EFFECT_MASTER_HANDLER_FILE); - return "Telnet Admin: Reloaded effect master handler."; - } - catch (Exception e) - { - LOGGER.log(Level.WARNING, "Failed executing effect master handler!", e); - return "Error reloading effect master handler: " + e.getMessage(); - } - } - case "handler": - { - try - { - ScriptEngineManager.getInstance().executeScript(ScriptEngineManager.MASTER_HANDLER_FILE); - return "Telnet Admin: Reloaded master handler."; - } - catch (Exception e) - { - LOGGER.log(Level.WARNING, "Failed executing master handler!", e); - return "Error reloading master handler: " + e.getMessage(); - } - } - case "enchant": - { - EnchantItemGroupsData.getInstance().load(); - EnchantItemData.getInstance().load(); - return "Telnet Admin: Reloaded item enchanting data."; - } - case "transform": - { - TransformData.getInstance().load(); - return "Telnet Admin: Reloaded transform data."; - } - case "sets": - { - ArmorSetData.getInstance().load(); - return "Telnet Admin: Reloaded Armor sets data."; - } - case "script": - { - if (args.length < 2) - { - return "Syntax: reload script "; - } - try - { - ScriptEngineManager.getInstance().executeScript(Paths.get(args[1])); - return "Script " + args[1] + " has been reloaded successfuly."; - } - catch (Exception e) - { - return "Couldn't reload script: " + args[1] + " err: " + e.getMessage(); - } - } - } - return null; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerAbort.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerAbort.java deleted file mode 100644 index e29c3afb1d..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerAbort.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import org.l2jmobius.gameserver.Shutdown; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class ServerAbort implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "abort"; - } - - @Override - public String getUsage() - { - return "Abort"; - } - - @Override - public String handle(ChannelHandlerContext ctx, String[] args) - { - Shutdown.getInstance().abort(null); - return "Server shutdown/restart aborted!"; - } -} diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerRestart.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerRestart.java deleted file mode 100644 index e9a57010a0..0000000000 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/telnethandlers/server/ServerRestart.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * 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 . - */ -package handlers.telnethandlers.server; - -import org.l2jmobius.gameserver.Shutdown; -import org.l2jmobius.gameserver.network.telnet.ITelnetCommand; -import org.l2jmobius.gameserver.util.Util; - -import io.netty.channel.ChannelHandlerContext; - -/** - * @author UnAfraid - */ -public class ServerRestart implements ITelnetCommand -{ - @Override - public String getCommand() - { - return "restart"; - } - - @Override - public String getUsage() - { - return "Restart