Guest User

Untitled

a guest
Jul 20th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. NG CHAT PROTOCOL-- First revision
  2.  
  3. Message format:
  4. PMSG <TARGET> :MESSAGE
  5. CMSG <TARGET> :MESSAGE
  6. -- Much like IRC, except in this protocol messages are split into 2 types, private messages and channel messages. Channels won't have prefixes in this protocol.
  7.  
  8. Examples:
  9.  
  10. Messsage to another user:
  11. PMSG Chronamut :hi r u there
  12. Channel message:
  13. CMSG home :l o l hi asl
  14.  
  15. However, that is just how messages are sent to the server on a socket level.
  16. They will be sent to the client like this.
  17. PMSG <USER> <TARGET> :MESSAGE
  18.  
  19. Once again, this is like IRC, but there is no hostmask involved. This eliminates channel bans, but since accounts are managed by a single handle on newgrounds this is not a problem. For more extreme cases, chat admins can issue a global ban for the IP. To prevent abuse, ips will never actually be shown to anyone. IPs will be masked even to admins, this is not a problem since we will use a cryptographic hash algorithm to represent a user's IP address.
  20.  
  21.  
  22. Now, things get slightly more complicated.
  23. Getting the user list will be something like this.
  24.  
  25. USERS CHANNEL
  26. ^this is what the client will send to the server.
  27. The server will then reply with a series of messages like this, for each user in the channel
  28. USER CHANNEL <username>
  29.  
  30. this can be performed on channel join, and time to time, if the client is registered in a channel.
  31.  
  32. ##more to come
Add Comment
Please, Sign In to add comment