Added support for ~ and % modes. Close #10
This commit is contained in:
parent
6c8328146e
commit
9f5d3807ec
@ -221,8 +221,8 @@ $(function() {
|
||||
.closest(".window")
|
||||
.data("id");
|
||||
|
||||
// Remove modes
|
||||
var name = user.html().replace(/[\s+@]/g, "");
|
||||
// Strip modes.
|
||||
var name = user.html().trim().replace(/[+%@~]/, "");
|
||||
if (name.match(/[#.]|-!-/) != null) {
|
||||
return;
|
||||
}
|
||||
|
@ -19,7 +19,12 @@ Chan.prototype.sortUsers = function() {
|
||||
this.users,
|
||||
function(u) { return u.name.toLowerCase(); }
|
||||
);
|
||||
var modes = ["+", "@"];
|
||||
var modes = [
|
||||
"~",
|
||||
"%",
|
||||
"@",
|
||||
"+",
|
||||
].reverse();
|
||||
modes.forEach(function(mode) {
|
||||
this.users = _.remove(
|
||||
this.users,
|
||||
|
Loading…
Reference in New Issue
Block a user