Advertisement
Guest User

rescheck.js

a guest
Nov 23rd, 2015
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function beginCheck(th, cx) {
  2.     var ck = {}, bd = th.board;
  3. //  cx.setCheckRawText(false); //テキスト置換関数checkRawTextを実行しない。
  4.     cx.setCheckAA(false); //AA判定関数checkAAを実行しない。
  5.     cx.setCheckNG(false); //非表示判定関数checkNGを実行しない。
  6.     ck.forceNanashi = (/streaming|poverty/.test(bd.key)) ? bd.key : null;
  7.     return (Object.keys(ck)==0) ? false : ck;
  8. };
  9. function checkRawText(res, cx) {
  10.     var num = res.number;
  11.     var name = res.name;
  12.     var mail = res.mail;
  13.     var msg = res.message;
  14.     var ck = cx.checkObject;
  15.     if (ck.forceNanashi!==null && ck.forceNanashi!==undefined) {
  16.         if (forceNanashi(ck.forceNanashi, name)) res.setNanasi(true);
  17.     };
  18. };
  19. function checkAA(res, cx) {};
  20. function checkNG(res, cx) {};
  21. function endCheck(th, cx) {};
  22. function forceNanashi(board, name) {
  23.     var defaltNanashi = {
  24.     "streaming":"名無しさん@お腹いっぱい。"
  25.     ,"poverty":"番組の途中ですがアフィサイトへの転載は禁止です"
  26.     };
  27.     var addition = /^ <\/b>\(([ヲ-゚]+|JP|HappyBirthday!)[A-Z]? [-\w\/=+]+\)<b>( <small>.+?<\/small>)?$/;
  28.     return addition.test(name.replace(defaltNanashi[board], ""));
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement