- 26 名前:名無しさん@お腹いっぱい。 mailto:sage [2009/11/07(土) 01:29:07 ID:Gn+1hwCZ0]
- NGCommentExtensionで世界の新着コメを消すものすごいやっつけパッチ
新プレーヤーを使って無くてwrapperを未だに使ってる人用 --- NGCommentExtension_orig.java 2009-09-24 19:07:54.000000000 +0900 +++ NGCommentExtension.java 2009-11-06 20:53:39.011875000 +0900 @@ -156 +156 @@ - "(<chat[^>]+date=\"\\d+\")([^>]+no=\")(\\d+)(\"[^>]+user_id=\")([^\"]+)(\"[^>]*)>([^<]*)</chat>"); + "(<chat(?: anonymity=\"\\d+\")?[^>]+date=\"\\d+\"(?:[^>]+mail=\"([^\"]+)\")?)([^>]+no=\")(\\d+)(\"[^>]+user_id=\")([^\"]+)(\"[^>]*)>([^<]*)</chat>"); @@ -170,3 +170,4 @@ - String comm_no = m.group(3); - String user_id = m.group(5); - String comment = m.group(7); + String mail = m.group(2); + String comm_no = m.group(4); + String user_id = m.group(6); + String comment = m.group(8); @@ -173,0 +175,6 @@ + if(mail != null && mail.indexOf("_live") >= 0) { + matched = true; + if (NGCommLoggingNGWORD || Boolean.getBoolean("NGCommLoggingNGWORD")) + info("match No."+comm_no+" is live COMM "+cutStr(comment,15)); + } + else { @@ -184,0 +192 @@ + } @@ -186 +194 @@ - m.appendReplacement(sb, "$1 deleted=\"1\"$2$3$4$5$6></chat>"); + m.appendReplacement(sb, "$1 deleted=\"1\"$3$4$5$6$7></chat>"); @@ -189 +197 @@ - m.appendReplacement(sb, "$1$2$3$4$5$6>["+cutStr(user_id,8)+"] $7</chat>"); + m.appendReplacement(sb, "$1$3$4$5$6$7>["+cutStr(user_id,8)+"] $8</chat>");
|

|