Add /clear to PMs (#869)

This commit is contained in:
Charlie Kobayashi
2017-02-22 00:44:06 -05:00
committed by Guangcong Luo
parent 29264631b4
commit 055cc4adff

View File

@@ -326,6 +326,8 @@
delete app.ignore[userid];
$chat.append('<div class="chat">User ' + userid + ' no longer ignored.</div>');
}
} else if (text.toLowerCase() === '/clear') {
$chat.empty();
} else {
text = ('\n' + text).replace(/\n\n/g, '\n').replace(/\n/g, '\n/pm ' + userid + ', ').substr(1);
if (text.length > 80000) {