(a) A person commits an offense who intentionally:
(1) Communicates a threat to another person, and the person communicating the threat:
(A) Intends the communication to be a threat of harm to the victim; and
(B) A reasonable person would perceive the communication to be a threat of harm;
(2) Communicates with another person without lawful purpose, anonymously or otherwise, with the intent that the frequency or means of the communication annoys, offends, alarms, or frightens the recipient and, by this action, annoys, offends, alarms, or frightens the recipient;
(3) Communicates to another person, with intent to harass that person, that a relative or other person has been injured or killed when the communication is known to be false; or
(4) Communicates with another person or transmits or displays an image without legitimate purpose with the intent that the image is viewed by the victim by any method described in subdivision (a)(1) and the person:
(A) Maliciously intends the communication to be a threat of harm to the victim; and
(B) A reasonable person would perceive the communication to be a threat of harm.
(b)
(1) A person convicted of a criminal offense commits an offense if, while incarcerated, on pretrial diversion, probation, community correction or parole, the person intentionally communicates in person with the victim of the person's crime if the communication is:
(A) Anonymous or threatening or made in an offensively repetitious manner or at hours known to be inconvenient to the victim;
(B) Made for no legitimate purpose; and
(C) Made knowing that it will alarm or annoy the victim.
(2) If the victim of the person's offense died as the result of the offense, this subsection (b) shall apply to the deceased victim's next-of-kin.
(c)
(1) Except as provided in subsection (d), a violation of subsection (a) is a Class A misdemeanor.
(2) A violation of subsection (b) is a Class E felony.
(d) A violation by a minor of subdivision (a)(4) is a delinquent act and shall be punishable only by up to thirty (30) hours of community service, without compensation, for charitable or governmental agencies as determined by the court.
(e) As used in this section:
(1) “Communicate” means contacting a person in writing or print or by telephone, wire, radio, electromagnetic, photoelectronic, photooptical, or electronic means, and includes text messages, facsimile transmissions, electronic mail, instant messages, and messages, images, video, sound recordings, or intelligence of any nature sent through or posted on social networks, social media, or websites;
(2) “Electronic communications service” means any transfer of signs, signals, writing, images, sounds, data, or intelligence of any nature transmitted in whole or in part by a wire, radio, electromagnetic, photoelectronic or photooptical system;
(3) “Image” includes, but is not limited to, a visual depiction, video clip or photograph of another person;
(4) “Log files” mean computer-generated lists that contain various types of information regarding the activities of a computer, including, but not limited to, time of access to certain records, processes running on a computer or the usage of certain computer resources; and
(5) “Social network” means any online community of people who share interests and activities, or who are interested in exploring the interests and activities of others, and which provides ways for users to interact.
(f)
(1) The offense described in this section shall not apply to an entity providing an electronic communications service to the public acting in the normal course of providing that service.
(2) The service providers described in this subsection (f) shall not be required to maintain any record not otherwise kept in the ordinary course of that service provider's business; provided, however, that if any electronic communications service provider operates a website that offers a social network service and the electronic communications service provider provides services to consumers in this state, any log files and images or communications that have been sent, posted, or displayed on the social network service's website and maintained by the electronic communications service provider shall be disclosed to any governmental entity responsible for enforcing this section only if the governmental entity:
(A) Obtains a warrant issued using this state's warrant procedures by a court of competent jurisdiction;
(B) Obtains a court order for the disclosure under subdivision (f)(4); or
(C) Has the consent of the person who sent, posted, or displayed any log files and images or communications on the social network service's website maintained by the electronic communications service provider.
(3) No cause of action shall lie in any court against any provider of an electronic communications service, its officers, employees, agents, or other specified persons for providing information, facilities, or assistance in accordance with the terms of a court order or warrant.
(4) A court order for disclosure under subdivision (f)(2)(B) may be issued by any court that is a court of competent jurisdiction and shall issue only if the governmental entity offers specific and articulable facts showing that there are reasonable grounds to believe that the contents of an electronic communication, or the records or other information sought, are relevant and material to an ongoing criminal investigation. A court order shall not issue if prohibited by the law of this state. A court issuing an order pursuant to this section, on a motion made promptly by the service provider, may quash or modify the order, if the information or records requested are unusually voluminous in nature or compliance with the order otherwise would cause an undue burden on the provider.