From 0d1e5ebdc1ee951623576313f5c167c315213d8f Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Thu, 5 Jul 2012 02:55:03 -0400 Subject: [PATCH] A couple fixes and improvements. --- earwigbot/commands/langcode.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/earwigbot/commands/langcode.py b/earwigbot/commands/langcode.py index 885b66e..7c13225 100644 --- a/earwigbot/commands/langcode.py +++ b/earwigbot/commands/langcode.py @@ -38,11 +38,14 @@ class Langcode(Command): code = data.args[0] site = self.bot.wiki.get_site() matrix = site.api_query(action="sitematrix")["sitematrix"] + del matrix["count"] del matrix["specials"] for site in matrix.itervalues(): if site["code"] == code: name = site["name"] + if name != site["localname"]: + name += " ({0})".format(site["localname"]) sites = ", ".join([s["url"] for s in site["site"]]) msg = "\x0302{0}\x0301 is {1} ({2})".format(code, name, sites) self.reply(data, msg)