This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03b452f
commit cc334f4
Showing
8 changed files
with
218 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,36 @@ | ||
/** | ||
* The name of the server bot. | ||
* @type {string} | ||
*/ | ||
module.exports.BOT_NAME = "NoChat Bot"; | ||
|
||
/** | ||
* Socket.io events, including custom entries. | ||
* @type {object} | ||
*/ | ||
module.exports.events = { | ||
/** | ||
* Event for client socket connection. | ||
*/ | ||
CONNECT: "connection", | ||
|
||
/** | ||
* Event for client socket disconnection. | ||
*/ | ||
DISCONNECT: "disconnect", | ||
|
||
/** | ||
* Event for a connected client socket joining the chat, and sending it its corrected username. | ||
*/ | ||
JOIN: "join", | ||
|
||
/** | ||
* Event for sending/reading messages to/from the connected client socket. | ||
*/ | ||
MESSAGE: "message", | ||
CHAT_MESSAGE: "chat_message", | ||
|
||
/** | ||
* Event for sending/replying to the client with the list of usernames. | ||
*/ | ||
USERS: "users", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.