Guest User

Untitled

a guest
Jun 14th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. function Client() {
  2. this.state = "loggedoff"
  3. }
  4.  
  5. //attempt to say something, will attempt login every time and keep you at as far as you have gotten
  6. Client.prototype.say = function(msg) {
  7. switch(this.state) {
  8. case "loggedoff":
  9. this.queueLogin()
  10. case "authenticated":
  11. this.queueVoiceRequest()
  12. case "voiced":
  13. this.queueMessage(msg)
  14. break
  15. //banned etc.
  16. default:
  17. throw "not allowed"
  18. }
  19. }
Add Comment
Please, Sign In to add comment