# HG changeset patch # User Farmbuyer of US-Kilrogg # Date 1315529773 0 # Node ID 8664134bba4f6f3269ab8c212b9bfe7c13c7a2df # Parent 33ce273687ab9935737d6c0d2eb9d0b79c012581 Add '/ouroloot ping' command, same functionality as button in options panel. diff -r 33ce273687ab -r 8664134bba4f core.lua --- a/core.lua Sun Sep 04 19:09:15 2011 +0000 +++ b/core.lua Fri Sep 09 00:56:13 2011 +0000 @@ -769,6 +769,13 @@ elseif cmd == "off" then self:Deactivate() elseif cmd == "broadcast" or cmd == "bcast" then self:Activate(nil,true) + elseif cmd == "toggle" then + if self.display then + self.display:Hide() + else + return self:BuildMainDisplay() + end + elseif cmd == "fake" then -- maybe comment this out for real users self:_mark_boss_kill (self._addLootEntry{ kind='boss',reason='kill',bosskill="Baron Steamroller",instance=instance_tag(),duration=0 @@ -799,12 +806,8 @@ elseif cmd == "help" then self:BuildMainDisplay('help') - elseif cmd == "toggle" then - if self.display then - self.display:Hide() - else - return self:BuildMainDisplay() - end + elseif cmd == "ping" then + self:DoPing() elseif cmd == "fixcache" then self:do_item_cache_fixup() @@ -973,6 +976,13 @@ end end +function addon:DoPing() + self:Print("Give me a ping, Vasili. One ping only, please.") + self.sender_list.active = {} + self.sender_list.names = {} + self:broadcast('ping') +end + -- Generic helpers function addon._find_next_after (kind, index) index = index + 1 diff -r 33ce273687ab -r 8664134bba4f gui.lua --- a/gui.lua Sun Sep 04 19:09:15 2011 +0000 +++ b/gui.lua Fri Sep 09 00:56:13 2011 +0000 @@ -1662,12 +1662,9 @@ [[Asks other raid users for their addon version and current status. Results displayed on User Options panel.]]) w:SetFullWidth(true) w:SetCallback("OnClick", function(_w) - addon:Print("Give me a ping, Vasili. One ping only, please.") - addon.sender_list.active = {} - addon.sender_list.names = {} _w:SetText("5... 4... 3...") _w:SetDisabled(true) - addon:broadcast('ping') + addon:DoPing() addon:ScheduleTimer(function(b) if b:IsVisible() then return addon:redisplay()