code: function() {
          var updateRegex = _.bind(function () {
                  // Allows checking for a nick that contains 'the_nick' or '<punctuation>the_nick<punctuation>'
                  // .. where <punctuation> is any character not allowed in an IRC nick
                  var regex_valid_nick_chars = 'a-z0-9_\\-{}[\\]^`|\\\\';
                  var regex_nicks = Object.keys(this.nick_cache)
                      .map(_.escapeRegExp)
                      .join('|');
  
                  this.nick_regex = new RegExp(
                      '^[^'+regex_valid_nick_chars+']?(' + regex_nicks + ')[^'+regex_valid_nick_chars+']?$', 'i'
                  );
              }, this);
  
          function getNick (member) {
              return member.get('nick').toLowerCase();
          };
  
          this.nick_cache = Object.create(null);
          this.nick_regex = null;
  
          this.on('reset', function() {
              this.nick_cache = _.reduce(this.models, function(memo, member) {
                  memo[getNick(member)] = member;
                  return memo;
              }, Object.create(null));
              updateRegex();
          });
  
          this.on('add', function(member) {
              this.nick_cache[getNick(member)] = member;
              updateRegex();
          });
  
          this.on('remove', function(member) {
              delete this.nick_cache[getNick(member)];
              updateRegex();
          });
  
          this.on('change:nick', function(member) {
              this.nick_cache[getNick(member)] = member;
              delete this.nick_cache[member.previous('nick').toLowerCase()];
              updateRegex();
          });
      }
docs: /*
  Keep a reference to each member by the nick. Speeds up .getByNick()
  so it doesn't need to loop over every model for each nick lookup