First off, yes a restore will clear your mods and unjailbreak your phone. Be careful however which firmware version you restore with.
Second, I wouldnt even worry about the mods...your problem has nothing to do with software, its simple the case. I would take it to Apple, they can either fix it - or they would have to replace it. I really dont think they would say anything about the mods.
Case in point - Last weekend my phone got fried by an FM trasmitter (you cant plug the Iphone into an ipod FM trasmitter so I later learned), the hardware on the inside was toast, I was running 1.1.1 fully modded and the "Apple Genius" gave me a brand new phone and even told me that even though I had modded the phone, that had nothing to do with my problem
