cNetwork::instance()->lock();
Network::instance()->lock();
bool handleMenuSelect( unsigned int id ){	bool result = true;	cUOSocket *mSock;	unsigned int i;	switch( id )	{	case IDC_EXIT:		keeprun = 0;		if( canClose )			DestroyWindow( mainWindow );		break;	case ID_HELP_ABOUT:		DialogBox(appInstance, MAKEINTRESOURCE(IDD_DIALOGABOUT), mainWindow, (DLGPROC)AboutDialog);		break;	case ID_HELP_WOLFPACKHOMEPAGE:		ShellExecute(mainWindow, "open", "http://www.wpdev.org", 0, 0, SW_NORMAL);		break;	case ID_RELOAD_ACCOUNTS:		queueAction( RELOAD_ACCOUNTS );		break;	case ID_RELOAD_PYTHON:				queueAction( RELOAD_PYTHON );		break;	case ID_RELOAD_SCRIPTS:		queueAction( RELOAD_SCRIPTS );		break;	case ID_RELOAD_CONFIGURATION:		queueAction( RELOAD_CONFIGURATION );		break;	case ID_SERVER_SAVEWORLD:		queueAction( SAVE_WORLD );		break;	case ID_SERVER_LISTUSERS:		// We simply do our thread safety manually here		cNetwork::instance()->lock();		// Generate a list of Users		mSock = cNetwork::instance()->first();		i = 0;				for( mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next() )		{			if( mSock->player() )				Console::instance()->send( QString("%1) %2 [%3]\n").arg(++i).arg(mSock->player()->name()).arg(QString::number( mSock->player()->serial(), 16) ) );		}		cNetwork::instance()->unlock();		Console::instance()->send( QString( "Total Users Online: %1\n" ).arg( i ) );		break;	default:		result = false;	}	return result;}