Mercurial > wow > ouroloot
comparison core.lua @ 150:63bda09d88fe
Add 'on5', 'ver[sion]' command arguments, and an on5 dropdown entry.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Thu, 08 Jan 2015 16:03:55 -0500 |
parents | df0ca8ed1aff |
children | 42dd3076baaf |
comparison
equal
deleted
inserted
replaced
149:df0ca8ed1aff | 150:63bda09d88fe |
---|---|
1861 LE_ITEM_QUALITY_UNCOMMON, 'help') | 1861 LE_ITEM_QUALITY_UNCOMMON, 'help') |
1862 function addon:OnSlash (txt) --, editbox) | 1862 function addon:OnSlash (txt) --, editbox) |
1863 txt = strtrim(txt:lower()) | 1863 txt = strtrim(txt:lower()) |
1864 local cmd, arg = "" | 1864 local cmd, arg = "" |
1865 do | 1865 do |
1866 local s,e = txt:find("^%a+") | 1866 local s,e = txt:find("^%w+") |
1867 if s then | 1867 if s then |
1868 cmd = txt:sub(s,e) | 1868 cmd = txt:sub(s,e) |
1869 s = txt:find("%S", e+2) | 1869 s = txt:find("%S", e+2) |
1870 if s then arg = txt:sub(s,-1) end | 1870 if s then arg = txt:sub(s,-1) end |
1871 end | 1871 end |
1882 self:SetThreshold(arg) | 1882 self:SetThreshold(arg) |
1883 | 1883 |
1884 elseif cmd == "on" then self:Activate("cmdon",arg) | 1884 elseif cmd == "on" then self:Activate("cmdon",arg) |
1885 elseif cmd == "off" then self:Deactivate() | 1885 elseif cmd == "off" then self:Deactivate() |
1886 elseif cmd == "broadcast" or cmd == "bcast" then self:Activate("cmdbcast",nil,true) | 1886 elseif cmd == "broadcast" or cmd == "bcast" then self:Activate("cmdbcast",nil,true) |
1887 elseif cmd == "on5" then self.debug.notraid = true self:Activate("cmdon5",arg) | |
1887 | 1888 |
1888 elseif cmd == "toggle" then | 1889 elseif cmd == "toggle" then |
1889 if self.display then | 1890 if self.display then |
1890 self.display:Hide() | 1891 self.display:Hide() |
1891 else | 1892 else |
1920 elseif cmd == "restore" and arg and arg:len() > 0 then | 1921 elseif cmd == "restore" and arg and arg:len() > 0 then |
1921 self:save_restore(tonumber(arg)) | 1922 self:save_restore(tonumber(arg)) |
1922 elseif cmd == "delete" and arg and arg:len() > 0 then | 1923 elseif cmd == "delete" and arg and arg:len() > 0 then |
1923 self:save_delete(tonumber(arg)) | 1924 self:save_delete(tonumber(arg)) |
1924 | 1925 |
1926 elseif cmd:find("^ver") then | |
1927 self:Print(self.status_text) | |
1925 elseif cmd == "help" then | 1928 elseif cmd == "help" then |
1926 self:BuildMainDisplay('help') | 1929 self:BuildMainDisplay('help') |
1927 elseif cmd == "ping" then | 1930 elseif cmd == "ping" then |
1928 self:DoPing() | 1931 self:DoPing() |
1929 | 1932 |