BattleSim/client/app/js/models/chats/user.coffee

16 lines
284 B
CoffeeScript
Raw Normal View History

2016-02-01 22:19:30 +00:00
AuthorityMap =
"1": ""
"2": "+"
"3": "%"
"4": "@"
"5": "~"
class @User extends Backbone.Model
initialize: (attributes) =>
getDisplayName: =>
authorityString = AuthorityMap[@get('authority')] ? ""
"#{authorityString}#{@get('id')}"
isAlt: =>
@get('isAlt')