Skip to content
This repository was archived by the owner on Sep 5, 2021. It is now read-only.

Webchat Spec

HiGuy Smith edited this page Aug 17, 2017 · 12 revisions

Client Commands

IDENTIFY <username ...>

How the client tells the server who they are

  • username: string of client's username

RELOGIN

Single-word called only when the client relogs after a disconnect-- generally means don't resend info / old chats

VERIFY <version> <password ...>

How the ingame client authenticates

  • version: int version of game client
  • password: string of the user's password

KEY <key ...>

How the webchat client authenticates, key is kinda like an autogenerated webchat-only password

  • key: string of the user's login key

CHAT <destination> <message ...>

Incoming chat message from the client

  • destination: string of the username of the recipient client; if this is empty the chat is global
  • message: string of the message text

LOCATION <location>

When the game client changes locations

  • location: int of the new location index

USERLIST

Request for a user list update

PING <data ...>

Client wants to send a ping request to see if the server is still there

  • data: string of the ping data

PONG <data ...>

Client is responding to a server's ping

  • data: string that should match the original PING data from the server

SESSION <session ...>

Client assigns itself a random game session that it uses to authenticate to multiplayer servers

  • session: string of the session

TRACK <tracking info ...>

For tracking display / driver information. This is like 10 things

GUITRACK <gui name> <gui open count>

For tracking gui usage

  • gui name: string name of the gui
  • gui open count: int how many times they've opened that gui since the last login

FRIEND <username>

Add friend by username

  • username: string friend's username

FRIENDDEL <username>

Delete friend by username 😢

  • username: string friend's username

FRIENDLIST

Client requests their friend list

BLOCK <username>

Block person by username

  • username: string username of person to block

UNBLOCK <username>

Unblock person by username

  • username: string username of person to unblock

ACCEPTTOS

Client is a sucker

Fubar (to be deprecated):

LEVELUP <level>

Client leveled up-- literally sends a notify

  • level: int their new level

TASKCOMPLETE <task name>

Client completed a task-- literally sends a notify

  • task name: string of the task name

ACHIEVEMENT <achievement name>

Client got an achievement-- literally sends a notify (notice a theme here?)

  • `achievement name: string of the achievement name

MASTERY <level>

Client leveled up a mastery level-- literally sends a notify

  • level: int their new level

PRESTIGEUP <level>

Client prestige leveled up--literally sends a notify

  • level: int their new level

Server Commands

INVALID

Sent command was invalid.

ACCEPTTOS

Client needs to accept the TOS before they can log in. Clients should display the TOS now.

LOGGED

Client has logged in successfully!

IDENTIFY <status>

Status of the client's identification

  • status: string can be any of these:
    • CHALLENGE: client is Jeff needs to identify before doing anything else
    • SUCCESS: client's login information was good, expect lots of login info
    • INVALID: client's login information was wrong
    • OUTOFDATE: client's game is not up to date
    • OFFLINE: server is offline for maintenance
    • NEEDACTIVATION: client needs to activate their account and should check their spam inbox
    • BANNED: client plays the tuba

PING <data ...>

Server wants to make sure the client is still connected, client should send exactly the same data back

  • data: string ping data to return

PONG <data ...>

Server is responding to a client PING

  • data: string ping data from client

PINGTIME <time>

How long the client took to respond to the PING

  • time: int time, in seconds, that the ping took to respond

INFO <type> [data ...]

Server info that the client should know about.

  • type: string can by any of these:
    • LOGGING: client should enable debug logging
    • ACCESS: data is the client's access level
    • DISPLAY: data is the client's display name
    • SERVERTIME: data is the server's current time
    • WELCOME: data is the welcome message
    • DEFAULT: data is the default high score for the leaderboards
    • ADDRESS: data is the client's IP address
    • HELP: data is <page> <contents...>' where pageis the help page andcontents` are its contents
    • PRIVILEGE: data is the client's privilege level
    • USERNAME: data is the client's username (for guests)
    • CANCHAT: data is if the chat bar should be enabled
  • data: ?string see type field for how this is used

STATUS <location> <display>

Location status index names

  • location: int the location index
  • display: string how the location should be displayed

COLOR <identifier> <hex>

Default color hex values

  • identifier: string the identifier for the color
  • hex: string the hex code for that color

FLAIR <icon>

List of flair so clients can predownload them all

  • icon: string of the flair name

CHAT <username> <display name> <destination> <access> <message ...>

Outgoing chat messages to clients

  • username: string username of sender
  • display name: string display name of sender
  • destination: string username of destination client; empty if global
  • access: int access level of sender
  • message: string message contents

NOTIFY <type> <access> <username> <display name> [message ...]

Outgoing notifications

  • type: string type of notification
  • access: int access level required to see this notification
  • username: string username of notification target
  • display name: string display name of notification target
  • message: ?string message with the notification

USER <type> [data ...]

User list information

  • type: string can be any of these:
    • START: start of userlist
    • DONE: end of userlist
    • INFO: data is of the format <username> <access> <location> <display name> <color> <flair> <prefix> <suffix>
  • data: ?string see type for how this is used

FRIEND <type> [data ...]

Friend list information

  • type: string can be any of these:
    • START: start of friend list
    • DONE: end of friend list
    • NAME: data is of the format <username> <display name>
  • data: ?string see type for how this is used

BLOCK <type> [data ...]

Block list information

  • type: string can be any of these:
    • START: start of block list
    • DONE: end of block list
    • INFO: data is of the format <username> <display name>
  • data: ?string see type for how this is used