|
|
@ -202,7 +202,7 @@ var OS = OneeSama.prototype;
|
|
|
|
|
|
|
|
|
|
|
|
var break_re = new RegExp("(\\S{" + DEFINES.WORD_LENGTH_LIMIT + "})");
|
|
|
|
var break_re = new RegExp("(\\S{" + DEFINES.WORD_LENGTH_LIMIT + "})");
|
|
|
|
/* internal refs, embeds */
|
|
|
|
/* internal refs, embeds */
|
|
|
|
var ref_re = />>(\d+|>\/s\/.+|>\/music\/s\/.+|>\/watch\?v=[\w-]{11}(?:#t=[\dhms]{1,9})?|>\/soundcloud\/[\w-]{1,40}\/[\w-]{1,80}|>\/@\w{1,15}\/\d{4,20}(?:\?s=\d+)?|>\/(?:a|sysint|nap)\/\d{0,10}|>\/rurus\/)/;
|
|
|
|
var ref_re = />>(\d+|>\/s\/.+|>\/music\/s\/.+|>\/watch\?v=[\w-]{11}(?:#t=[\dhms]{1,9})?|>\/soundcloud\/[\w-]{1,40}\/[\w-]{1,80}|>\/@\w{1,15}\/\d{4,20}(?:\?s=\d+)?|>\/(?:a|sysint|nap)\/\d{0,10}|>\/manual\/)/;
|
|
|
|
|
|
|
|
|
|
|
|
OS.hook = function (name, func) {
|
|
|
|
OS.hook = function (name, func) {
|
|
|
|
var hs = this.hooks[name];
|
|
|
|
var hs = this.hooks[name];
|
|
|
@ -263,8 +263,8 @@ OS.red_string = function (ref) {
|
|
|
|
var num = parseInt(ref.slice(4+2), 10);
|
|
|
|
var num = parseInt(ref.slice(4+2), 10);
|
|
|
|
dest = '../outbound/nap/' + (num ? ''+num : '');
|
|
|
|
dest = '../outbound/nap/' + (num ? ''+num : '');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (prefix == '>/r') {
|
|
|
|
else if (prefix == '>/m') {
|
|
|
|
dest ="/faq.html";
|
|
|
|
dest ="/info.html";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
this.tamashii(parseInt(ref, 10));
|
|
|
|
this.tamashii(parseInt(ref, 10));
|
|
|
@ -407,7 +407,7 @@ OS.karada = function (body) {
|
|
|
|
return output;
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var dice_re = /(#tea|#dame|#tutturu|#muri|#flip|#when|#du|#fun|#fcount|#test|#sleep|#janken|#8ball|#imfey|#\?(?:\[(?:\w,*)+\])?|#\d{0,2}d\d{1,4}(?:[+-]\d{1,4})?)/i;
|
|
|
|
var dice_re = /(#tea|#dame|#tutturu|#muri|#flip|#when|#du|#tip|#tipped|#test|#sleep|#janken|#8ball|#imfey|#\?(?:\[(?:\w,*)+\])?|#\d{0,2}d\d{1,4}(?:[+-]\d{1,4})?)/i;
|
|
|
|
exports.dice_re = dice_re;
|
|
|
|
exports.dice_re = dice_re;
|
|
|
|
|
|
|
|
|
|
|
|
var WHEN = [
|
|
|
|
var WHEN = [
|
|
|
@ -487,7 +487,7 @@ function parse_dice(frag)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return {n:1, faces: j};
|
|
|
|
return {n:1, faces: j};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (frag == '#fun' || frag == '#fcount' || frag == '#du')
|
|
|
|
if (frag == '#tip' || frag == '#tipped' || frag == '#du')
|
|
|
|
return {n: 1, faces: 2};
|
|
|
|
return {n: 1, faces: 2};
|
|
|
|
if (frag == '#tea')
|
|
|
|
if (frag == '#tea')
|
|
|
|
return {n: 1, faces: 2};
|
|
|
|
return {n: 1, faces: 2};
|
|
|
@ -561,10 +561,10 @@ function readable_dice(bit, d) {
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return '#du (Try asking again)';
|
|
|
|
return '#du (Try asking again)';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (bit == '#fun')
|
|
|
|
if (bit == '#tip')
|
|
|
|
return '#fun (' + d[0]+ ')';
|
|
|
|
return '#tip (' + d[0]+ ')';
|
|
|
|
if (bit == '#fcount')
|
|
|
|
if (bit == '#tipped')
|
|
|
|
return '#fcount (' + d[0] + ')';
|
|
|
|
return '#tipped (' + d[0] + ')';
|
|
|
|
if (bit == '#tea')
|
|
|
|
if (bit == '#tea')
|
|
|
|
return '#tea (' + ((d[0] === true)?"now!":d[0]+" hours") + ')';
|
|
|
|
return '#tea (' + ((d[0] === true)?"now!":d[0]+" hours") + ')';
|
|
|
|
if (bit == '#flip')
|
|
|
|
if (bit == '#flip')
|
|
|
|