       "obtained the sokoban prize"
       "defeated Medusa"])
 
+(def conducts
+     ["foodless"
+      "vegan"
+      "vegetarian"
+      "atheist"
+      "weaponless"
+      "pacifist"
+      "illiterate"
+      "polyless"
+      "polyselfless"
+      "wishless"
+      "artifact wishless"
+      "genocideless"])
+
 (defn zone [zonenum]
   (let [i (if (isa? (class zonenum) String)
             (Integer/parseInt zonenum)

                    (if (not (or (= achieve-diff 0)
                                 (= achieve-diff 0x200)
                                 (= achieve-diff 0x400)))
                      (parse-bitfield achievements achieve-diff)))

    (str "unhandled line: " data)))

(defn handle-livelog-line [irc line]
  (let [data (parse-line line)]
    (if (not (is-scum (:player data)))
      (let [out (make-livelog-out data)]
        (if out

         (catch Exception e
           (.error logger "tweet failed" e)))))))

(condp = "euas"
  "us" "american"
  "eu" "european"
  "us")

(defn friendly-region [rgn]
  (condp = rgn
    "us" "american"
    "eu" "european"
    rgn))
    
(defn make-game-action-out [data]
  (condp = (:game_action data)
    "started" (if (:character data)
                (format "%s enters the %s dungeon as a%s."
                        (:player data)
                        (friendly-region (:region data))
                        (:character data))
                (format "%s enters the %s dungeon as a%s %s %s."
                        (:player data)
                        (friendly-region (:region data))
                        (:alignment data)
                        (race (:race data))
                        (role (:role data))))
    "resumed" (if (:character data)
                (format "%s the%s resumes the adventure in the %s realm."
                        (:player data)
                        (:character data)
                        (friendly-region (:region data)))
                (format "%s the %s %s resumes the adventure in the %s realm."
                        (:player data)
                        (race (:race data))
                        (role (:role data))
                        (friendly-region (:region data))))
    
    "saved" (format "%s is taking a break from the hard life as an adventurer."
                    (:player data))
