Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv19012
Modified Files:
commands.cpp makemenus.cpp network.cpp player.cpp player.h
wolfpack.cpp
Log Message:
Revised idle logout behaviour.
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.202
retrieving revision 1.203
diff -C2 -d -r1.202 -r1.203
*** commands.cpp 13 Sep 2003 13:08:40 -0000 1.202
--- commands.cpp 14 Sep 2003 16:09:01 -0000 1.203
***************
*** 61,64 ****
--- 61,66 ----
void cCommands::process( cUOSocket *socket, const QString &command )
{
+ socket->log( QString( "Used command '%1'.\n" ).arg( command ) );
+
if( !socket->player() )
return;
Index: makemenus.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/makemenus.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** makemenus.cpp 8 Sep 2003 10:58:47 -0000 1.59
--- makemenus.cpp 14 Sep 2003 16:09:01 -0000 1.60
***************
*** 2067,2071 ****
}
else
! Console::instance()->send( tr("WARNING: Missing %1 menu definition!").arg(section) );
}
--- 2067,2071 ----
}
else
! Console::instance()->send( tr( "WARNING: Missing %1 menu definition!" ).arg( section ) );
}
Index: network.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network.cpp,v
retrieving revision 1.138
retrieving revision 1.139
diff -C2 -d -r1.138 -r1.139
*** network.cpp 8 Sep 2003 10:58:47 -0000 1.138
--- network.cpp 14 Sep 2003 16:09:01 -0000 1.139
***************
*** 150,157 ****
else
{
- if( uiCurrentTime % 100 == 0 ) // Just every 100 ticks
- uoSocket->poll();
-
uoSocket->recieve();
}
}
--- 150,157 ----
else
{
uoSocket->recieve();
+
+ if( uiCurrentTime % 500 == 0 ) // Once every 0.5 Seconds
+ uoSocket->poll();
}
}
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** player.cpp 11 Sep 2003 15:33:58 -0000 1.39
--- player.cpp 14 Sep 2003 16:09:01 -0000 1.40
***************
*** 56,60 ****
account_ = NULL;
logoutTime_ = 0;
- clientIdleTime_ = 0;
muteTime_ = 0;
objectDelay_ = 0;
--- 56,59 ----
***************
*** 1579,1583 ****
}
else SET_INT_PROPERTY( "logouttime", logoutTime_ )
- else SET_INT_PROPERTY( "clientidletime", clientIdleTime_ )
else if( name == "muted" )
{
--- 1578,1581 ----
***************
*** 1619,1623 ****
GET_PROPERTY( "account", ( account_ != 0 ) ? account_->login() : QString( "" ) )
else GET_PROPERTY( "logouttime", (int)logoutTime_ )
- else GET_PROPERTY( "clientidletime", (int)clientIdleTime_ )
else GET_PROPERTY( "muted", isMuted() )
else GET_PROPERTY( "mutetime", (int)muteTime_ )
--- 1617,1620 ----
Index: player.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** player.h 9 Sep 2003 23:09:30 -0000 1.23
--- player.h 14 Sep 2003 16:09:01 -0000 1.24
***************
*** 118,122 ****
cAccount* account() const;
UINT32 additionalFlags() const;
- UINT32 clientIdleTime() const;
UINT32 logoutTime() const;
UINT32 muteTime() const;
--- 118,121 ----
***************
*** 144,148 ****
void setAccount(cAccount* data, bool moveFromAccToAcc = true);
void setAdditionalFlags(UINT32 data);
- void setClientIdleTime(UINT32 data);
void setLogoutTime(UINT32 data);
void setMuteTime(UINT32 data);
--- 143,146 ----
***************
*** 190,197 ****
UINT32 logoutTime_;
- // time till the char will be handled as idle.
- // compare with logoutTime! check it!
- UINT32 clientIdleTime_;
-
// Time till player will become unmuted again
// cOldChar::mutetime_
--- 188,191 ----
***************
*** 274,288 ****
{
additionalFlags_ = data;
- changed_ = true;
- }
-
- inline UINT32 cPlayer::clientIdleTime() const
- {
- return clientIdleTime_;
- }
-
- inline void cPlayer::setClientIdleTime(UINT32 data)
- {
- clientIdleTime_ = data;
changed_ = true;
}
--- 268,271 ----
Index: wolfpack.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v
retrieving revision 1.466
retrieving revision 1.467
diff -C2 -d -r1.466 -r1.467
*** wolfpack.cpp 13 Sep 2003 15:37:06 -0000 1.466
--- wolfpack.cpp 14 Sep 2003 16:09:01 -0000 1.467
***************
*** 312,315 ****
--- 312,316 ----
Console::instance()->setAttributes( true, false, true, 60, 140, 70, 12, FONT_NOSERIF );
Console::instance()->send( QString( "\n%1 %2 %3\n\n" ).arg( wp_version.productstring.latin1() ).arg( wp_version.betareleasestring.latin1() ).arg( wp_version.verstring.latin1() ) );
+ Console::instance()->setAttributes( false, false, false, 0xAF, 0xAF, 0xAF, 0, FONT_FIXEDWIDTH );
Console::instance()->send( "Copyright (C) 1997, 98 Marcus Rating (Cironian)\n");
***************
*** 549,566 ****
cNetwork::instance()->poll();
- for( cUOSocket *mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next() )
- {
- P_PLAYER player = mSock->player();
- if ( player && !player->isGM() && player->clientIdleTime() && player->clientIdleTime() < uiCurrentTime )
- {
- Console::instance()->send( tr("Player %1 disconnected due to inactivity !\n").arg( player->name() ) );
- cUOTxMessageWarning packet;
- packet.setReason( cUOTxMessageWarning::Idle );
- mSock->send( &packet );
- mSock->disconnect();
- }
- }
-
checkauto();
qApp->processEvents( 40 );
}
--- 550,555 ----
cNetwork::instance()->poll();
checkauto();
+
qApp->processEvents( 40 );
}
|