Mercurial > wow > mailopener
comparison Modules/OpenAll.lua @ 150:2b11229bf239
Hopefully fixed the auction house mail filters.
| author | Zerotorescue |
|---|---|
| date | Wed, 29 Jun 2011 10:33:35 +0200 |
| parents | 4b4e25bf2c2e |
| children |
comparison
equal
deleted
inserted
replaced
| 149:b56375d442f6 | 150:2b11229bf239 |
|---|---|
| 431 end | 431 end |
| 432 end | 432 end |
| 433 | 433 |
| 434 -- Return the type of mail a message subject is | 434 -- Return the type of mail a message subject is |
| 435 local knownAHSubjectPatterns = { | 435 local knownAHSubjectPatterns = { |
| 436 canceled = AUCTION_REMOVED_MAIL_SUBJECT:gsub("%s", ""), | 436 canceled = AUCTION_REMOVED_MAIL_SUBJECT:format(""), |
| 437 expired = AUCTION_EXPIRED_MAIL_SUBJECT:gsub("%s", ""), | 437 expired = AUCTION_EXPIRED_MAIL_SUBJECT:format(""), |
| 438 outbid = AUCTION_OUTBID_MAIL_SUBJECT:gsub("%s", ""), | 438 outbid = AUCTION_OUTBID_MAIL_SUBJECT:format(""), |
| 439 success = AUCTION_SOLD_MAIL_SUBJECT:gsub("%s", ""), | 439 success = AUCTION_SOLD_MAIL_SUBJECT:format(""), |
| 440 won = AUCTION_WON_MAIL_SUBJECT:gsub("%s", ""), | 440 won = AUCTION_WON_MAIL_SUBJECT:format(""), |
| 441 }; | 441 }; |
| 442 function mod:GetAuctionMailType(subject) | 442 function mod:GetAuctionMailType(subject) |
| 443 if subject then | 443 if subject then |
| 444 -- Check if any of our patterns match, sorted by most likely matches first (if one is true the rest shouldn't be evaluated) | 444 -- Check if any of our patterns match, sorted by most likely matches first (if one is true the rest shouldn't be evaluated) |
| 445 if subject:find(knownAHSubjectPatterns.expired) then | 445 if subject:find(knownAHSubjectPatterns.expired) then |
