python/commands/reputation.py
raw| 1 | import CFReputation |
| 2 | import Crossfire |
| 3 | |
| 4 | def show_reputation(who): |
| 5 | reputations = CFReputation.reputation(who.Name) |
| 6 | lines = [] |
| 7 | if len(reputations) == 0: |
| 8 | lines.append("You don't have a reputation with anyone.") |
| 9 | else: |
| 10 | lines.append("You are known by the following factions:") |
| 11 | for p in reputations: |
| 12 | lines.append("\t%s....................%d" % (p[0], p[1])) |
| 13 | who.Message("\n".join(lines)) |
| 14 | |
| 15 | show_reputation(Crossfire.WhoAmI()) |