Generalized derivations as Jordan homomorphisms on lie ideals and right ideals