Hi,
I assume that he has been working over those 4 years, otherwise how is he surviving? Does he have a PPS number? (Irish social insurance number needed for to pay income tax) Or is he working for cash under the table? What country is he from? Does that country require an entry visa in the first place? Did he ever have a work permit or work authorization? Does he have any Irish connection (parents, spouse, children, grandparents...)? Did he study in Ireland? Basically, did he arrive off the plane, started work in Ireland and has never left the country since?
For an illegal living in Ireland, life is pretty tough. If you are not registered with the Garda and you have no PPS number with the government, no passport visa or work permit/authorization, you basically do not exist. It would be difficult to leave the country and get back in at customs because your passport would not be stamped with the required 'leave to remain' stamp that is given to non-national people who have permission to live here.
Why is your friend deciding to go legal now?
I know that a lot of illegal Irish are living/working in the States and the Irish government are trying to organize a system with the American government for those illegals to allow them to stay in the US (basically admit their wrong doing and pay a fine)that's what I heard is in the works anyway. The same consideration cannot be said for the situation the other way around. I find the system here in Ireland not very easy-going for migrants, even if you follow every regulation & rule letter perfect. The current immigation situation is spread out over a number of government departments and organizations, so it can be difficult to find the information that you are looking for if you don't know where to look. The tolerance and acceptance for non-national people over here is debatable, there are quite a few news reports of dearly beloved attacks and non-nationals being treated badly by their employers with below minimun wages and substandard living accomodation. So, you can imagine the reaction to an illegal non-national, living/working in Ireland with no permit or visa.
While I can't give you insight into what will/might happen to your friend when he does decide to go legal, I can give you websites that deal in Irish immigration and non-nationals.
www.justice.ie is the Dept of Justice who handle immigation policy, citizenship & asylum. Follow the links for 'Site Guide', then 'Immigration, Asylum and Citizenship'. This will take you to a larger menu of immigration choices and give you the forms and requirements needed for citizenship.
www.entemp.ie is the Dept of Enterprise, Trade and Employment. They handle work permits, work authorizations and have all the information for non-national workers rights in Ireland.
www.garda.ie is the Irish police force (An Garda Siochana). They have a department within them (the GNIB) who handle registation of non-nationals as well as border control and deportations. Upon arriving in the State, a non-national (who is intending to live/work/stay longer than 3 months) is supposed to present himself to the Garda and be registered in the computer and issued a registration card.
www.immigrantcouncil.ie is an organization in Dublin (on St. Andrew's Street) set up to help non-nationals, they have a phone-in and drop-in service as well as email and may help get legal advice for non-nationals. I would strongly advise your friend to contact them and talk about his situation and his options.
Good luck to your friend,
Maria