Updated protocol documentation to indicate that IDs should not be treated as numbers.
This commit is contained in:
parent
c291ef178d
commit
8050a295c1
2 changed files with 19 additions and 23 deletions
40
Protocol.md
40
Protocol.md
|
@ -29,10 +29,6 @@ Extends `int`, contains a second based UNIX timestamp.
|
|||
A `string` containing only alphanumeric characters (any case), `-` or `_`.
|
||||
|
||||
|
||||
### `session id`
|
||||
A `string` containing only alphanumeric characters (any case), `-` or `_`.
|
||||
|
||||
|
||||
### `color`
|
||||
Any valid value for the CSS `color` property.
|
||||
Further documentation can be found [on MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value).
|
||||
|
@ -93,7 +89,7 @@ Used to prevent the client from closing the session due to inactivity.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -119,7 +115,7 @@ Commands are described lower in the document.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -159,7 +155,7 @@ Informs the client that authentication has succeeded.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -231,7 +227,7 @@ Informs the client that a user has joined.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -251,7 +247,7 @@ Informs the client that a user has joined.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>Sequence ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -268,7 +264,7 @@ Informs the client that a chat message has been received.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>
|
||||
User ID.
|
||||
If <code>-1</code> this message is an informational message from the server and the next field takes on a special form.
|
||||
|
@ -306,7 +302,7 @@ Informs the client that a chat message has been received.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>Sequence ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -323,7 +319,7 @@ Informs the client that a user has disconnected.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -351,7 +347,7 @@ Informs the client that a user has disconnected.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>Sequence ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -462,7 +458,7 @@ Informs the client that a user has joined the channel.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -482,7 +478,7 @@ Informs the client that a user has joined the channel.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>Sequence ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -494,12 +490,12 @@ Informs the client that a user has left the channel.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>Sequence ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -523,7 +519,7 @@ Informs the client that a message has been deleted.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>Sequence ID of the deleted message</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -568,7 +564,7 @@ Informs the client about users already present in the channel.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -605,7 +601,7 @@ Informs the client about an existing message in a channel.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -630,7 +626,7 @@ Informs the client about an existing message in a channel.
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>Sequence ID</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -732,7 +728,7 @@ Informs that another user's details have been updated.
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><code>int</code></td>
|
||||
<td><code>string</code></td>
|
||||
<td>User ID of the affected user</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace SharpChat {
|
|||
}
|
||||
|
||||
public static bool CheckNameChar(char c) {
|
||||
return char.IsLetter(c) || char.IsNumber(c) || c == '-';
|
||||
return char.IsLetter(c) || char.IsNumber(c) || c == '-' || c == '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue