client/src/models/member.js
function (modes) {
        var prefix = '';
        var user_prefixes = this.get('user_prefixes');

        if (typeof modes[0] !== 'undefined') {
            prefix = _.detect(user_prefixes, function (prefix) {
                return prefix.mode === modes[0];
            });

            prefix = (prefix) ? prefix.symbol : '';
        }

        return prefix;
    }
function (modes) {
        var prefix = '';
        var user_prefixes = this.get('user_prefixes');

        if (typeof modes[0] !== 'undefined') {
            prefix = _.detect(user_prefixes, function (prefix) {
                return prefix.mode === modes[0];
            });

            prefix = (prefix) ? prefix.symbol : '';
        }

        return prefix;
    }
function ( modes ) { var prefix = '' ; var user_prefixes = this . get ( 'user_prefixes' ) ; if ( typeof modes [ 0 ] !== 'undefined' ) { prefix = _ . detect ( user_prefixes , function ( prefix ) { return prefix . mode === modes [ 0 ] ; } ) ; prefix = ( prefix ) ? prefix . symbol : '' ; } return prefix ; }
Figure out a valid prefix given modes.
If a user is an op but also has voice, the prefix
should be the op as it is more important.
Figure out a valid prefix given modes . If a user is an op but also has voice the prefix should be the op as it is more important .