diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index 1cc0ec94..b2b6c1a7 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -1,5 +1,5 @@ import { IMessageConfiguration } from '../../core/communication/messages/IMessageConfiguration'; -import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GroupBadgesComposer, GroupBadgesEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, MarketplaceBuyOfferComposer, MarketplaceRedeemCreditsComposer, MarketplaceRequesstItemStatsComposer, MarketplaceRequestComposer, MarketplaceRequestOffersComposer, MarketplaceRequestOwnItemsComposer, MarketplaceTakeItemBackComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PostMessageMessageComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages'; +import { AchievementNotificationMessageEvent, ActivityPointNotificationMessageEvent, AddJukeboxDiskComposer, ApproveNameMessageComposer, ApproveNameMessageEvent, AvailabilityTimeMessageEvent, BadgePointLimitsEvent, BadgeReceivedEvent, BonusRareInfoMessageEvent, BuildersClubFurniCountMessageEvent, BuildersClubSubscriptionStatusMessageEvent, BundleDiscountRulesetMessageEvent, ChangeUserNameMessageComposer, ChangeUserNameResultMessageEvent, CheckUserNameMessageComposer, CheckUserNameResultMessageEvent, CloseIssueDefaultActionMessageComposer, CloseIssuesMessageComposer, ClubGiftNotificationEvent, ControlYoutubeDisplayPlaybackMessageComposer, DirectSMSClubBuyAvailableMessageEvent, FigureUpdateEvent, ForwardToASubmittableRoomMessageComposer, ForwardToRandomCompetitionRoomMessageComposer, FurnitureGroupInfoComposer, GetBonusRareInfoMessageComposer, GetCatalogPageExpirationComposer, GetCatalogPageWithEarliestExpiryComposer, GetCfhChatlogMessageComposer, GetCurrentTimingCodeMessageComposer, GetDirectClubBuyAvailableComposer, GetForumsListMessageComposer, GetForumStatsMessageComposer, GetGiftMessageComposer, GetHabboBasicMembershipExtendOfferComposer, GetHabboClubExtendOfferMessageComposer, GetInterstitialMessageComposer, GetJukeboxPlayListMessageComposer, GetLimitedOfferAppearingNextComposer, GetMessagesMessageComposer, GetNextTargetedOfferComposer, GetNowPlayingMessageComposer, GetOfficialSongIdMessageComposer, GetRoomAdPurchaseInfoComposer, GetSeasonalCalendarDailyOfferComposer, GetSecondsUntilMessageComposer, GetSongInfoMessageComposer, GetSoundMachinePlayListMessageComposer, GetThreadMessageComposer, GetThreadsMessageComposer, GetUnreadForumsCountMessageComposer, GetUserSongDisksMessageComposer, GetYoutubeDisplayStatusMessageComposer, GoToFlatMessageComposer, GroupBadgesComposer, GroupBadgesEvent, HabboClubExtendOfferMessageEvent, HotelClosedAndOpensEvent, HotelClosesAndWillOpenAtEvent, HotelWillCloseInMinutesEvent, InfoFeedEnableMessageEvent, InterstitialMessageEvent, InterstitialShownMessageComposer, IsBadgeRequestFulfilledEvent, IsOfferGiftableMessageEvent, JukeboxPlayListFullMessageEvent, JukeboxSongDisksMessageEvent, LimitedOfferAppearingNextMessageEvent, MaintenanceStatusMessageEvent, MarkCatalogNewAdditionsPageOpenedComposer, MarketplaceBuyOfferComposer, MarketplaceRedeemCreditsComposer, MarketplaceRequesstItemStatsComposer, MarketplaceRequestComposer, MarketplaceRequestOffersComposer, MarketplaceRequestOwnItemsComposer, MarketplaceTakeItemBackComposer, ModerateMessageMessageComposer, ModerateThreadMessageComposer, ModToolPreferencesComposer, ModToolSanctionComposer, MysteryBoxKeysEvent, NotEnoughBalanceMessageEvent, NowPlayingMessageEvent, OfficialSongIdMessageEvent, OpenCampaignCalendarDoorAsStaffComposer, OpenCampaignCalendarDoorComposer, PetExperienceEvent, PetMountComposer, PetSupplementComposer, PickIssuesMessageComposer, PlayListMessageEvent, PlayListSongAddedMessageEvent, PostMessageMessageComposer, PurchaseBasicMembershipExtensionComposer, PurchaseRoomAdMessageComposer, PurchaseTargetedOfferComposer, PurchaseVipMembershipExtensionComposer, ReleaseIssuesMessageComposer, RemoveAllRightsMessageComposer, RemoveJukeboxDiskComposer, RemoveOwnRoomRightsRoomMessageComposer, RemovePetSaddleComposer, ResetPhoneNumberStateMessageComposer, RoomAdErrorEvent, RoomAdPurchaseInfoEvent, RoomCompetitionInitMessageComposer, RoomUnitGiveHandItemPetComposer, SeasonalCalendarDailyOfferMessageEvent, SellablePetPalettesMessageEvent, SetPhoneNumberVerificationStatusMessageComposer, SetTargetedOfferStateComposer, SetYoutubeDisplayPlaylistMessageComposer, ShopTargetedOfferViewedComposer, SubmitRoomToCompetitionMessageComposer, TalentTrackEvent, TargetedOfferEvent, TargetedOfferNotFoundEvent, TogglePetBreedingComposer, TogglePetRidingComposer, TraxSongInfoMessageEvent, TryPhoneNumberMessageComposer, UnseenResetCategoryComposer, UnseenResetItemsComposer, UpdateForumReadMarkerMessageComposer, UpdateForumSettingsMessageComposer, UpdateThreadMessageComposer, UsePetProductComposer, UserSongDisksInventoryMessageEvent, VerifyCodeMessageComposer, VoteForRoomMessageComposer, WardrobeMessageEvent } from './messages'; import { AvailabilityStatusMessageEvent } from './messages/incoming/availability/AvailabilityStatusMessageEvent'; import { BotAddedToInventoryEvent, BotInventoryMessageEvent, BotReceivedMessageEvent, BotRemovedFromInventoryEvent } from './messages/incoming/bots'; import { CfhSanctionMessageEvent, CfhTopicsInitEvent, SanctionStatusEvent } from './messages/incoming/callforhelp'; @@ -322,19 +322,20 @@ import { TradingOpenComposer } from './messages/outgoing/inventory/trading/Tradi import { TradingUnacceptComposer } from './messages/outgoing/inventory/trading/TradingUnacceptComposer'; import { GetPromoArticlesComposer } from './messages/outgoing/landingview/GetPromoArticlesComposer'; import { CommunityGoalVoteMessageComposer } from './messages/outgoing/landingview/votes/CommunityGoalVoteMessageComposer'; +import { DefaultSanctionMessageComposer } from './messages/outgoing/modtool/DefaultSanctionMessageComposer'; +import { GetModeratorRoomInfoMessageComposer } from './messages/outgoing/modtool/GetModeratorRoomInfoMessageComposer'; +import { GetModeratorUserInfoMessageComposer } from './messages/outgoing/modtool/GetModeratorUserInfoMessageComposer'; +import { GetRoomChatlogMessageComposer } from './messages/outgoing/modtool/GetRoomChatlogMessageComposer'; +import { GetRoomVisitsMessageComposer } from './messages/outgoing/modtool/GetRoomVisitsMessageComposer'; +import { GetUserChatlogMessageComposer } from './messages/outgoing/modtool/GetUserChatlogMessageComposer'; +import { ModAlertMessageComposer } from './messages/outgoing/modtool/ModAlertMessageComposer'; +import { ModBanMessageComposer } from './messages/outgoing/modtool/ModBanMessageComposer'; import { ModerateRoomMessageComposer } from './messages/outgoing/modtool/ModerateRoomMessageComposer'; import { ModeratorActionMessageComposer } from './messages/outgoing/modtool/ModeratorActionMessageComposer'; +import { ModKickMessageComposer } from './messages/outgoing/modtool/ModKickMessageComposer'; import { ModMessageMessageComposer } from './messages/outgoing/modtool/ModMessageMessageComposer'; -import { ModtoolRequestRoomChatlogComposer } from './messages/outgoing/modtool/ModtoolRequestRoomChatlogComposer'; -import { ModtoolRequestRoomInfoComposer } from './messages/outgoing/modtool/ModtoolRequestRoomInfoComposer'; -import { ModtoolRequestUserChatlogComposer } from './messages/outgoing/modtool/ModtoolRequestUserChatlogComposer'; -import { ModtoolRequestUserInfoComposer } from './messages/outgoing/modtool/ModtoolRequestUserInfoComposer'; -import { ModtoolRequestUserRoomsComposer } from './messages/outgoing/modtool/ModtoolRequestUserRoomsComposer'; -import { ModtoolSanctionAlertComposer } from './messages/outgoing/modtool/ModtoolSanctionAlertComposer'; -import { ModtoolSanctionBanComposer } from './messages/outgoing/modtool/ModtoolSanctionBanComposer'; -import { ModtoolSanctionKickComposer } from './messages/outgoing/modtool/ModtoolSanctionKickComposer'; -import { ModtoolSanctionMuteComposer } from './messages/outgoing/modtool/ModtoolSanctionMuteComposer'; -import { ModtoolSanctionTradelockComposer } from './messages/outgoing/modtool/ModtoolSanctionTradelockComposer'; +import { ModMuteMessageComposer } from './messages/outgoing/modtool/ModMuteMessageComposer'; +import { ModTradingLockMessageComposer } from './messages/outgoing/modtool/ModTradingLockMessageComposer'; import { ConvertGlobalRoomIdMessageComposer } from './messages/outgoing/navigator/ConvertGlobalRoomIdComposer'; import { NavigatorCategoriesComposer } from './messages/outgoing/navigator/NavigatorCategoriesComposer'; import { NavigatorCategoryListModeComposer } from './messages/outgoing/navigator/NavigatorCategoryListModeComposer'; @@ -1219,19 +1220,27 @@ export class NitroMessages implements IMessageConfiguration this._composers.set(OutgoingHeader.USER_SUBSCRIPTION, UserSubscriptionComposer); // MODTOOL - this._composers.set(OutgoingHeader.MODTOOL_REQUEST_ROOM_INFO, ModtoolRequestRoomInfoComposer); + this._composers.set(OutgoingHeader.MODTOOL_REQUEST_ROOM_INFO, GetModeratorRoomInfoMessageComposer); this._composers.set(OutgoingHeader.MODTOOL_CHANGE_ROOM_SETTINGS, ModerateRoomMessageComposer); - this._composers.set(OutgoingHeader.MODTOOL_REQUEST_USER_CHATLOG, ModtoolRequestUserChatlogComposer); - this._composers.set(OutgoingHeader.MODTOOL_REQUEST_ROOM_CHATLOG, ModtoolRequestRoomChatlogComposer); - this._composers.set(OutgoingHeader.MOD_TOOL_USER_INFO, ModtoolRequestUserInfoComposer); - this._composers.set(OutgoingHeader.MODTOOL_SANCTION_ALERT, ModtoolSanctionAlertComposer); - this._composers.set(OutgoingHeader.MODTOOL_SANCTION_BAN, ModtoolSanctionBanComposer); - this._composers.set(OutgoingHeader.MODTOOL_SANCTION_KICK, ModtoolSanctionKickComposer); - this._composers.set(OutgoingHeader.MODTOOL_SANCTION_TRADELOCK, ModtoolSanctionTradelockComposer); + this._composers.set(OutgoingHeader.MODTOOL_REQUEST_USER_CHATLOG, GetUserChatlogMessageComposer); + this._composers.set(OutgoingHeader.MODTOOL_REQUEST_ROOM_CHATLOG, GetRoomChatlogMessageComposer); + this._composers.set(OutgoingHeader.MOD_TOOL_USER_INFO, GetModeratorUserInfoMessageComposer); + this._composers.set(OutgoingHeader.MODTOOL_SANCTION_ALERT, ModAlertMessageComposer); + this._composers.set(OutgoingHeader.MODTOOL_SANCTION_BAN, ModBanMessageComposer); + this._composers.set(OutgoingHeader.MODTOOL_SANCTION_KICK, ModKickMessageComposer); + this._composers.set(OutgoingHeader.MODTOOL_SANCTION_TRADELOCK, ModTradingLockMessageComposer); this._composers.set(OutgoingHeader.MODTOOL_ALERTEVENT, ModMessageMessageComposer); - this._composers.set(OutgoingHeader.MODTOOL_SANCTION_MUTE, ModtoolSanctionMuteComposer); - this._composers.set(OutgoingHeader.MODTOOL_REQUEST_USER_ROOMS, ModtoolRequestUserRoomsComposer); + this._composers.set(OutgoingHeader.MODTOOL_SANCTION_MUTE, ModMuteMessageComposer); + this._composers.set(OutgoingHeader.MODTOOL_REQUEST_USER_ROOMS, GetRoomVisitsMessageComposer); this._composers.set(OutgoingHeader.MODTOOL_ROOM_ALERT, ModeratorActionMessageComposer); + this._composers.set(OutgoingHeader.CLOSE_ISSUE_DEFAULT_ACTION, CloseIssueDefaultActionMessageComposer); + this._composers.set(OutgoingHeader.CLOSE_ISSUES, CloseIssuesMessageComposer); + this._composers.set(OutgoingHeader.DEFAULT_SANCTION, DefaultSanctionMessageComposer); + this._composers.set(OutgoingHeader.GET_CFH_CHATLOG, GetCfhChatlogMessageComposer); + this._composers.set(OutgoingHeader.MODTOOL_PREFERENCES, ModToolPreferencesComposer); + this._composers.set(OutgoingHeader.MODTOOL_SANCTION, ModToolSanctionComposer); + this._composers.set(OutgoingHeader.PICK_ISSUES, PickIssuesMessageComposer); + this._composers.set(OutgoingHeader.RELEASE_ISSUES, ReleaseIssuesMessageComposer); // SETTINGS this._composers.set(OutgoingHeader.USER_SETTINGS_CAMERA, UserSettingsCameraFollowComposer); diff --git a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts index 4a753d5d..87de70dd 100644 --- a/src/nitro/communication/messages/outgoing/OutgoingHeader.ts +++ b/src/nitro/communication/messages/outgoing/OutgoingHeader.ts @@ -229,6 +229,14 @@ export class OutgoingHeader public static MODTOOL_SANCTION_MUTE = 1945; public static MODTOOL_REQUEST_USER_ROOMS = 3526; public static MODTOOL_ROOM_ALERT = 3842; + public static MODTOOL_PREFERENCES = 31; + public static CLOSE_ISSUE_DEFAULT_ACTION = 2717; + public static CLOSE_ISSUES = 2067; + public static DEFAULT_SANCTION = 1681; + public static GET_CFH_CHATLOG = 211; + public static MODTOOL_SANCTION = 1392; + public static PICK_ISSUES = 15; + public static RELEASE_ISSUES = 1572; public static CONVERT_GLOBAL_ROOM_ID = 314; public static REQUEST_SELL_ITEM = 848; public static REQUEST_MARKETPLACE_ITEM_STATS = 3288; diff --git a/src/nitro/communication/messages/outgoing/modtool/CloseIssueDefaultActionMessageComposer.ts b/src/nitro/communication/messages/outgoing/modtool/CloseIssueDefaultActionMessageComposer.ts new file mode 100644 index 00000000..33f481e5 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/CloseIssueDefaultActionMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class CloseIssueDefaultActionMessageComposer implements IMessageComposer +{ + private _data: number[]; + + constructor(k: number, issueIds: number[], _arg_2: number) + { + this._data = [ k, issueIds.length, ...issueIds, _arg_2 ]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/CloseIssuesMessageComposer.ts b/src/nitro/communication/messages/outgoing/modtool/CloseIssuesMessageComposer.ts new file mode 100644 index 00000000..c707dd56 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/CloseIssuesMessageComposer.ts @@ -0,0 +1,22 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + + +export class CloseIssuesMessageComposer implements IMessageComposer +{ + private _data: number[]; + + constructor(issueIds: number[], _arg_2: number) + { + this._data = [ _arg_2, issueIds.length, ...issueIds]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/DefaultSanctionMessageComposer.ts b/src/nitro/communication/messages/outgoing/modtool/DefaultSanctionMessageComposer.ts new file mode 100644 index 00000000..dee107e6 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/DefaultSanctionMessageComposer.ts @@ -0,0 +1,26 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { ModBanMessageComposer } from './ModBanMessageComposer'; + +export class DefaultSanctionMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:number, _arg_2:number, _arg_3:string, _arg_4:number = -1) + { + this._data = [k, _arg_2, _arg_3]; + if(_arg_4 != ModBanMessageComposer.NO_ISSUE_ID) + { + this._data.push(_arg_4); + } + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/GetCfhChatlogMessageComposer.ts b/src/nitro/communication/messages/outgoing/modtool/GetCfhChatlogMessageComposer.ts new file mode 100644 index 00000000..ad124466 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/GetCfhChatlogMessageComposer.ts @@ -0,0 +1,22 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + + +export class GetCfhChatlogMessageComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k: number) + { + this._data = [k]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestRoomInfoComposer.ts b/src/nitro/communication/messages/outgoing/modtool/GetModeratorRoomInfoMessageComposer.ts similarity index 56% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolRequestRoomInfoComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/GetModeratorRoomInfoMessageComposer.ts index 1dbd40d0..e6d04fb4 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestRoomInfoComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/GetModeratorRoomInfoMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolRequestRoomInfoComposer implements IMessageComposer> +export class GetModeratorRoomInfoMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor(roomId: number) { diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserChatlogComposer.ts b/src/nitro/communication/messages/outgoing/modtool/GetModeratorUserInfoMessageComposer.ts similarity index 56% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserChatlogComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/GetModeratorUserInfoMessageComposer.ts index b1634684..631ddcd6 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserChatlogComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/GetModeratorUserInfoMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolRequestUserChatlogComposer implements IMessageComposer> +export class GetModeratorUserInfoMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor(userId: number) { diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestRoomChatlogComposer.ts b/src/nitro/communication/messages/outgoing/modtool/GetRoomChatlogMessageComposer.ts similarity index 59% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolRequestRoomChatlogComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/GetRoomChatlogMessageComposer.ts index 3a87a54e..94fea2e7 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestRoomChatlogComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/GetRoomChatlogMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolRequestRoomChatlogComposer implements IMessageComposer> +export class GetRoomChatlogMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor(roomId: number, useless: number = 0) { diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserRoomsComposer.ts b/src/nitro/communication/messages/outgoing/modtool/GetRoomVisitsMessageComposer.ts similarity index 57% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserRoomsComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/GetRoomVisitsMessageComposer.ts index ed99c4cc..f4719fa4 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserRoomsComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/GetRoomVisitsMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolRequestUserRoomsComposer implements IMessageComposer> +export class GetRoomVisitsMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor(k: number) { diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserInfoComposer.ts b/src/nitro/communication/messages/outgoing/modtool/GetUserChatlogMessageComposer.ts similarity index 58% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserInfoComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/GetUserChatlogMessageComposer.ts index c29f16fb..015c32ff 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolRequestUserInfoComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/GetUserChatlogMessageComposer.ts @@ -1,8 +1,8 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolRequestUserInfoComposer implements IMessageComposer> +export class GetUserChatlogMessageComposer implements IMessageComposer> { - private _data: ConstructorParameters; + private _data: ConstructorParameters; constructor(userId: number) { diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionMuteComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModAlertMessageComposer.ts similarity index 51% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionMuteComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/ModAlertMessageComposer.ts index b6a67e69..0bbb1b35 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionMuteComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/ModAlertMessageComposer.ts @@ -1,15 +1,14 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { ModBanMessageComposer } from './ModBanMessageComposer'; -export class ModtoolSanctionMuteComposer implements IMessageComposer +export class ModAlertMessageComposer implements IMessageComposer> { - private _data: any[] = []; + private _data: ConstructorParameters; constructor(k: number, arg2: string, arg3: number, arg4: number = -1) { - this._data.push(k); - this._data.push(arg2); - this._data.push(arg3); - if(arg4 != -1) + this._data = [k, arg2, arg3]; + if(arg4 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(arg4); } diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionBanComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModBanMessageComposer.ts similarity index 54% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionBanComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/ModBanMessageComposer.ts index 9e0b50cb..2340e70b 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionBanComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/ModBanMessageComposer.ts @@ -1,17 +1,15 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolSanctionBanComposer implements IMessageComposer +export class ModBanMessageComposer implements IMessageComposer> { - private _data: any[] = []; + public static readonly NO_ISSUE_ID = -1; + + private _data: ConstructorParameters; constructor(k: number, arg2: string, arg3: number, arg4: number, arg5: boolean, arg6: number = -1) { - this._data.push(k); - this._data.push(arg2); - this._data.push(arg3); - this._data.push(arg4); - this._data.push(arg5); - if(arg6 != -1) + this._data = [k, arg2, arg3, arg4, arg5]; + if(arg6 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(arg6); } diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionKickComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModKickMessageComposer.ts similarity index 52% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionKickComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/ModKickMessageComposer.ts index 1b5bd86d..bdb77231 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionKickComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/ModKickMessageComposer.ts @@ -1,15 +1,15 @@ +import { ModBanMessageComposer } from '..'; import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolSanctionKickComposer implements IMessageComposer +export class ModKickMessageComposer implements IMessageComposer> { - private _data: any[] = []; + private _data: ConstructorParameters; constructor(k: number, arg2: string, arg3: number, arg4: number = -1) { - this._data.push(k); - this._data.push(arg2); - this._data.push(arg3); - if(arg4 != -1) + this._data = [k, arg2, arg3]; + + if(arg4 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(arg4); } diff --git a/src/nitro/communication/messages/outgoing/modtool/ModMessageMessageComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModMessageMessageComposer.ts index b4a5f2e4..154bc350 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModMessageMessageComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/ModMessageMessageComposer.ts @@ -1,4 +1,5 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { ModBanMessageComposer } from './ModBanMessageComposer'; export class ModMessageMessageComposer implements IMessageComposer { @@ -11,7 +12,7 @@ export class ModMessageMessageComposer implements IMessageComposer this._data.push(''); this._data.push(''); this._data.push(arg3); - if(arg4 != -1) + if(arg4 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(arg4); } diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionAlertComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModMuteMessageComposer.ts similarity index 53% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionAlertComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/ModMuteMessageComposer.ts index 0bb5ee24..b60c1b0a 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionAlertComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/ModMuteMessageComposer.ts @@ -1,15 +1,14 @@ +import { ModBanMessageComposer } from '.'; import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolSanctionAlertComposer implements IMessageComposer +export class ModMuteMessageComposer implements IMessageComposer> { - private _data: any[] = []; + private _data: ConstructorParameters; constructor(k: number, arg2: string, arg3: number, arg4: number = -1) { - this._data.push(k); - this._data.push(arg2); - this._data.push(arg3); - if(arg4 != -1) + this._data = [k, arg2, arg3]; + if(arg4 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(arg4); } diff --git a/src/nitro/communication/messages/outgoing/modtool/ModToolPreferencesComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModToolPreferencesComposer.ts new file mode 100644 index 00000000..4adfc84d --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/ModToolPreferencesComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class ModToolPreferencesComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:number, _arg_2:number, _arg_3:number, _arg_4:number) + { + this._data = [k, _arg_2, _arg_3, _arg_4]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/ModToolSanctionComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModToolSanctionComposer.ts new file mode 100644 index 00000000..efc2d781 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/ModToolSanctionComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class ModToolSanctionComposer implements IMessageComposer> +{ + private _data: ConstructorParameters; + + constructor(k:number, _arg_2:number, _arg_3:number) + { + this._data = [k, _arg_2, _arg_3]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionTradelockComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModTradingLockMessageComposer.ts similarity index 50% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionTradelockComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/ModTradingLockMessageComposer.ts index bf7c0616..12ecfd43 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolSanctionTradelockComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/ModTradingLockMessageComposer.ts @@ -1,16 +1,15 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; +import { ModBanMessageComposer } from './ModBanMessageComposer'; -export class ModtoolSanctionTradelockComposer implements IMessageComposer +export class ModTradingLockMessageComposer implements IMessageComposer> { - private _data: any[] = []; + private _data: ConstructorParameters; constructor(k: number, arg2: string, arg3: number, arg4: number, arg5: number = -1) { - this._data.push(k); - this._data.push(arg2); - this._data.push(arg3); - this._data.push(arg4); - if(arg5 != -1) + this._data = [ k, arg2, arg3, arg4 ]; + + if(arg5 != ModBanMessageComposer.NO_ISSUE_ID) { this._data.push(arg5); } diff --git a/src/nitro/communication/messages/outgoing/modtool/PickIssuesMessageComposer.ts b/src/nitro/communication/messages/outgoing/modtool/PickIssuesMessageComposer.ts new file mode 100644 index 00000000..b731b870 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/PickIssuesMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class PickIssuesMessageComposer implements IMessageComposer +{ + private _data: any; + + constructor(k:number[], _arg_2:boolean, _arg_3:number, _arg_4:string) + { + this._data = [k.length, ...k, _arg_2, _arg_3, _arg_4]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/ReleaseIssuesMessageComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ReleaseIssuesMessageComposer.ts new file mode 100644 index 00000000..272ef328 --- /dev/null +++ b/src/nitro/communication/messages/outgoing/modtool/ReleaseIssuesMessageComposer.ts @@ -0,0 +1,21 @@ +import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; + +export class ReleaseIssuesMessageComposer implements IMessageComposer +{ + private _data: number[]; + + constructor(k: number[]) + { + this._data = [k.length, ...k]; + } + + public getMessageArray() + { + return this._data; + } + + public dispose(): void + { + return; + } +} diff --git a/src/nitro/communication/messages/outgoing/modtool/index.ts b/src/nitro/communication/messages/outgoing/modtool/index.ts index cc9df88f..6f357620 100644 --- a/src/nitro/communication/messages/outgoing/modtool/index.ts +++ b/src/nitro/communication/messages/outgoing/modtool/index.ts @@ -1,13 +1,21 @@ +export * from './CloseIssueDefaultActionMessageComposer'; +export * from './CloseIssuesMessageComposer'; +export * from './DefaultSanctionMessageComposer'; +export * from './GetCfhChatlogMessageComposer'; +export * from './GetModeratorRoomInfoMessageComposer'; +export * from './GetModeratorUserInfoMessageComposer'; +export * from './GetRoomChatlogMessageComposer'; +export * from './GetRoomVisitsMessageComposer'; +export * from './GetUserChatlogMessageComposer'; +export * from './ModAlertMessageComposer'; +export * from './ModBanMessageComposer'; export * from './ModerateRoomMessageComposer'; export * from './ModeratorActionMessageComposer'; +export * from './ModKickMessageComposer'; export * from './ModMessageMessageComposer'; -export * from './ModtoolRequestRoomChatlogComposer'; -export * from './ModtoolRequestRoomInfoComposer'; -export * from './ModtoolRequestUserChatlogComposer'; -export * from './ModtoolRequestUserInfoComposer'; -export * from './ModtoolRequestUserRoomsComposer'; -export * from './ModtoolSanctionAlertComposer'; -export * from './ModtoolSanctionBanComposer'; -export * from './ModtoolSanctionKickComposer'; -export * from './ModtoolSanctionMuteComposer'; -export * from './ModtoolSanctionTradelockComposer'; +export * from './ModMuteMessageComposer'; +export * from './ModToolPreferencesComposer'; +export * from './ModToolSanctionComposer'; +export * from './ModTradingLockMessageComposer'; +export * from './PickIssuesMessageComposer'; +export * from './ReleaseIssuesMessageComposer'; diff --git a/src/nitro/communication/messages/parser/modtool/utils/IssueMessageData.ts b/src/nitro/communication/messages/parser/modtool/utils/IssueMessageData.ts index a779a5ef..54277789 100644 --- a/src/nitro/communication/messages/parser/modtool/utils/IssueMessageData.ts +++ b/src/nitro/communication/messages/parser/modtool/utils/IssueMessageData.ts @@ -1,3 +1,4 @@ +import { Nitro } from '../../../../../Nitro'; import { PatternMatchData } from './PatternMatchData'; export class IssueMessageData @@ -43,7 +44,7 @@ export class IssueMessageData this._message = _arg_14; this._chatRecordId = _arg_15; this._patterns = _arg_16; - this._creationTimeInMilliseconds = 0; //getTimer(); + this._creationTimeInMilliseconds = Nitro.instance.time; //getTimer() } public get issueId(): number