Mercurial > wow > ouroloot
diff core.lua @ 23:8664134bba4f
Add '/ouroloot ping' command, same functionality as button in options panel.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Fri, 09 Sep 2011 00:56:13 +0000 |
parents | 33ce273687ab |
children | 61d932f0e8f2 |
line wrap: on
line diff
--- 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