Paris and Kim write a popular new holodeck program about an Irish village called Fair Haven. Captain Janeway enters the program, and while she is taking a tour the crew is alerted to an approaching storm front. Lt. Torres informs the captain that the disruption caused by the storm prevents Voyager from going to warp, and impulse power won't be enough to outrun the storm. Janeway decides to batten down the hatches, drop anchor, and ride out the storm.
After a discussion about crew morale with Neelix, Janeway agrees to allow the program to continue to run. During this downtime many of the crew stop in to visit the characters in Fairhaven. Some even take roles in the village, the Doctor becomes the town priest and admonishes Paris and Kim to attend the next services. Captain Janeway stops again to visit the program, but eventually becomes involved in an all-night "fun-n-chat" session with one of the holodeck characters named Michael Sullivan. After spending the entire night lost in a relaxed enjoyable "date" with Sullivan, morning brings his holo-wife into the program. At this point Janeway is flustered, and leaves the program, returning to the bridge as the first wave of the storm hits. It is realized that the storm will last another 3 days, and the captain gives Paris and Kim permission to expand the program to holodeck 2. At this point Captain Janeway even gets involved in doing a little creative programing herself, by editing the character of Sullivan, the holo-man she found so enjoyable. She gives him more intelligence, a few traits that make him more compatible with her personality, and finally deletes his holo-wife. While fraternizing with her "new-and-improved" version of Sullivan, Chakotay happens through the program, but does not interfere.
At this point Janeway has mixed emotions about her motives, and eventually discusses moral and ethical implications of having a "relationship" with a holodeck character with Chakotay. Being so far removed from any practical relationship with a "real" person, and realizing that her first officer believes it could produce healthy results, Janeway continues to enjoy the holodeck program (as "Katie O'Clare"). Eventually she loses herself in the program to the point where she removes the other characters, and kisses Sullivan.
While the captain is out tending to ships business in the real-world, Sullivan, who is depressed because he thinks Katie has left him, starts a fight in the holodeck which quickly grows into an all out brawl with both holodeck characters and crew members suffering the effects. The captain eventually walks in, and after learning what happened, shares her thoughts and concerns with "the Doctor". The Doctor, of course, sees all holograms as equals to the flesh and blood counterparts, and provides his perspective to the captain.
Eventually the full brunt of the storm hits with its most destructive forces taking out many of the ships systems. While some of the holodeck program Fairhaven survives, many of its finer points are lost. When approached by Tom and Harry about what can and should be saved, the captain returns to the holodeck. She does decide to save the character of Sullivan, and after more thought - tells the computer to deny her (Janeway herself) access to modifying any more of the programs sub-routines.