git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@1335
56b19765-1e22-0410-a548-
a0f45d66c51a
/* copy the last line */
copyRawDataToBuffer( QString::null );
- if ( m_readNum == 0 && m_access2 == NULL ) {
+ if ( m_readNum == 0 && m_access2 == NULL && Kita::is2ch( m_datURL ) ) {
if ( Account::isLogged() ) {
initPrivate();
m_access2 = new OfflawAccess( m_datURL );
return QString( "http://%1/test/offlaw.cgi?raw=0.0&bbs=%2&key=%3" ).arg( root ).arg( board ).arg( datName );
}
+
+bool Kita::is2ch( const KURL& url )
+{
+ QRegExp url_2ch( "http://.*\\.2ch\\.net/.*" );
+ QRegExp url_bbspink( "http://.*\\.bbspink\\.com/.*" );
+
+ if ( url.isEmpty() ) return false;
+
+ if ( url_2ch.search( url.prettyURL() ) != -1 || url_bbspink.search( url.prettyURL() ) != -1 ) {
+ return true;
+ }
+
+ return false;
+}
int boardType( const QString& url );
uint datToSince( const QString& datURL );
QString datToOfflaw( const QString& datURL );
+ bool is2ch( const KURL& url );
}
#endif