From 56bd1668752d0833063aa38c430b84eee653cdb3 Mon Sep 17 00:00:00 2001 From: dank074 Date: Tue, 19 Oct 2021 20:54:13 -0500 Subject: [PATCH] changed more packet names --- src/nitro/communication/NitroMessages.ts | 8 ++++---- .../modtool/ModeratorInitMessageEvent.ts | 16 ++++++++++++++++ .../incoming/modtool/ModtoolMainEvent.ts | 16 ---------------- .../messages/incoming/modtool/index.ts | 2 +- ...tComposer.ts => ModMessageMessageComposer.ts} | 4 +++- .../messages/outgoing/modtool/index.ts | 2 +- ...inParser.ts => ModeratorInitMessageParser.ts} | 2 +- .../messages/parser/modtool/index.ts | 2 +- 8 files changed, 27 insertions(+), 25 deletions(-) create mode 100644 src/nitro/communication/messages/incoming/modtool/ModeratorInitMessageEvent.ts delete mode 100644 src/nitro/communication/messages/incoming/modtool/ModtoolMainEvent.ts rename src/nitro/communication/messages/outgoing/modtool/{ModtoolEventAlertComposer.ts => ModMessageMessageComposer.ts} (80%) rename src/nitro/communication/messages/parser/modtool/{ModtoolMainParser.ts => ModeratorInitMessageParser.ts} (88%) diff --git a/src/nitro/communication/NitroMessages.ts b/src/nitro/communication/NitroMessages.ts index 2edc1d38..1cc0ec94 100644 --- a/src/nitro/communication/NitroMessages.ts +++ b/src/nitro/communication/NitroMessages.ts @@ -92,8 +92,8 @@ import { MarketPlaceOffersEvent } from './messages/incoming/marketplace/Marketpl import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/MarketplaceOwnOffersEvent'; import { UserBannedMessageEvent } from './messages/incoming/moderation'; import { ModeratorCautionEvent } from './messages/incoming/moderation/ModeratorCautionEvent'; +import { ModeratorInitMessageEvent } from './messages/incoming/modtool/ModeratorInitMessageEvent'; import { ModtoolCallForHelpTopicsEvent } from './messages/incoming/modtool/ModtoolCallForHelpTopicsEvent'; -import { ModtoolMainEvent } from './messages/incoming/modtool/ModtoolMainEvent'; import { ModtoolReceivedRoomsUserEvent } from './messages/incoming/modtool/ModtoolReceivedRoomsUserEvent'; import { ModtoolRoomChatlogEvent } from './messages/incoming/modtool/ModtoolRoomChatlogEvent'; import { ModtoolRoomInfoEvent } from './messages/incoming/modtool/ModtoolRoomInfoEvent'; @@ -324,7 +324,7 @@ import { GetPromoArticlesComposer } from './messages/outgoing/landingview/GetPro import { CommunityGoalVoteMessageComposer } from './messages/outgoing/landingview/votes/CommunityGoalVoteMessageComposer'; import { ModerateRoomMessageComposer } from './messages/outgoing/modtool/ModerateRoomMessageComposer'; import { ModeratorActionMessageComposer } from './messages/outgoing/modtool/ModeratorActionMessageComposer'; -import { ModtoolEventAlertComposer } from './messages/outgoing/modtool/ModtoolEventAlertComposer'; +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'; @@ -671,7 +671,7 @@ export class NitroMessages implements IMessageConfiguration this._events.set(IncomingHeader.MODTOOL_ROOM_CHATLOG, ModtoolRoomChatlogEvent); this._events.set(IncomingHeader.MODERATION_USER_INFO, ModtoolUserInfoEvent); this._events.set(IncomingHeader.MODERATION_TOPICS, ModtoolCallForHelpTopicsEvent); - this._events.set(IncomingHeader.MODERATION_TOOL, ModtoolMainEvent); + this._events.set(IncomingHeader.MODERATION_TOOL, ModeratorInitMessageEvent); this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent); // MYSTERY BOX @@ -1228,7 +1228,7 @@ export class NitroMessages implements IMessageConfiguration 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_ALERTEVENT, ModtoolEventAlertComposer); + 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_ROOM_ALERT, ModeratorActionMessageComposer); diff --git a/src/nitro/communication/messages/incoming/modtool/ModeratorInitMessageEvent.ts b/src/nitro/communication/messages/incoming/modtool/ModeratorInitMessageEvent.ts new file mode 100644 index 00000000..47e64435 --- /dev/null +++ b/src/nitro/communication/messages/incoming/modtool/ModeratorInitMessageEvent.ts @@ -0,0 +1,16 @@ +import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; +import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; +import { ModeratorInitMessageParser } from '../../parser/modtool/ModeratorInitMessageParser'; + +export class ModeratorInitMessageEvent extends MessageEvent implements IMessageEvent +{ + constructor(callBack: Function) + { + super(callBack, ModeratorInitMessageParser); + } + + public getParser(): ModeratorInitMessageParser + { + return this.parser as ModeratorInitMessageParser; + } +} diff --git a/src/nitro/communication/messages/incoming/modtool/ModtoolMainEvent.ts b/src/nitro/communication/messages/incoming/modtool/ModtoolMainEvent.ts deleted file mode 100644 index 4c13a3ab..00000000 --- a/src/nitro/communication/messages/incoming/modtool/ModtoolMainEvent.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent'; -import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent'; -import { ModtoolMainParser } from '../../parser/modtool/ModtoolMainParser'; - -export class ModtoolMainEvent extends MessageEvent implements IMessageEvent -{ - constructor(callBack: Function) - { - super(callBack, ModtoolMainParser); - } - - public getParser(): ModtoolMainParser - { - return this.parser as ModtoolMainParser; - } -} diff --git a/src/nitro/communication/messages/incoming/modtool/index.ts b/src/nitro/communication/messages/incoming/modtool/index.ts index b0aa05ca..8090ab06 100644 --- a/src/nitro/communication/messages/incoming/modtool/index.ts +++ b/src/nitro/communication/messages/incoming/modtool/index.ts @@ -1,5 +1,5 @@ +export * from './ModeratorInitMessageEvent'; export * from './ModtoolCallForHelpTopicsEvent'; -export * from './ModtoolMainEvent'; export * from './ModtoolReceivedRoomsUserEvent'; export * from './ModtoolRoomChatlogEvent'; export * from './ModtoolRoomInfoEvent'; diff --git a/src/nitro/communication/messages/outgoing/modtool/ModtoolEventAlertComposer.ts b/src/nitro/communication/messages/outgoing/modtool/ModMessageMessageComposer.ts similarity index 80% rename from src/nitro/communication/messages/outgoing/modtool/ModtoolEventAlertComposer.ts rename to src/nitro/communication/messages/outgoing/modtool/ModMessageMessageComposer.ts index 59d71974..b4a5f2e4 100644 --- a/src/nitro/communication/messages/outgoing/modtool/ModtoolEventAlertComposer.ts +++ b/src/nitro/communication/messages/outgoing/modtool/ModMessageMessageComposer.ts @@ -1,6 +1,6 @@ import { IMessageComposer } from '../../../../../core/communication/messages/IMessageComposer'; -export class ModtoolEventAlertComposer implements IMessageComposer +export class ModMessageMessageComposer implements IMessageComposer { private _data: any[] = []; @@ -8,6 +8,8 @@ export class ModtoolEventAlertComposer implements IMessageComposer { this._data.push(k); this._data.push(arg2); + this._data.push(''); + this._data.push(''); this._data.push(arg3); if(arg4 != -1) { diff --git a/src/nitro/communication/messages/outgoing/modtool/index.ts b/src/nitro/communication/messages/outgoing/modtool/index.ts index 904066bd..cc9df88f 100644 --- a/src/nitro/communication/messages/outgoing/modtool/index.ts +++ b/src/nitro/communication/messages/outgoing/modtool/index.ts @@ -1,6 +1,6 @@ export * from './ModerateRoomMessageComposer'; export * from './ModeratorActionMessageComposer'; -export * from './ModtoolEventAlertComposer'; +export * from './ModMessageMessageComposer'; export * from './ModtoolRequestRoomChatlogComposer'; export * from './ModtoolRequestRoomInfoComposer'; export * from './ModtoolRequestUserChatlogComposer'; diff --git a/src/nitro/communication/messages/parser/modtool/ModtoolMainParser.ts b/src/nitro/communication/messages/parser/modtool/ModeratorInitMessageParser.ts similarity index 88% rename from src/nitro/communication/messages/parser/modtool/ModtoolMainParser.ts rename to src/nitro/communication/messages/parser/modtool/ModeratorInitMessageParser.ts index e8329d33..602d4d00 100644 --- a/src/nitro/communication/messages/parser/modtool/ModtoolMainParser.ts +++ b/src/nitro/communication/messages/parser/modtool/ModeratorInitMessageParser.ts @@ -1,7 +1,7 @@ import { IMessageDataWrapper, IMessageParser } from '../../../../../core'; import { ModeratorInitData } from './utils/ModeratorInitData'; -export class ModtoolMainParser implements IMessageParser +export class ModeratorInitMessageParser implements IMessageParser { private _data: ModeratorInitData = null; public flush(): boolean diff --git a/src/nitro/communication/messages/parser/modtool/index.ts b/src/nitro/communication/messages/parser/modtool/index.ts index 98b61ea2..ca72f417 100644 --- a/src/nitro/communication/messages/parser/modtool/index.ts +++ b/src/nitro/communication/messages/parser/modtool/index.ts @@ -1,5 +1,5 @@ +export * from './ModeratorInitMessageParser'; export * from './ModtoolCFHTopicsParser'; -export * from './ModtoolMainParser'; export * from './ModtoolRoomChatlogParser'; export * from './ModtoolRoomInfoParser'; export * from './ModtoolRoomUsersParser';