The show is based on real incidents that happened in Dodge City in 1883 when, crooked Mayor Alonzo Webster tried to put Luke Short and the Long Branch Saloon out of business. Bat called in his friends, including Wyatt Earp, to help. They called themselves the Dodge City Peace Commission.
In real life, it was prostitution that was outlawed, rather than the playing of music in saloons, which was very common and often included a band.
The picture the "Peace Commission" was posing for was taken on 10 June 1883. At that time "Bat" Masterson was 29 years old. Wyatt Earp was 34. This took place 1 year 8 months after the Gunfight at the O.K. Corral.
The title refers to the German legend of the Pied Piper of Hamlin, who rid the town of rats merely by playing his flute.
In real life, Luke Short and W. H. Harris owned the Long Branch saloon, not Bat Masterson. It was Luke Short who visited Governor George Washington Glick.