Dylann Roof laid it out for those who would listen. For years before he allegedly killed nine people at Charleston’s Emanuel AME church, Roof had been spouting hate speech. Two weeks before the shooting, in the midst of a drunken, racist rant, he threatened to do “something crazy” with the .45 pistol he’d recently acquired. The boast led a friend, Joseph Meek, to hide the gun, before returning it to avoid violating his probation.

Despite Roof’s hints of violent intentions, it appears no one who heard them notified authorities. In that, they’re not rare; warning signs tend to be blatantly obvious only in hindsight. But let’s imagine a future situation when the call to the local police is made. What mechanisms could then be activated? When law enforcement is tipped off, how much leeway do they have to step in before any crimes are committed?

Only a handful of states have programs that empower law enforcement to intervene in cases where someone possessing a gun appears to be a risk to themselves or others, regardless of their criminal record. Last fall, after police failed to stop Isla Vista shooter Elliot Rodger despite many earlier pleas from his parents, California became the first state to institute a “gun violence restraining order.” Family members can petition the court to temporarily confiscate firearms from individuals who present a threat to themselves or others — even if the weapon was purchased legally, as Roof’s was. A person issued with the order loses custody of their gun for 21 days, at which point they have a hearing in court. If the court determines the individual is still poised for violence, the order can be renewed for successive one-year periods. Once the person is no longer deemed dangerous, he gets his gun back. The law expands the state’s existing powers to confiscate guns: The individual receiving the restraining order only needs to display dangerous or threatening behaviors, a lower standard than earlier laws that required documentation of mental illness to confiscate weapons.

In Connecticut and Indiana, police can seize weapons from individuals, without a warrant, if there’s probable cause to believe the person will harm themselves or others. An Indiana University study of these orders in the state’s Marion County found that most people who had their weapons seized never showed up to the subsequent court hearings, which means that their guns were destroyed. But when the person did show up, most got their guns back, albeit months later. New Jersey legislators introduced a bill last year to set up a gun violence restraining-order program similar to California’s, but it has not received a vote.

Despite its generally loose gun laws, South Carolina has a rule on its books that might have taken Dylann Roof’s guns out of his hands. Under the statute, police and prosecutors can petition a circuit or county judge to deem someone “adjudged unfit to carry or possess a firearm,” though that person “is entitled to reasonable notice and a proper hearing prior to any such adjudication.” People who raise red flags are supposed to be warned before police confiscate their guns, and they can argue in court to keep them. But it’s unclear what criteria would lead police to seek such an order, and the text of the law is scant on details on how to enforce it — notably, the burden of proof necessary to make such a determination, the duration of the prohibition, or even if this process would be its own legal proceeding or a part of a larger case. (Multiple calls by The Trace to the South Carolina Law Enforcement Division as well as the Lexington County criminal court, which would have had jurisdiction over Roof, went unanswered.)

The key ingredient in any temporary gun restraining-order system, of course, is for signs of potential violence to not just raise eyebrows, but throw up red flags. And that would require cultural changes as much as new policies. Those who heard Roof’s rants chalked it up to boozy talk.

[Photo: AP/ Jae C. Hong. In this May 24, 2014 photo, Santa Barbara County Sheriff Bill Brown walks past a board showing the photos of gunman Elliot Rodger and the weapons he used in the mass shooting that took place in Isla Vista, Calif.]