mirror of
https://github.com/billsonnn/nitro-renderer.git
synced 2025-01-18 22:36:27 +01:00
fixed more packets
This commit is contained in:
parent
bfb5684436
commit
909febebce
@ -90,7 +90,7 @@ import { MarketplaceItemStatsEvent } from './messages/incoming/marketplace/Marke
|
||||
import { MarketplaceMakeOfferResult } from './messages/incoming/marketplace/MarketplaceMakeOfferResult';
|
||||
import { MarketPlaceOffersEvent } from './messages/incoming/marketplace/MarketplaceOffersEvent';
|
||||
import { MarketplaceOwnOffersEvent } from './messages/incoming/marketplace/MarketplaceOwnOffersEvent';
|
||||
import { ModeratorInitMessageEvent, ModtoolCallForHelpTopicsEvent, ModtoolReceivedRoomsUserEvent, ModtoolRoomChatlogEvent, ModtoolRoomInfoEvent, ModtoolUserChatlogEvent, ModtoolUserInfoEvent, UserBannedMessageEvent } from './messages/incoming/moderation';
|
||||
import { CfhChatlogEvent, ModeratorInitMessageEvent, ModeratorRoomInfoEvent, ModtoolRoomChatlogEvent, ModtoolUserChatlogEvent, ModtoolUserInfoEvent, RoomVisitsEvent, UserBannedMessageEvent } from './messages/incoming/moderation';
|
||||
import { ModeratorCautionEvent } from './messages/incoming/moderation/ModeratorCautionEvent';
|
||||
import { NavigatorCategoriesEvent } from './messages/incoming/navigator/NavigatorCategoriesEvent';
|
||||
import { NavigatorCollapsedEvent } from './messages/incoming/navigator/NavigatorCollapsedEvent';
|
||||
@ -656,17 +656,15 @@ export class NitroMessages implements IMessageConfiguration
|
||||
this._events.set(IncomingHeader.MARKETPLACE_OWN_ITEMS, MarketplaceOwnOffersEvent);
|
||||
|
||||
// MODERATION
|
||||
this._events.set(IncomingHeader.MARKETPLACE_OWN_ITEMS, UserBannedMessageEvent);
|
||||
this._events.set(IncomingHeader.USER_BANNED, UserBannedMessageEvent);
|
||||
this._events.set(IncomingHeader.MODERATION_CAUTION, ModeratorCautionEvent);
|
||||
|
||||
// MODTOOL
|
||||
this._events.set(IncomingHeader.MODTOOL_ROOM_INFO, ModtoolRoomInfoEvent);
|
||||
this._events.set(IncomingHeader.MODTOOL_ROOM_INFO, ModeratorRoomInfoEvent);
|
||||
this._events.set(IncomingHeader.MODTOOL_USER_CHATLOG, ModtoolUserChatlogEvent);
|
||||
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, ModeratorInitMessageEvent);
|
||||
this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, ModtoolReceivedRoomsUserEvent);
|
||||
this._events.set(IncomingHeader.MODTOOL_VISITED_ROOMS_USER, RoomVisitsEvent);
|
||||
this._events.set(IncomingHeader.CFH_CHATLOG, CfhChatlogEvent);
|
||||
|
||||
// MYSTERY BOX
|
||||
this._events.set(IncomingHeader.MYSTERY_BOX_KEYS, MysteryBoxKeysEvent);
|
||||
|
@ -83,7 +83,6 @@ export class IncomingHeader
|
||||
public static MESSENGER_UPDATE = 2800;
|
||||
public static MODERATION_REPORT_DISABLED = 1651;
|
||||
public static MODERATION_TOOL = 2696;
|
||||
public static MODERATION_TOPICS = 325;
|
||||
public static MODERATION_USER_INFO = 2866;
|
||||
public static MOTD_MESSAGES = 2035;
|
||||
public static NAVIGATOR_CATEGORIES = 1562;
|
||||
@ -216,6 +215,7 @@ export class IncomingHeader
|
||||
public static MODTOOL_ROOM_INFO = 1333;
|
||||
public static MODTOOL_USER_CHATLOG = 3377;
|
||||
public static MODTOOL_ROOM_CHATLOG = 3434;
|
||||
public static CFH_CHATLOG = 607;
|
||||
public static LOVELOCK_FURNI_START = 3753;
|
||||
public static LOVELOCK_FURNI_FRIEND_COMFIRMED = 382;
|
||||
public static LOVELOCK_FURNI_FINISHED = 770;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class CallForHelpCategoryData
|
||||
{
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CfhTopicsInitMessageParser } from '../../parser/help/CfhTopicsInitMessageParser';
|
||||
|
||||
export class CfhTopicsInitEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CfhTopicsInitMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CfhTopicsInitMessageParser
|
||||
{
|
||||
return this.parser as CfhTopicsInitMessageParser;
|
||||
}
|
||||
}
|
@ -1,2 +1,4 @@
|
||||
export * from './CallForHelpCategoryData';
|
||||
export * from './CallForHelpResultMessageEvent';
|
||||
export * from './CfhTopicsInitEvent';
|
||||
export * from './TalentTrackEvent';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { ChatRecordData } from '../../parser/moderation/utils/ChatRecordData';
|
||||
import { ChatRecordData } from './ChatRecordData';
|
||||
|
||||
export class CfhChatlogData
|
||||
{
|
||||
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { CfhChatlogMessageParser } from '../../parser/moderation/CfhChatlogMessageParser';
|
||||
|
||||
export class CfhChatlogEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, CfhChatlogMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): CfhChatlogMessageParser
|
||||
{
|
||||
return this.parser as CfhChatlogMessageParser;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper } from '../../../../../..';
|
||||
import { ModtoolRoomChatlogLine } from './ModtoolRoomChatlogLine';
|
||||
import { IMessageDataWrapper } from '../../../../..';
|
||||
import { ChatlineData } from './ChatlineData';
|
||||
|
||||
export class ChatRecordData
|
||||
{
|
||||
@ -13,7 +13,7 @@ export class ChatRecordData
|
||||
|
||||
private _recordType:number;
|
||||
private _context:Map<string, any>;
|
||||
private _chatlog:ModtoolRoomChatlogLine[];
|
||||
private _chatlog:ChatlineData[];
|
||||
|
||||
constructor(wrapper: IMessageDataWrapper)
|
||||
{
|
||||
@ -54,7 +54,7 @@ export class ChatRecordData
|
||||
const message = wrapper.readString();
|
||||
const hasHighlighting = wrapper.readBoolean();
|
||||
|
||||
this._chatlog.push(new ModtoolRoomChatlogLine(timestamp, habboId, username, message, hasHighlighting));
|
||||
this._chatlog.push(new ChatlineData(timestamp, habboId, username, message, hasHighlighting));
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ export class ChatRecordData
|
||||
return this._context;
|
||||
}
|
||||
|
||||
public get chatlog():ModtoolRoomChatlogLine[]
|
||||
public get chatlog():ChatlineData[]
|
||||
{
|
||||
return this._chatlog;
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
import { IChatlog } from './IChatlog';
|
||||
|
||||
export class ModtoolRoomChatlogLine implements IChatlog
|
||||
export class ChatlineData
|
||||
{
|
||||
private readonly _timestamp: string;
|
||||
private readonly _habboId: number;
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ModeratorRoomInfoMessageParser } from '../../parser/moderation/ModeratorRoomInfoMessageParser';
|
||||
|
||||
export class ModeratorRoomInfoEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ModeratorRoomInfoMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): ModeratorRoomInfoMessageParser
|
||||
{
|
||||
return this.parser as ModeratorRoomInfoMessageParser;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class ModeratorUserInfoData
|
||||
{
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ModtoolCFHTopicsParser } from '../../parser/moderation/ModtoolCFHTopicsParser';
|
||||
|
||||
export class ModtoolCallForHelpTopicsEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ModtoolCFHTopicsParser);
|
||||
}
|
||||
|
||||
public getParser(): ModtoolCFHTopicsParser
|
||||
{
|
||||
return this.parser as ModtoolCFHTopicsParser;
|
||||
}
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ModtoolRoomUsersParser } from '../../parser/moderation/ModtoolRoomUsersParser';
|
||||
|
||||
export class ModtoolReceivedRoomsUserEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ModtoolRoomUsersParser);
|
||||
}
|
||||
|
||||
public getParser(): ModtoolRoomUsersParser
|
||||
{
|
||||
return this.parser as ModtoolRoomUsersParser;
|
||||
}
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ModtoolRoomChatlogParser } from '../../parser/moderation/ModtoolRoomChatlogParser';
|
||||
import { RoomChatlogMessageParser } from '../../parser/moderation/RoomChatlogMessageParser';
|
||||
|
||||
export class ModtoolRoomChatlogEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ModtoolRoomChatlogParser);
|
||||
super(callBack, RoomChatlogMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): ModtoolRoomChatlogParser
|
||||
public getParser(): RoomChatlogMessageParser
|
||||
{
|
||||
return this.parser as ModtoolRoomChatlogParser;
|
||||
return this.parser as RoomChatlogMessageParser;
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ModtoolRoomInfoParser } from '../../parser/moderation/ModtoolRoomInfoParser';
|
||||
|
||||
export class ModtoolRoomInfoEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ModtoolRoomInfoParser);
|
||||
}
|
||||
|
||||
public getParser(): ModtoolRoomInfoParser
|
||||
{
|
||||
return this.parser as ModtoolRoomInfoParser;
|
||||
}
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ModtoolUserChatlogParser } from '../../parser/moderation/ModtoolUserChatlogParser';
|
||||
import { UserChatlogMessageParser } from '../../parser/moderation/UserChatlogMessageParser';
|
||||
|
||||
export class ModtoolUserChatlogEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ModtoolUserChatlogParser);
|
||||
super(callBack, UserChatlogMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): ModtoolUserChatlogParser
|
||||
public getParser(): UserChatlogMessageParser
|
||||
{
|
||||
return this.parser as ModtoolUserChatlogParser;
|
||||
return this.parser as UserChatlogMessageParser;
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { ModtoolUserInfoParser } from '../../parser/moderation/ModtoolUserInfoParser';
|
||||
import { ModeratorUserInfoMessageParser } from '../../parser/moderation/ModeratorUserInfoMessageParser';
|
||||
|
||||
export class ModtoolUserInfoEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, ModtoolUserInfoParser);
|
||||
super(callBack, ModeratorUserInfoMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): ModtoolUserInfoParser
|
||||
public getParser(): ModeratorUserInfoMessageParser
|
||||
{
|
||||
return this.parser as ModtoolUserInfoParser;
|
||||
return this.parser as ModeratorUserInfoMessageParser;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,65 @@
|
||||
import { IDisposable } from '../../../../../core/common/disposable/IDisposable';
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
|
||||
export class RoomData implements IDisposable
|
||||
{
|
||||
private _exists:boolean;
|
||||
private _name:string;
|
||||
private _desc:string;
|
||||
private _tags:string[];
|
||||
private _disposed:boolean;
|
||||
|
||||
constructor(k:IMessageDataWrapper)
|
||||
{
|
||||
this._tags = [];
|
||||
this._exists = k.readBoolean();
|
||||
if(!this.exists)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this._name = k.readString();
|
||||
this._desc = k.readString();
|
||||
|
||||
const tagCount = k.readInt();
|
||||
|
||||
for(let i = 0; i < tagCount; i++)
|
||||
{
|
||||
this._tags.push(k.readString());
|
||||
}
|
||||
}
|
||||
|
||||
public get name():string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get desc():string
|
||||
{
|
||||
return this._desc;
|
||||
}
|
||||
|
||||
public get tags():string[]
|
||||
{
|
||||
return this._tags;
|
||||
}
|
||||
|
||||
public get exists():boolean
|
||||
{
|
||||
return this._exists;
|
||||
}
|
||||
|
||||
public get disposed():boolean
|
||||
{
|
||||
return this._disposed;
|
||||
}
|
||||
|
||||
public dispose():void
|
||||
{
|
||||
if(this._disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this._disposed = true;
|
||||
this._tags = null;
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
import { IDisposable } from '../../../../../core/common/disposable/IDisposable';
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { RoomData } from './RoomData';
|
||||
|
||||
export class RoomModerationData implements IDisposable
|
||||
{
|
||||
private _flatId:number;
|
||||
private _userCount:number;
|
||||
private _ownerInRoom:boolean;
|
||||
private _ownerId:number;
|
||||
private _ownerName:string;
|
||||
private _room:RoomData;
|
||||
private _disposed:boolean;
|
||||
|
||||
constructor(k:IMessageDataWrapper)
|
||||
{
|
||||
this._flatId = k.readInt();
|
||||
this._userCount = k.readInt();
|
||||
this._ownerInRoom = k.readBoolean();
|
||||
this._ownerId = k.readInt();
|
||||
this._ownerName = k.readString();
|
||||
this._room = new RoomData(k);
|
||||
}
|
||||
|
||||
public get flatId():number
|
||||
{
|
||||
return this._flatId;
|
||||
}
|
||||
|
||||
public get userCount():number
|
||||
{
|
||||
return this._userCount;
|
||||
}
|
||||
|
||||
public get ownerInRoom():boolean
|
||||
{
|
||||
return this._ownerInRoom;
|
||||
}
|
||||
|
||||
public get ownerId():number
|
||||
{
|
||||
return this._ownerId;
|
||||
}
|
||||
|
||||
public get ownerName():string
|
||||
{
|
||||
return this._ownerName;
|
||||
}
|
||||
|
||||
public get room():RoomData
|
||||
{
|
||||
return this._room;
|
||||
}
|
||||
|
||||
public get disposed():boolean
|
||||
{
|
||||
return this._disposed;
|
||||
}
|
||||
|
||||
public dispose():void
|
||||
{
|
||||
if(this._disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
this._disposed = true;
|
||||
if(this._room != null)
|
||||
{
|
||||
this._room.dispose();
|
||||
this._room = null;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
|
||||
export class RoomVisitData
|
||||
{
|
@ -1,8 +1,7 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
import { RoomVisitData } from './RoomVisitData';
|
||||
|
||||
|
||||
export class ModtoolRoomVisitedData
|
||||
export class RoomVisitsData
|
||||
{
|
||||
private _userId: number;
|
||||
private _userName: string;
|
@ -0,0 +1,16 @@
|
||||
import { IMessageEvent } from '../../../../../core/communication/messages/IMessageEvent';
|
||||
import { MessageEvent } from '../../../../../core/communication/messages/MessageEvent';
|
||||
import { RoomVisitsMessageParser } from '../../parser/moderation/RoomVisitsMessageParser';
|
||||
|
||||
export class RoomVisitsEvent extends MessageEvent implements IMessageEvent
|
||||
{
|
||||
constructor(callBack: Function)
|
||||
{
|
||||
super(callBack, RoomVisitsMessageParser);
|
||||
}
|
||||
|
||||
public getParser(): RoomVisitsMessageParser
|
||||
{
|
||||
return this.parser as RoomVisitsMessageParser;
|
||||
}
|
||||
}
|
@ -1,11 +1,18 @@
|
||||
export * from './CfhChatlogData';
|
||||
export * from './CfhChatlogEvent';
|
||||
export * from './ChatlineData';
|
||||
export * from './ChatRecordData';
|
||||
export * from './INamed';
|
||||
export * from './ModeratorCautionEvent';
|
||||
export * from './ModeratorInitMessageEvent';
|
||||
export * from './ModtoolCallForHelpTopicsEvent';
|
||||
export * from './ModtoolReceivedRoomsUserEvent';
|
||||
export * from './ModeratorRoomInfoEvent';
|
||||
export * from './ModeratorUserInfoData';
|
||||
export * from './ModtoolRoomChatlogEvent';
|
||||
export * from './ModtoolRoomInfoEvent';
|
||||
export * from './ModtoolUserChatlogEvent';
|
||||
export * from './ModtoolUserInfoEvent';
|
||||
export * from './RoomData';
|
||||
export * from './RoomModerationData';
|
||||
export * from './RoomVisitData';
|
||||
export * from './RoomVisitsData';
|
||||
export * from './RoomVisitsEvent';
|
||||
export * from './UserBannedMessageEvent';
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { CallForHelpCategoryData } from './utils/CallForHelpCategoryData';
|
||||
import { CallForHelpCategoryData } from '../../incoming/help/CallForHelpCategoryData';
|
||||
|
||||
export class ModtoolCFHTopicsParser implements IMessageParser
|
||||
export class CfhTopicsInitMessageParser implements IMessageParser
|
||||
{
|
||||
private _callForHelpCategories: CallForHelpCategoryData[];
|
||||
|
@ -1,3 +1,4 @@
|
||||
export * from './CallForHelpResultMessageParser';
|
||||
export * from './CfhTopicsInitMessageParser';
|
||||
export * from './common';
|
||||
export * from './TalentTrackParser';
|
||||
|
@ -0,0 +1,29 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||
import { CfhChatlogData } from '../../incoming/moderation/CfhChatlogData';
|
||||
|
||||
export class CfhChatlogMessageParser implements IMessageParser
|
||||
{
|
||||
private _data: CfhChatlogData;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._data = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._data = new CfhChatlogData(wrapper);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get data(): CfhChatlogData
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class IssueDeletedMessageParser implements IMessageParser
|
||||
{
|
||||
private _issueId: number;
|
||||
|
||||
public flush():boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k:IMessageDataWrapper):boolean
|
||||
{
|
||||
this._issueId = parseInt(k.readString());
|
||||
return true;
|
||||
}
|
||||
|
||||
public get issueId(): number
|
||||
{
|
||||
return this._issueId;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../../core';
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { IssueMessageData } from './IssueMessageData';
|
||||
import { PatternMatchData } from './PatternMatchData';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Nitro } from '../../../../../Nitro';
|
||||
import { Nitro } from '../../../../Nitro';
|
||||
import { PatternMatchData } from './PatternMatchData';
|
||||
|
||||
export class IssueMessageData
|
@ -0,0 +1,51 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||
import { IssueMessageData } from './IssueMessageData';
|
||||
|
||||
export class IssuePickFailedMessageParser implements IMessageParser
|
||||
{
|
||||
private _issues: IssueMessageData[];
|
||||
private _retryEnabled: boolean;
|
||||
private _retryCount: number;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._issues = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._issues = [];
|
||||
|
||||
const count = k.readInt();
|
||||
|
||||
for(let i = 0; i < count; i++)
|
||||
{
|
||||
const _local_4 = k.readInt();
|
||||
const _local_5 = k.readInt();
|
||||
const _local_6 = k.readString();
|
||||
const _local_7 = new IssueMessageData(_local_4, 0, 0, 0, 0, 0, 0, 0, null, 0, null, _local_5, _local_6, null, 0, []);
|
||||
this._issues.push(_local_7);
|
||||
}
|
||||
|
||||
this._retryEnabled = k.readBoolean();
|
||||
this._retryCount = k.readInt();
|
||||
return true;
|
||||
}
|
||||
|
||||
public get issues(): IssueMessageData[]
|
||||
{
|
||||
return this._issues;
|
||||
}
|
||||
|
||||
public get retryEnabled(): boolean
|
||||
{
|
||||
return this._retryEnabled;
|
||||
}
|
||||
|
||||
public get retryCount(): number
|
||||
{
|
||||
return this._retryCount;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class ModeratorActionResultMessageParser implements IMessageParser
|
||||
{
|
||||
private _userId:number;
|
||||
private _success:boolean;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._userId = -1;
|
||||
this._success = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._userId = wrapper.readInt();
|
||||
this._success = wrapper.readBoolean();
|
||||
return true;
|
||||
}
|
||||
|
||||
public get userId():number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public get success():boolean
|
||||
{
|
||||
return this._success;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
import { IssueInfoMessageParser } from './IssueInfoMessageParser';
|
||||
import { IssueMessageData } from './IssueMessageData';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { ModeratorInitData } from './utils/ModeratorInitData';
|
||||
import { ModeratorInitData } from './ModeratorInitData';
|
||||
|
||||
export class ModeratorInitMessageParser implements IMessageParser
|
||||
{
|
||||
|
@ -0,0 +1,36 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class ModeratorMessageParser implements IMessageParser
|
||||
{
|
||||
private _message:string;
|
||||
private _url:string;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._message = '';
|
||||
this._url = '';
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._message = wrapper.readString();
|
||||
this._url = wrapper.readString();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get message():string
|
||||
{
|
||||
return this._message;
|
||||
}
|
||||
|
||||
public get url():string
|
||||
{
|
||||
return this._url;
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { RoomModerationData } from '../../incoming/moderation/RoomModerationData';
|
||||
|
||||
export class ModeratorRoomInfoMessageParser implements IMessageParser
|
||||
{
|
||||
private _data:RoomModerationData;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._data = null;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._data = new RoomModerationData(wrapper);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get data():RoomModerationData
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
import { IMessageDataWrapper } from '../../../../../core/communication/messages/IMessageDataWrapper';
|
||||
import { IMessageParser } from '../../../../../core/communication/messages/IMessageParser';
|
||||
|
||||
export class ModeratorToolPreferencesMessageParser implements IMessageParser
|
||||
{
|
||||
private _windowX:number;
|
||||
private _windowY:number;
|
||||
private _windowWidth:number;
|
||||
private _windowHeight:number;
|
||||
|
||||
public flush():boolean
|
||||
{
|
||||
this._windowX = 0;
|
||||
this._windowY = 0;
|
||||
this._windowWidth = 0;
|
||||
this._windowHeight = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(k:IMessageDataWrapper):boolean
|
||||
{
|
||||
this._windowX = k.readInt();
|
||||
this._windowY = k.readInt();
|
||||
this._windowWidth = k.readInt();
|
||||
this._windowHeight = k.readInt();
|
||||
return true;
|
||||
}
|
||||
|
||||
public get windowX(): number
|
||||
{
|
||||
return this._windowX;
|
||||
}
|
||||
|
||||
public get windowY(): number
|
||||
{
|
||||
return this._windowY;
|
||||
}
|
||||
|
||||
public get windowWidth(): number
|
||||
{
|
||||
return this._windowWidth;
|
||||
}
|
||||
|
||||
public get windowHeight(): number
|
||||
{
|
||||
return this._windowHeight;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { ModeratorUserInfoData } from './utils/ModeratorUserInfoData';
|
||||
import { ModeratorUserInfoData } from '../../incoming/moderation/ModeratorUserInfoData';
|
||||
|
||||
export class ModtoolUserInfoParser implements IMessageParser
|
||||
export class ModeratorUserInfoMessageParser implements IMessageParser
|
||||
{
|
||||
private _data: ModeratorUserInfoData;
|
||||
|
||||
@ -25,7 +25,4 @@ export class ModtoolUserInfoParser implements IMessageParser
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
|
||||
export class ModtoolRoomInfoParser implements IMessageParser
|
||||
{
|
||||
private _id: number;
|
||||
private _playerAmount: number;
|
||||
private _ownerInRoom: boolean;
|
||||
private _ownerId: number;
|
||||
private _ownerName: string;
|
||||
private _name: string;
|
||||
private _description: string;
|
||||
private _tags: string[];
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
this._id = null;
|
||||
this._playerAmount = 0;
|
||||
this._ownerInRoom = false;
|
||||
this._ownerId = 0;
|
||||
this._ownerName = null;
|
||||
this._name = null;
|
||||
this._description = null;
|
||||
this._tags = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
if(!wrapper) return false;
|
||||
|
||||
this._id = wrapper.readInt();
|
||||
this._playerAmount = wrapper.readInt();
|
||||
this._ownerInRoom = wrapper.readBoolean();
|
||||
this._ownerId = wrapper.readInt();
|
||||
this._ownerName = wrapper.readString();
|
||||
wrapper.readBoolean();
|
||||
this._name = wrapper.readString();
|
||||
this._description = wrapper.readString();
|
||||
const tagsTotal = wrapper.readInt();
|
||||
|
||||
this._tags = [];
|
||||
|
||||
for(let i = 0; i < tagsTotal; i++)
|
||||
{
|
||||
this._tags.push(wrapper.readString());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public get id(): number
|
||||
{
|
||||
return this._id;
|
||||
}
|
||||
|
||||
public get playerAmount(): number
|
||||
{
|
||||
return this._playerAmount;
|
||||
}
|
||||
|
||||
public get ownerInRoom(): boolean
|
||||
{
|
||||
return this._ownerInRoom;
|
||||
}
|
||||
|
||||
public get ownerId(): number
|
||||
{
|
||||
return this._ownerId;
|
||||
}
|
||||
|
||||
public get ownerName(): string
|
||||
{
|
||||
return this._ownerName;
|
||||
}
|
||||
|
||||
public get name(): string
|
||||
{
|
||||
return this._name;
|
||||
}
|
||||
|
||||
public get description(): string
|
||||
{
|
||||
return this._description;
|
||||
}
|
||||
|
||||
public get tags(): string[]
|
||||
{
|
||||
return this._tags;
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { ModtoolRoomVisitedData } from './utils/ModtoolRoomVisitedData';
|
||||
|
||||
export class ModtoolRoomUsersParser implements IMessageParser
|
||||
{
|
||||
private _data: ModtoolRoomVisitedData;
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._data = new ModtoolRoomVisitedData(wrapper);
|
||||
return true;
|
||||
}
|
||||
|
||||
public get data(): ModtoolRoomVisitedData
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
import { IMessageDataWrapper } from '../../../../../../core';
|
||||
import { IDisposable } from '../../../../../../core/common/disposable/IDisposable';
|
||||
import { IMessageDataWrapper } from '../../../../../core';
|
||||
import { IDisposable } from '../../../../../core/common/disposable/IDisposable';
|
||||
|
||||
export class PatternMatchData implements IDisposable
|
||||
{
|
@ -1,7 +1,7 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { ChatRecordData } from './utils/ChatRecordData';
|
||||
import { ChatRecordData } from '../../incoming/moderation/ChatRecordData';
|
||||
|
||||
export class ModtoolRoomChatlogParser implements IMessageParser
|
||||
export class RoomChatlogMessageParser implements IMessageParser
|
||||
{
|
||||
private _data: ChatRecordData;
|
||||
|
@ -0,0 +1,23 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { RoomVisitsData } from '../../incoming/moderation/RoomVisitsData';
|
||||
|
||||
export class RoomVisitsMessageParser implements IMessageParser
|
||||
{
|
||||
private _data: RoomVisitsData;
|
||||
|
||||
public flush(): boolean
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public parse(wrapper: IMessageDataWrapper): boolean
|
||||
{
|
||||
this._data = new RoomVisitsData(wrapper);
|
||||
return true;
|
||||
}
|
||||
|
||||
public get data(): RoomVisitsData
|
||||
{
|
||||
return this._data;
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import { IMessageDataWrapper, IMessageParser } from '../../../../../core';
|
||||
import { ChatRecordData } from './utils/ChatRecordData';
|
||||
import { ChatRecordData } from '../../incoming/moderation/ChatRecordData';
|
||||
|
||||
export class ModtoolUserChatlogParser implements IMessageParser
|
||||
export class UserChatlogMessageParser implements IMessageParser
|
||||
{
|
||||
private _userId: number;
|
||||
private _username: string;
|
@ -1,10 +1,18 @@
|
||||
export * from './CfhChatlogMessageParser';
|
||||
export * from './IssueDeletedMessageParser';
|
||||
export * from './IssueInfoMessageParser';
|
||||
export * from './IssueMessageData';
|
||||
export * from './IssuePickFailedMessageParser';
|
||||
export * from './ModerationCautionParser';
|
||||
export * from './ModeratorActionResultMessageParser';
|
||||
export * from './ModeratorInitData';
|
||||
export * from './ModeratorInitMessageParser';
|
||||
export * from './ModtoolCFHTopicsParser';
|
||||
export * from './ModtoolRoomChatlogParser';
|
||||
export * from './ModtoolRoomInfoParser';
|
||||
export * from './ModtoolRoomUsersParser';
|
||||
export * from './ModtoolUserChatlogParser';
|
||||
export * from './ModtoolUserInfoParser';
|
||||
export * from './ModeratorMessageParser';
|
||||
export * from './ModeratorRoomInfoMessageParser';
|
||||
export * from './ModeratorToolPreferencesMessageParser';
|
||||
export * from './ModeratorUserInfoMessageParser';
|
||||
export * from './PatternMatchData';
|
||||
export * from './RoomChatlogMessageParser';
|
||||
export * from './RoomVisitsMessageParser';
|
||||
export * from './UserBannedMessageParser';
|
||||
export * from './utils';
|
||||
export * from './UserChatlogMessageParser';
|
||||
|
@ -1,7 +0,0 @@
|
||||
export interface IChatlog
|
||||
{
|
||||
timestamp: string;
|
||||
userId: number;
|
||||
userName: string;
|
||||
message: string;
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
import { IChatlog } from './IChatlog';
|
||||
|
||||
export class ModtoolUserChatlogParserChatlog implements IChatlog
|
||||
{
|
||||
private readonly _timestamp: string;
|
||||
private readonly _userId: number;
|
||||
private readonly _userName: string;
|
||||
private readonly _message: string;
|
||||
private readonly _bool: boolean;
|
||||
|
||||
constructor(timestamp: string, userId: number, userName: string, message: string, bool: boolean)
|
||||
{
|
||||
this._timestamp = timestamp;
|
||||
this._userId = userId;
|
||||
this._userName = userName;
|
||||
this._message = message;
|
||||
this._bool = bool;
|
||||
}
|
||||
|
||||
public get timestamp(): string
|
||||
{
|
||||
return this._timestamp;
|
||||
}
|
||||
|
||||
public get userId(): number
|
||||
{
|
||||
return this._userId;
|
||||
}
|
||||
|
||||
public get userName(): string
|
||||
{
|
||||
return this._userName;
|
||||
}
|
||||
|
||||
public get message(): string
|
||||
{
|
||||
return this._message;
|
||||
}
|
||||
|
||||
public get bool(): boolean
|
||||
{
|
||||
return this._bool;
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
import { ModtoolUserChatlogParserChatlog } from './ModtoolUserChatlogParserChatlog';
|
||||
import { IChatlog } from './IChatlog';
|
||||
|
||||
export class ModtoolUserChatlogParserVisit
|
||||
{
|
||||
private readonly _roomName: string;
|
||||
private readonly _roomId: number;
|
||||
private readonly _chatlogs: IChatlog[];
|
||||
|
||||
constructor(roomName: string, roomId: number, chatlogs: IChatlog[])
|
||||
{
|
||||
this._roomName = roomName;
|
||||
this._roomId = roomId;
|
||||
this._chatlogs = chatlogs;
|
||||
}
|
||||
|
||||
public get roomName(): string
|
||||
{
|
||||
return this._roomName;
|
||||
}
|
||||
|
||||
public get roomId(): number
|
||||
{
|
||||
return this._roomId;
|
||||
}
|
||||
|
||||
public get chatlogs(): IChatlog[]
|
||||
{
|
||||
return this._chatlogs;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
export * from './CallForHelpCategoryData';
|
||||
export * from './ChatRecordData';
|
||||
export * from './IChatlog';
|
||||
export * from './IssueInfoMessageParser';
|
||||
export * from './IssueMessageData';
|
||||
export * from './ModeratorInitData';
|
||||
export * from './ModeratorUserInfoData';
|
||||
export * from './ModtoolRoomChatlogLine';
|
||||
export * from './ModtoolRoomVisitedData';
|
||||
export * from './ModtoolUserChatlogParserChatlog';
|
||||
export * from './ModtoolUserChatlogParserVisit';
|
||||
export * from './PatternMatchData';
|
||||
export * from './RoomVisitData';
|
Loading…
Reference in New Issue
Block a user