[ROSEV_IRCSYSTEM]

- Support at least server-given QUIT messages.
- Change the ping interval and timeout to more aggressive values to notice unexpected disconnections faster.

svn path=/trunk/rosev_ircsystem/; revision=1240
This commit is contained in:
Colin Finck 2010-12-12 09:56:24 +00:00
parent 4795dd1a8b
commit 4b73b625a0
3 changed files with 6 additions and 6 deletions

View File

@ -126,7 +126,7 @@ CIRCServer::DisconnectNetworkClient(CNetworkClient* Client, const std::string& R
if(!JoinedChannels.empty())
{
std::set<CClient*> HandledClients;
std::string Response(boost::str(boost::format(":%s QUIT") % Client->GetPrefix()));
std::string Response(boost::str(boost::format(":%s QUIT :%s") % Client->GetPrefix() % Reason));
for(std::set<CChannel*>::const_iterator ChannelIt = JoinedChannels.begin(); ChannelIt != JoinedChannels.end(); ++ChannelIt)
{

View File

@ -77,12 +77,12 @@ CLogBot::_LogMessage_PRIVMSG(CClient* Sender, const std::vector<std::string>& Pa
void
CLogBot::_LogMessage_QUIT(CClient* Sender, const std::vector<std::string>& Parameters)
{
/* Expect no parameters */
assert(Parameters.empty());
/* Expect one parameter */
assert(Parameters.size() == 1);
/* Report the QUIT for every logged channel this user is a member of */
const boost::ptr_map<std::string, CChannel>& Channels = m_IRCServer.GetChannels();
std::string LogMessage(boost::str(boost::format("%s %s has quit the server\n") % _GetLogTimestamp() % Sender->GetNickname()));
std::string LogMessage(boost::str(boost::format("%s %s has quit the server (%s)\n") % _GetLogTimestamp() % Sender->GetNickname() % Parameters[0]));
for(boost::ptr_map<std::string, std::ofstream>::iterator ChannelStreamIt = m_ChannelStreamMap.begin(); ChannelStreamIt != m_ChannelStreamMap.end(); ++ChannelStreamIt)
{

View File

@ -41,6 +41,6 @@
#define IDENTIFY_TIMEOUT 240
#define MOTD_LINE_LENGTH 80
#define NICKNAME_LENGTH 30
#define PING_INTERVAL 200
#define PING_TIMEOUT 120
#define PING_INTERVAL 120
#define PING_TIMEOUT 60
#define REGISTRATION_TIMEOUT 120