refactor(user-agents): why it uses regex
This commit is contained in:
parent
313561cf39
commit
8c2772366d
@ -27,7 +27,7 @@ export default function Protocol() {
|
|||||||
{
|
{
|
||||||
name: "User Agents",
|
name: "User Agents",
|
||||||
desc: "A community-made solution to identify clients by a unique symbol in front of their username.",
|
desc: "A community-made solution to identify clients by a unique symbol in front of their username.",
|
||||||
curator: "@kostya-zero",
|
curator: "@MeexReay",
|
||||||
href: "/protocol/user-agents",
|
href: "/protocol/user-agents",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -11,7 +11,6 @@ import {
|
|||||||
import Text from "@/components/blocks/Text";
|
import Text from "@/components/blocks/Text";
|
||||||
import PageTitle from "@/components/blocks/PageTitle";
|
import PageTitle from "@/components/blocks/PageTitle";
|
||||||
import Code from "@/components/blocks/Code";
|
import Code from "@/components/blocks/Code";
|
||||||
import InlineCode from "@/components/blocks/InlineCode";
|
|
||||||
|
|
||||||
type UserAgent = {
|
type UserAgent = {
|
||||||
client: string;
|
client: string;
|
||||||
@ -79,16 +78,19 @@ export default function UserAgents() {
|
|||||||
<b>User Agents</b>.
|
<b>User Agents</b>.
|
||||||
</Text>
|
</Text>
|
||||||
<Text>
|
<Text>
|
||||||
User Agents in RAC are implemented by adding an extra Unicode symbol as
|
User Agents in RAC are implemented by changing the message regex.
|
||||||
a prefix to usernames. For example, a message sent with the Tower
|
For example, a message sent with the Tower
|
||||||
client:
|
client:
|
||||||
</Text>
|
</Text>
|
||||||
<Code>{"▲<zero> Hello, world!"}</Code>
|
<Code>{"▲<zero> Hello, world!"}</Code>
|
||||||
<Text>
|
<Text>
|
||||||
The <InlineCode>▲</InlineCode> symbol in front of the username indicates
|
It can be just a prefix, or actually a new message structure,
|
||||||
that this message was sent using the Tower client. The client should use
|
For example, first versions of Mefedroniy, sent messages like this:
|
||||||
regex to parse these messages and determine the client, username, and
|
</Text>
|
||||||
message.
|
<Code>{"banon: Hello, world!"}</Code>
|
||||||
|
<Text>
|
||||||
|
That{"'"}s why the clients should use regex to parse these messages
|
||||||
|
and determine the client, username, and message.
|
||||||
</Text>
|
</Text>
|
||||||
<h3 className={"text-3xl text-stone-300 font-semibold font-rokkitt"}>
|
<h3 className={"text-3xl text-stone-300 font-semibold font-rokkitt"}>
|
||||||
Known Agents
|
Known Agents
|
||||||
|
Loading…
x
Reference in New Issue
Block a user