summaryrefslogtreecommitdiff
path: root/js/matrix.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/matrix.js')
-rw-r--r--js/matrix.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/js/matrix.js b/js/matrix.js
index 81ced3e..96421ff 100644
--- a/js/matrix.js
+++ b/js/matrix.js
@@ -114,10 +114,15 @@ Matrix.prototype.mirc = function () {
Matrix.prototype.irssi = function(){
var txt = this.mirc()
.replace(/\%/g, '%%')
+ .replace(/\\/g, '\\')
.replace(/\"/g, '\\\"')
+ .replace(/\'/g, '\\\'')
.replace(/\`/g, '\\\`')
- .replace(/\\n/g, '\\n')
- .replace(/\x03/g, '\\x03')
+ .replace(/\s+\n/g, '\n')
+ .replace(/\s+$/g, '\n')
+ .replace(/\n/g, '\\n')
+ .replace(/\x03/g, '\\x03');
+ console.log(txt)
return '/exec -out printf "' + txt + '"\n'
}
Matrix.prototype.expand = function(i){