In Australia pistol licences have been quite difficult to get and fully automatic weapons have been banned since the Second World War. It took several mass shootings, mainly gang warfare, and the Port Arthur massacre of 28–29 April 1996 in which 35 people were killed and 23 wounded to trigger real action. It came only a short while after the Dunblane massacre which probably reinforced the intent of the politicians.
The goverment instituted a huge buyback of weapons and all automatic and semi-automatic weapons were banned, even the number of shots in a magazine were limited. To my mind they went a little over the top in some cases. My father's non functioning antique air rifle would have required a licence and when my daughter found it in a cupboard, not knowing what it was, she surrendered it to the police.
In any case none of this stops criminal access to guns. Anyone who really wants one can still get it as shown by the Martin Place, Sydney hostage crisis the led to the death of three people and the injury of another 4 in the police raid.