if not connected then level = self.db.realm.chars[name].level class = self.db.realm.chars[name].class local currentTime = time() if connected and nil or self.db.realm.chars[name].updated then local minutes = math.ceil((currentTime - self.db.realm.chars[name].updated) / 60) lastseen = minutes..' minute'..((minutes > 1) and 's' or '') if minutes > 59 then local hours = math.ceil((currentTime - self.db.realm.chars[name].updated) / 3600) lastseen = hours..' hour'..((hours > 1) and 's' or '') if hours > 23 then local days = math.ceil((currentTime - self.db.realm.chars[name].updated) / 86400) lastseen = days..' day'..((days > 1) and 's' or '') end end end end if self.db.profile.show.compact then -- Right now offline friends that have never been seen by the addon look out of place, for they are not getting munged. Fix? local nlt = (connected and '' or '|cff999999')..(self.db.profile.show.color.class and ('|cff'..BC:GetHexColor(class)) or '')..name..(self.db.profile.show.color.class and '|r' or '')..((self.db.profile.show.color.name and self.db.realm.chars[name].sex) and '|r' or '')..(connected and '' or '|cff999999')..(self.db.profile.show.pvp and (' / R'..(self.db.realm.chars[name].rank or '?')) or '')..(self.db.profile.show.clevels and (' / L'..self.db.realm.chars[name].level) or '')..((self.db.profile.show.guild and self.db.realm.chars[name].guild) and (' / '..self.db.realm.chars[name].guild) or '')..(connected and (' / '..area..((status ~= '') and ' ('..status..')' or '')) or (lastseen and (' / '..lastseen))) local it = '|cff999999'..((self.db.realm.chars[name].note and self.db.realm.chars[name].note ~= '') and self.db.realm.chars[name].note or 'No note') nameLocationText:SetText(nlt) infoText:SetText(it) else local nlt = ((self.db.profile.show.color.name and self.db.realm.chars[name].sex) and ('|cff'..self.colors_sex[self.db.realm.chars[name].sex]) or '')..(self.db.profile.show.pvp and rank or '')..name..((self.db.profile.show.color.name and self.db.realm.chars[name].sex) and '|r' or '')..(connected and '' or '|cff999999')..((self.db.profile.show.guild and self.db.realm.chars[name].guild) and (' <'..self.db.realm.chars[name].guild..'>') or '') local it = race..(self.db.profile.show.color.class and ('|cff'..BC:GetHexColor(class)) or '')..class..(self.db.profile.show.color.class and '|r' or '')..(connected and '' or (' - '..lastseen..' ago')) if connected then nameLocationText:SetText(format(FRIENDS_LIST_TEMPLATE, nlt, area, status)) else nameLocationText:SetText(format(FRIENDS_LIST_OFFLINE_TEMPLATE, nlt)) end infoText:SetText(format(FRIENDS_LEVEL_TEMPLATE, level, it)) end