Difference between revisions of "ChatOnCreateRoom"

From SWGANH Wiki
Jump to: navigation, search
(Struct)
(Variable Descriptions)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{PageHeader|Server Packet|ChatOnCreateRoom (35D7CC9F)}}
 
{| border="0" width="90%" cellpadding=6
 
{| border="0" width="90%" cellpadding=6
 
|-
 
|-
Line 5: Line 5:
 
===Struct===
 
===Struct===
 
----
 
----
 
+
{| align="center"
 +
|-
 +
||
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
|{{short}}|'''opperand count'''
+
|{{short}}|'''Op Count'''
 
|-
 
|-
|{{int}}|'''Op Code'''
+
|{{int}}|'''Opcode'''
 
|-
 
|-
|{{int}}|{{unknown}}
+
|{{int}}|'''ErrorCode'''
 
|-
 
|-
|{{int}}|{{ChatRoom ID}}
+
|{{int}}|'''ChatRoom ID'''
 
|-
 
|-
|{{byte}}|{{unknown}}
+
|{{int}}|'''Private Flag'''
 
|-
 
|-
 
+
|{{byte}}|'''Moderated Flag'''
|{{a_string}}|'''Room Full Adress'''
+
|-
 +
|{{a_string}}|'''Room Full Address'''
 
|-
 
|-
 
|{{a_string}}|'''Game'''
 
|{{a_string}}|'''Game'''
Line 35: Line 38:
 
|{{u_string}}|'''Room Name'''
 
|{{u_string}}|'''Room Name'''
 
|-
 
|-
|{{int}}|'''#Moderators'''
+
|{{int}}|'''Moderator List Size'''
 
|-
 
|-
 
|{{a_string}}|'''Game'''
 
|{{a_string}}|'''Game'''
Line 41: Line 44:
 
|{{a_string}}|'''Galaxy'''
 
|{{a_string}}|'''Galaxy'''
 
|-
 
|-
|{{a_string}}|'''Mod Name'''
+
|{{a_string}}|'''Moderator Name'''
 
|-
 
|-
|{{int}}|'''#People In Chat'''
+
|{{int}}|'''User List Size'''
 
|-
 
|-
 
|{{a_string}}|'''Game'''
 
|{{a_string}}|'''Game'''
 
|-
 
|-
|{{a_string}}|'''Member Name'''
+
|{{a_string}}|'''Galaxy'''
 +
|-
 +
|{{a_string}}|'''User Name'''
 
|-
 
|-
|{{int}}|{{unknown}}
+
|{{int}}|'''Request ID'''
 +
|}
 
|}
 
|}
  
Line 55: Line 61:
 
----
 
----
  
Opperand_Count     = '''9'''
+
Op Count     = '''4'''
  
 
Opcode     = '''0x35D7CC9F'''   
 
Opcode     = '''0x35D7CC9F'''   
 
----
 
----
  
* Game = Always SWG
+
* '''ErrorCode'''
* Galaxy = Server Name
+
A integer containing a code for the error that occured.
* #Moderators = Number Of moderators in the room
+
Used to determine what error message to display.
* #People In Chat = The Number of people that are in the room
+
0: [RoomName] You have created the channel.
 +
6: Cannot create the channel named '[RoomPathName]'becase the name is invalid.
 +
18: NO MESSAGE
 +
Default: Channel '[RoomPathName]' creation failed for an unknown reason.
  
 +
* '''RoomID:
 +
The unique ID number assigned to identify this Room.
 +
Generated on room creation.
 +
 +
* '''PrivateFlag:
 +
An INTEGER flag used to mark the room as private or public.
 +
Private rooms require invitation from owner or moderators to enter.
 +
00000001 = Private
 +
00000000 = Public
 +
 +
* '''ModeratedFlag:
 +
A BYTE flag used to mark the room as being moderated.
 +
01 = Moderated
 +
00 = Open
 +
Note: Moderated Rooms means that no one BUT moderators can talk.
 +
Its more like a "Muted" Room. You can still have moderators in an
 +
OPEN room. So avoid this confusion.
 +
 +
* '''RoomPathName'''
 +
:The full ChatServer path and name for the room including the RoomName specified on creation.
 +
::Example: "SWG.TestCenter.Chat.tcpa"
 +
 +
* '''Game'''
 +
The name of the game ("SWG") this player is on.
 +
:Part of ChatAvatarId:
 +
:3 ASTRINGs representing the player on the ChatServer.
 +
::"Game.Server.name"
 +
:name is the lowercase of the first name for the player.
 +
 +
* '''Server'''
 +
The name of the server (Galaxy) this player is on. Part of ChatAvatarId object.
 +
 +
* '''Owner'''
 +
The firstname of the player who current owns the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.
 +
 +
* '''Creator'''
 +
The firstname of the player who originally created the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.
 +
 +
* '''RoomTitle'''
 +
The unicode string containing the Title of the chatroom to display. Note: This is the more descriptive text displayed and not the name used in the RoomPathName of the ChatServer.
 +
 +
* '''ModeratorList'''
 +
A list containing ChatAvatarId's of the moderators for this room. Note: This list does NOT get used to display the information. So it is better to send a blank (NULL/0) list and use the QueryRoom construct, since it actually gets displayed. This will save TONS of bandwidth.
 +
 +
* '''UserList'''
 +
A list containing ChatAvatarId's of the users current in the room. Note: This list does NOT get used to display the information. So it is better to send a blank (NULL/0) list and use the QueryRoom construct, since it actually gets displayed. This will save TONS of bandwidth.
 +
 +
* '''RequestID'''
 +
For every request made, the client attaches an ID number to identify it. It is unique for each request type (opcode) and incremented for each request. Similar to Update Counters used in Objects. For every response that had a request with a RequestID, the same RequestID must be sent back. It is used to identify key information regarding the response, such as what the full RoomPathName was and it is used in error message generation. Also can be used to eliminate duplicate requests.
  
 
|valign=top|
 
|valign=top|
Line 74: Line 132:
 
||{{ServerPacket}}
 
||{{ServerPacket}}
 
|-
 
|-
||{{75%}}
+
||{{100%}}
 
|-
 
|-
 
|}
 
|}
Line 81: Line 139:
  
 
----
 
----
 
==Sample Code==
 
----
 
 
<pre>
 
Insert Code Snippet Here...
 
</pre>
 
  
 
==Sample Packet==
 
==Sample Packet==
Line 93: Line 144:
 
<pre>
 
<pre>
 
  04 00
 
  04 00
  9F CC D7 35         //CRC = 'ChatOnCreateRoom
+
  9F CC D7 35                     // ChatOnCreateRoom
  00 00 00 00  
+
  00 00 00 00                     // unknown
  A8 14 81 02 01 00 00 00 // Chatroom ID 4336981160
+
  A8 14 81 02                     // Chatroom ID
  01  
+
01 00 00 00                     // might be part of the chatroom id
  1D 00               // String count(29)
+
  01                             // unknown
 +
  1D 00                           // String count(29)
 
  53 57 47 2E 4B 61 75 72 69  
 
  53 57 47 2E 4B 61 75 72 69  
 
  2E 64 61 6E 74 6F 6F 69 6E 65  
 
  2E 64 61 6E 74 6F 6F 69 6E 65  
  2E 43 68 61 74 2E 74 65 73 74  //'SWG.Kauri.dantooine.Chat.test'
+
  2E 43 68 61 74 2E 74 65 73 74  // 'SWG.Kauri.dantooine.Chat.test'
  03 00             // String count(3)
+
 
  53 57 47           //'SWG'  
+
  03 00                           // String count(3)
  05 00             // String count(5)
+
  53 57 47                       // 'SWG'  
  4B 61 75 72 69     //'Kauri'
+
  05 00                           // String count(5)
  08 00             // String count(8)
+
  4B 61 75 72 69                 // 'Kauri'
  73 69 77 72 6F 74 69 61 //'siwrotia' '//Creator
+
  08 00                           // String count(8)
03 00              // String count(3)
+
  73 69 77 72 6F 74 69 61         // 'siwrotia' Creator
53 57 47          //'SWG'
+
05 00              // String count(5)
+
4B 61 75 72 69    //'Kauri'
+
08 00              // String count(8)
+
73 69 77 72 6F 74 69 61  //'siwrotia' '//Onwer
+
04 00 00 00              // String count
+
74 00 65 00 73 00 74 00  //'test'
+
  
01 00 00 00      // Number of Moderators
+
  03 00                           // String count(3)
  03 00           //INT(3)
+
  53 57 47                       // 'SWG'
  53 57 47         //'SWG'
+
  05 00                           // String count(5)
  05 00           //INT(5)
+
  4B 61 75 72 69                 // 'Kauri'  
  4B 61 75 72 69   //'Kauri'
+
  08 00                           // String count(8)
  08 00           // String count
+
  73 69 77 72 6F 74 69 61         // 'siwrotia' Creator
  73 69 77 72 6F 74 69 61 //'siwrotia'  
+
04 00 00 00                    // String count(4)
 +
74 00 65 00 73 00 74 00        // 'test' Room name
  
 +
01 00 00 00                    // Number of Moderators
 +
03 00                          // String count(3)
 +
53 57 47                        // 'SWG' Game tye
 +
05 00                          // String count(5)
 +
4B 61 75 72 69                  // 'Kauri' Server name
 +
08 00                          // String count(8)
 +
73 69 77 72 6F 74 69 61        // 'siwrotia' Mod names
  
  01 00 00 00     //Number of users in Chat
+
  01 00 00 00                     // Number of users in Chat
  03 00           //INT(3)
+
  03 00                           // String count(3)
  53 57 47         //'SWG'
+
  53 57 47                       // 'SWG'
  05 00           //INT(5)
+
  05 00                           // String count(5)
  4B 61 75 72 69   //'Kauri'
+
  4B 61 75 72 69                 // 'Kauri'
  08 00           //INT(8)
+
  08 00                           // String count(8)
  73 69 77 72 6F 74 69 61   //'siwrotia'
+
  73 69 77 72 6F 74 69 61         // 'siwrotia'
  01 00 00 00
+
  01 00 00 00                     // uknown
  
 
</pre>
 
</pre>

Latest revision as of 21:50, 6 April 2008

Server Packet - ChatOnCreateRoom (35D7CC9F)

SWGANH Wiki is a repository of Star Wars Galaxies Developer information. This site is only meant to be used by SWGANH Developer team.

Struct


SHORT Op Count
INT Opcode
INT ErrorCode
INT ChatRoom ID
INT Private Flag
BYTE Moderated Flag
A_STRING Room Full Address
A_STRING Game
A_STRING Galaxy
A_STRING Creator
A_STRING Game
A_STRING Galaxy
A_STRING Owner
U_STRING Room Name
INT Moderator List Size
A_STRING Game
A_STRING Galaxy
A_STRING Moderator Name
INT User List Size
A_STRING Game
A_STRING Galaxy
A_STRING User Name
INT Request ID

Variable Descriptions


Op Count = 4

Opcode = 0x35D7CC9F


  • ErrorCode

A integer containing a code for the error that occured. Used to determine what error message to display. 0: [RoomName] You have created the channel. 6: Cannot create the channel named '[RoomPathName]'becase the name is invalid. 18: NO MESSAGE Default: Channel '[RoomPathName]' creation failed for an unknown reason.

  • RoomID:

The unique ID number assigned to identify this Room. Generated on room creation.

  • PrivateFlag:

An INTEGER flag used to mark the room as private or public. Private rooms require invitation from owner or moderators to enter. 00000001 = Private 00000000 = Public

  • ModeratedFlag:

A BYTE flag used to mark the room as being moderated. 01 = Moderated 00 = Open Note: Moderated Rooms means that no one BUT moderators can talk. Its more like a "Muted" Room. You can still have moderators in an OPEN room. So avoid this confusion.

  • RoomPathName
The full ChatServer path and name for the room including the RoomName specified on creation.
Example: "SWG.TestCenter.Chat.tcpa"
  • Game

The name of the game ("SWG") this player is on.

Part of ChatAvatarId:
3 ASTRINGs representing the player on the ChatServer.
"Game.Server.name"
name is the lowercase of the first name for the player.
  • Server

The name of the server (Galaxy) this player is on. Part of ChatAvatarId object.

  • Owner

The firstname of the player who current owns the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.

  • Creator

The firstname of the player who originally created the chatroom. Must be only firstname and lowercase. Part of ChatAvatarId object.

  • RoomTitle

The unicode string containing the Title of the chatroom to display. Note: This is the more descriptive text displayed and not the name used in the RoomPathName of the ChatServer.

  • ModeratorList

A list containing ChatAvatarId's of the moderators for this room. Note: This list does NOT get used to display the information. So it is better to send a blank (NULL/0) list and use the QueryRoom construct, since it actually gets displayed. This will save TONS of bandwidth.

  • UserList

A list containing ChatAvatarId's of the users current in the room. Note: This list does NOT get used to display the information. So it is better to send a blank (NULL/0) list and use the QueryRoom construct, since it actually gets displayed. This will save TONS of bandwidth.

  • RequestID

For every request made, the client attaches an ID number to identify it. It is unique for each request type (opcode) and incremented for each request. Similar to Update Counters used in Objects. For every response that had a request with a RequestID, the same RequestID must be sent back. It is used to identify key information regarding the response, such as what the full RoomPathName was and it is used in error message generation. Also can be used to eliminate duplicate requests.

Tags


S→C This packet originates on the server.

100% This packet has been completely reversed.


Sample Packet

 04 00
 9F CC D7 35                     // ChatOnCreateRoom
 00 00 00 00                     // unknown
 A8 14 81 02                     // Chatroom ID 
 01 00 00 00                     // might be part of the chatroom id
 01                              // unknown
 1D 00                           // String count(29)
 53 57 47 2E 4B 61 75 72 69 
 2E 64 61 6E 74 6F 6F 69 6E 65 
 2E 43 68 61 74 2E 74 65 73 74   // 'SWG.Kauri.dantooine.Chat.test'

 03 00                           // String count(3)
 53 57 47                        // 'SWG' 
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri'
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia' Creator

 03 00                           // String count(3)
 53 57 47                        // 'SWG'
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri' 
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia' Creator
 04 00 00 00                     // String count(4)
 74 00 65 00 73 00 74 00         // 'test' Room name

 01 00 00 00                     // Number of Moderators
 03 00                           // String count(3)
 53 57 47                        // 'SWG' Game tye
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri' Server name
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia' Mod names

 01 00 00 00                     // Number of users in Chat
 03 00                           // String count(3)
 53 57 47                        // 'SWG'
 05 00                           // String count(5)
 4B 61 75 72 69                  // 'Kauri'
 08 00                           // String count(8)
 73 69 77 72 6F 74 69 61         // 'siwrotia'
 01 00 00 00                     // uknown