A drug dealer was jailed for nine months after police used phone records to prove his guilt.
Charlie Anderson, of Hill Street, Dundee, admitted being concerned with the supply of cannabis between July 17 and July 26 2014 at Baldovan Terrace and elsewhere unknown to the prosecutor.
A not guilty plea was accepted from co-accused 24-year-old Michael Blair.
The court heard a cannabis cultivation was discovered at an address belonging to Anderson, but he denied all knowledge of it.
Depute fiscal Eilidh Robertson said when his phone was checked 100 text and Facebook messages were found relating to the supply of cannabis.
She said there were messages from suppliers looking to sell, other drug dealers looking to buy from Anderson as well as individuals looking to buy drugs.
Anderson also admitted having an offensive weapon, a Stanley knife, in a public place at Happyhillock Road on December 16 2015 while on bail.
The court heard he was stopped in the street at 3.30am about a road traffic matter.
Ms Robertson said: “The accused was unsteady on his feet and had a blue substance around his lips.
“A Stanley knife was found in his pocket.”
Defence solicitor Jim Laverty said: “He has played the system and lost considerably.
“Mr Anderson accepts that custody is inevitable.”
The court heard Anderson is already serving three jail sentences.
His earliest release date is September and his latest nine-month sentence will follow on after that.