Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List rooms
- int userId = readint
- string userName = readstring
- int roomsNumber = readint
- rooms = new list(roomsNumber)
- int roomsCounter =0;
- while(roomsCounter < roomsNumber)
- {
- //Chat Record Data
- //Notice that each ChatRecordData has it's own context and chatlog
- //For every room that the user has been you will have a ChatRecordData
- //Appending a post from a group forum is a possibility (they have website forums)
- new hashtable context // must be hashtable;
- new List<Chatlogs> chatlogs
- byte chatDataType = readbyte //0-4
- // type 0 = nothing
- // type 1 = roomChatlog
- // type 2 = IM Session : Internal mods chat ?
- // type 3 = Forum Thread
- // type 4 = Forum Message : Website forum or group forum ?
- // Notice that both in-game chat messages and forum messages will look the same client-side speaking
- // There is a in-game tool in which the mod can delete a forum post or thread
- // A mod cannot delete a room chatlog in oposite to forum messages
- short contextNumber = readshort
- short contextCounter = 0;
- while(contextCounter < contextNumber)
- {
- string contextKey = readstring
- // keys: {roomName,groupId,threadId,messageId,roomId}
- int contextDataType = (int)readbyte
- switch(contextDataType)
- {
- case 0:
- context[contextKey] = readbool
- break
- case 1:
- context[contextKey] = readint
- break
- case 2:
- context[contextKey] = readstring
- break
- deafult:
- Unknown data type
- }
- k++;
- }
- //finally, you append the chatlog list
- //Each context data is associed to only one chatlog list
- int chatlogsNumber = (int)readshort // 0-65535
- int chatlogsCounter = 0;
- while(chatlogsCounter < chatlogsNumber)
- {
- //notice that you are appending the chat for everyone in the room/thread
- //if the userId is the same as the reported user that you are browing, the chat color should change
- int timestamp = readint
- int userId = readint //0 if 'bot/pet'
- string userName = readstring
- string message = readstring
- bool colorBool = readbool //defines a color for something. Must test
- k++
- }
- roomsCounter++
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement