The Simpsons are having dinner with Selma and her new boyfriend, but it turns out it is Bart's enemy Sideshow Bob. During dinner, he tells the story of his terrible time at the prison. He wins an Emmy that gets taken away. He tells that he wanted to kill Bart, but also that he changed. Then he tells the story of how he and Selma met, which was during a prison pen-pal program. He supposedly turns a new leaf after he met Selma. He is then released from the prison, and the story ends. Bart refuses to believe that Sideshow Bob has gone good. Then Sideshow Bob asks Selma to marry him, and she eagerly accepts.
Sideshow Bob makes an appearance in the Krusty telethon, and he tells Krusty that there are no hard feelings. Bart is terrified of his soon-to-be new uncle, since Bob swore he'd get revenge on Bart for having him sent to prison for framing Krusty for armed robbery, and he would never trust him. The wedding is almost cancelled when Sideshow Bob admits that he hates Selma's favorite show, MacGyver, but is saved by Homer when he says that when Marge watches her shows he goes for a walk or drinks some beers and comes back still in love.
During the wedding everyone is happy except Bart. During the honeymoon while MacGyver is on, Sideshow Bob tries to kill Selma but his plan is ruined by Bart, who makes a "stinkin'" discovery, as Sideshow Bob referred to it. Sideshow Bob is taken away by the police, vowing to return the next time the Democrats are in power. After that, everyone thanks Bart for not losing his mistrust of Sideshow Bob.
In Selma's video, Bob was eager to have a fireplace in their room. Bart noticed the gas tap. Selma didn't smell the gas as she had lost her senses of smell and taste due to a bottle rocket accident as a child.
Selma promised at the wedding that she'll give up smoking except for after meals and after MacGyver. The spark from a match was enough to make the room explode.
The explosion that Bob later heard was Chief Wiggum tossing his cigar into the hotel room.