@@ -30,7 +30,6 @@ CServer::CServer ( const int iNewMaxNumChan,
3030 const QString& strServerBindIP,
3131 const quint16 iPortNumber,
3232 const quint16 iQosNumber,
33- const QString& strHTMLStatusFileName,
3433 const QString& strDirectoryAddress,
3534 const QString& strServerListFileName,
3635 const QString& strServerInfo,
@@ -54,8 +53,6 @@ CServer::CServer ( const int iNewMaxNumChan,
5453 Socket ( this , iPortNumber, iQosNumber, strServerBindIP, bNEnableIPv6 ),
5554 Logging(),
5655 iFrameCount ( 0 ),
57- bWriteStatusHTMLFile ( false ),
58- strServerHTMLFileListName ( strHTMLStatusFileName ),
5956 HighPrecisionTimer ( bNUseDoubleSystemFrameSize ),
6057 ServerListManager ( iPortNumber,
6158 strDirectoryAddress,
@@ -193,14 +190,6 @@ CServer::CServer ( const int iNewMaxNumChan,
193190 Logging.Start ( strLoggingFileName );
194191 }
195192
196- // HTML status file writing
197- if ( !strServerHTMLFileListName.isEmpty () )
198- {
199- // activate HTML file writing and write initial file
200- bWriteStatusHTMLFile = true ;
201- WriteHTMLChannelList ();
202- }
203-
204193 // manage welcome message: if the welcome message is a valid link to a local
205194 // file, the content of that file is used as the welcome message (#361)
206195 SetWelcomeMessage ( strNewWelcomeMessage ); // first use given text, may be overwritten
@@ -504,11 +493,6 @@ void CServer::OnAboutToQuit()
504493 }
505494
506495 Stop ();
507-
508- if ( bWriteStatusHTMLFile )
509- {
510- WriteHTMLServerQuit ();
511- }
512496}
513497
514498void CServer::OnHandledSignal ( int sigNum )
@@ -1267,12 +1251,6 @@ void CServer::CreateAndSendChanListForAllConChannels()
12671251 vecChannels[i].CreateConClientListMes ( vecChanInfo );
12681252 }
12691253 }
1270-
1271- // create status HTML file if enabled
1272- if ( bWriteStatusHTMLFile )
1273- {
1274- WriteHTMLChannelList ();
1275- }
12761254}
12771255
12781256void CServer::CreateAndSendChanListForThisChan ( const int iCurChanID )
@@ -1571,54 +1549,6 @@ void CServer::SetWelcomeMessage ( const QString& strNWelcMess )
15711549 strWelcomeMessage = strWelcomeMessage.left ( MAX_LEN_CHAT_TEXT );
15721550}
15731551
1574- void CServer::WriteHTMLChannelList ()
1575- {
1576- // prepare file and stream
1577- QFile serverFileListFile ( strServerHTMLFileListName );
1578-
1579- if ( serverFileListFile.open ( QIODevice::WriteOnly | QIODevice::Text ) )
1580- {
1581- QTextStream streamFileOut ( &serverFileListFile );
1582-
1583- // depending on number of connected clients write list
1584- if ( GetNumberOfConnectedClients () == 0 )
1585- {
1586- // no clients are connected -> empty server
1587- streamFileOut << " No client connected\n " ;
1588- }
1589- else
1590- {
1591- streamFileOut << " <ul>\n " ;
1592-
1593- // write entry for each connected client
1594- for ( int i = 0 ; i < iMaxNumChannels; i++ )
1595- {
1596- if ( vecChannels[i].IsConnected () )
1597- {
1598- streamFileOut << " <li>" << vecChannels[i].GetName ().toHtmlEscaped () << " </li>\n " ;
1599- }
1600- }
1601-
1602- streamFileOut << " </ul>\n " ;
1603- }
1604- }
1605- }
1606-
1607- void CServer::WriteHTMLServerQuit ()
1608- {
1609- // prepare file and stream
1610- QFile serverFileListFile ( strServerHTMLFileListName );
1611-
1612- if ( !serverFileListFile.open ( QIODevice::WriteOnly | QIODevice::Text ) )
1613- {
1614- return ;
1615- }
1616-
1617- QTextStream streamFileOut ( &serverFileListFile );
1618- streamFileOut << " Server terminated\n " ;
1619- serverFileListFile.close ();
1620- }
1621-
16221552void CServer::customEvent ( QEvent* pEvent )
16231553{
16241554 if ( pEvent->type () == QEvent::User + 11 )
0 commit comments