Here is a great scientific report.
The conclusion says it all –
Modafinil can be used by anyone, who wishes to work late, stay awake, enhance their cognitive reactions, or brighten their moods. Users may already be under a great level of stress, i.e. cancer patients or soldiers in a battle field. A psychoneuroimmunological approach is thus needed to investigate the multi-functional effects of modafinil.