The person dropped the pistol.
The pistol that is legendary in the game is called Infinite. It is obtained randomly from any suitable loot source, but has an increased chance to be dropped from the Gold Golem located in the Mines of Avarice, tubby enemies during True Vault Hunter Mode, and Dr. Mercy located in Three Horns - Valley.