Mercurial > wow > squawk
comparison Squawk.lua @ 19:431f2fce08f2
Added in link stripping
Coloured class names
Reply to specific squawk
Related squawks fixed
new arrow to indicate reply
limit to 140 characters
| author | wobin |
|---|---|
| date | Tue, 12 May 2009 00:57:59 +1000 |
| parents | a3328fffef5c |
| children | 22178ac75587 |
comparison
equal
deleted
inserted
replaced
| 18:a3328fffef5c | 19:431f2fce08f2 |
|---|---|
| 16 local Settings = Model.UserSettings | 16 local Settings = Model.UserSettings |
| 17 | 17 |
| 18 local defaults = { | 18 local defaults = { |
| 19 profile = { | 19 profile = { |
| 20 Squawks = {}, | 20 Squawks = {}, |
| 21 Squawkers = {}, | |
| 21 Follower = {}, | 22 Follower = {}, |
| 22 Following = {}, | 23 Following = {}, |
| 23 Pending = {}, | 24 Pending = {}, |
| 24 Requested = {}, | 25 Requested = {}, |
| 25 Blocked = {}, | 26 Blocked = {}, |
| 28 local SquawkViewMeta = { __tostring = function() return "SquawkView" end } | 29 local SquawkViewMeta = { __tostring = function() return "SquawkView" end } |
| 29 | 30 |
| 30 function Squawk:OnInitialize() | 31 function Squawk:OnInitialize() |
| 31 Model.db = LibStub("AceDB-3.0"):New("SquawkDB", defaults) | 32 Model.db = LibStub("AceDB-3.0"):New("SquawkDB", defaults) |
| 32 Model.Squawks.Main = Model.db.profile.Squawks | 33 Model.Squawks.Main = Model.db.profile.Squawks |
| 34 Model.Squawks.Squawkers = Model.db.profile.Squawkers | |
| 33 Settings.Follower = Model.db.profile.Follower | 35 Settings.Follower = Model.db.profile.Follower |
| 34 Settings.Following = Model.db.profile.Following | 36 Settings.Following = Model.db.profile.Following |
| 35 Settings.Pending = Model.db.profile.Pending | 37 Settings.Pending = Model.db.profile.Pending |
| 36 Settings.Requested = Model.db.profile.Requested | 38 Settings.Requested = Model.db.profile.Requested |
| 37 Settings.Blocked = Model.db.profile.Blocked | 39 Settings.Blocked = Model.db.profile.Blocked |
| 41 LibStub("AceTimer-3.0"):Embed(Controller) | 43 LibStub("AceTimer-3.0"):Embed(Controller) |
| 42 Controller:RegisterComm("Squawk", Controller.ReceiveMessage) | 44 Controller:RegisterComm("Squawk", Controller.ReceiveMessage) |
| 43 LibStub("AceConsole-3.0"):Embed(View) | 45 LibStub("AceConsole-3.0"):Embed(View) |
| 44 setmetatable(View, SquawkViewMeta) | 46 setmetatable(View, SquawkViewMeta) |
| 45 | 47 |
| 48 Controller.Name = UnitName("player") | |
| 49 _, Controller.Class = UnitClass("player") | |
| 50 | |
| 46 Model.Squawks.Reload(Model.Squawks) -- Retrain the table lookups | 51 Model.Squawks.Reload(Model.Squawks) -- Retrain the table lookups |
| 47 end | 52 end |
