Mercurial > wow > guild-delta
comparison gd.lua @ 5:cf777d095730
Handle laggy server-at-login a bit better.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Tue, 14 Dec 2010 15:18:46 +0000 |
| parents | 9527583a842b |
| children | dffc0e7049ad |
comparison
equal
deleted
inserted
replaced
| 4:9527583a842b | 5:cf777d095730 |
|---|---|
| 402 end | 402 end |
| 403 | 403 |
| 404 | 404 |
| 405 function addon:GuildUpdate() | 405 function addon:GuildUpdate() |
| 406 local current_n = GetNumGuildMembers(true) | 406 local current_n = GetNumGuildMembers(true) |
| 407 if current_n <= 0 then | 407 if (current_n <= 0) or (not GetGuildInfo("player")) then |
| 408 -- catch the hell up, servers... | 408 -- catch the hell up, servers... |
| 409 return GuildRoster() | 409 return GuildRoster() |
| 410 end | 410 end |
| 411 self:UnregisterEvent("GUILD_ROSTER_UPDATE") | 411 self:UnregisterEvent("GUILD_ROSTER_UPDATE") |
| 412 self:SetScript("OnEvent", self.PLAYER_LOGOUT) -- keepin' it real^H^H^H^Hsmall and kludgey | 412 self:SetScript("OnEvent", self.PLAYER_LOGOUT) -- keepin' it real^H^H^H^Hsmall and kludgey |
| 415 | 415 |
| 416 if SV.logtext and #SV.logtext > 20000 then | 416 if SV.logtext and #SV.logtext > 20000 then |
| 417 self:Print("Your accumulated logfile has grown rather large; you should consider copying it out and clearing it.") | 417 self:Print("Your accumulated logfile has grown rather large; you should consider copying it out and clearing it.") |
| 418 end | 418 end |
| 419 | 419 |
| 420 local guild, realm = (GetGuildInfo("player")), GetRealmName() | 420 local guild = assert((GetGuildInfo("player")), "GetGuildInfo returns nil?") |
| 421 local realm = assert(GetRealmName(), "GetRealmName returns nil?") | |
| 421 local members = SV.members | 422 local members = SV.members |
| 422 local l10n = self.l10n | 423 local l10n = self.l10n |
| 423 if members[realm] | 424 if members[realm] |
| 424 and members[realm][guild] | 425 and members[realm][guild] |
| 425 and #(members[realm][guild]) > 0 | 426 and #(members[realm][guild]) > 0 |
