This is certainly not the answer you wanted to get, but use Ultimate Blacklist (
http://rom.curseforge.com/addons/ultimate-blacklist/) for that. The reason is: You are about to eventually blacklist a lot of spammers, but the default, in-game solution has a limited maximum size. This will cause troubles whenever there are too many spammers, the list got full, or you want to blacklist someone for whatever reason. Ultimate Blacklist therefore manages it's own blacklist, that you can also access and modify via it's configuration gui. It also has a more advanced spam detection algorithm that will help situations where spammers try to get around chat filters.
Regarding your code. The if-statement is the reason your code fails. It consists of:
|
Source code
|
1
|
if evaluation or value then
|
Lua handles any value different from false or nil as true and because a string (even if it was empty) will cause the second part of your statement to get true your blacklisting code won't get skipped. You probably wanted to write
|
Source code
|
1
|
if arg1=="lvinn" or arg1=="cheap gold" then
|
Btw. The function TEXT is used to get a localized string from the clients string ressources. It will return the localized string for the key you call the function with, or the key itself, if no matching ressource was found.