Mercurial > wow > mailopener
comparison Modules/OpenAll.lua @ 146:4b4e25bf2c2e
Fixed a bug in the OpenAll module where the remove string.replace function was being used.
| author | Zerotorescue |
|---|---|
| date | Tue, 28 Jun 2011 21:40:40 +0200 |
| parents | f662ee4d9c05 |
| children | 2b11229bf239 |
comparison
equal
deleted
inserted
replaced
| 145:beb98be1f2c7 | 146:4b4e25bf2c2e |
|---|---|
| 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:replace("%s", ""), | 436 canceled = AUCTION_REMOVED_MAIL_SUBJECT:gsub("%s", ""), |
| 437 expired = AUCTION_EXPIRED_MAIL_SUBJECT:replace("%s", ""), | 437 expired = AUCTION_EXPIRED_MAIL_SUBJECT:gsub("%s", ""), |
| 438 outbid = AUCTION_OUTBID_MAIL_SUBJECT:replace("%s", ""), | 438 outbid = AUCTION_OUTBID_MAIL_SUBJECT:gsub("%s", ""), |
| 439 success = AUCTION_SOLD_MAIL_SUBJECT:replace("%s", ""), | 439 success = AUCTION_SOLD_MAIL_SUBJECT:gsub("%s", ""), |
| 440 won = AUCTION_WON_MAIL_SUBJECT:replace("%s", ""), | 440 won = AUCTION_WON_MAIL_SUBJECT:gsub("%s", ""), |
| 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 |
