The two barbarians, Bravd and Weasel, are parodies of Fritz Leiber’s fantasy heroes Fafhrd and the Gray Mouser. The Swords series of books in which they star are absolute classics, and have probably had about as much influence on the genre as Tolkien’s Lord of the Rings.
The Swords stories date back as far as 1939, but more than sixty years later they have lost none of their appeal. Both The Colour of Magic and The Light Fantastic are, in large part, affectionate parodies of the Leiberian universe, although I hasten to add that, in sharp contrast to many later writers in the field, Leiber himself already had a great sense of humour. Fafhrd and the Mouser are not to be taken altogether serious in his original version, either.
Given all this, I can perhaps be forgiven for thinking that Terry intended Ankh-Morpork to be a direct parody of the great city of Lankhmar in which many of the Swords adventures take place. However, Terry explicitly denied this when I suggested it on alt.fan.pratchett:
"Bravd and the Weasel were indeed takeoffs of Leiber characters—there was a lot of that sort of thing in The Colour of Magic. But I didn’t—at least consciously, I suppose I must say—create Ankh-Morpork as a takeoff of Lankhmar."