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