This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Classic Theme
Thottbot Theme
[Scripting] IsIgnored
Post Reply
Return to board index
Post by
Wildhorn
Anybody could tell me why when you pass a variable to IsIgnored API, it doesnt work?
Example:
msg is a <playername-realmname> that exists
print(IsIgnored("\""..msg.."\""))
print(IsIgnored(msg))
print(msg)
print("\""..msg.."\"")
would return
nil
nil
<playername-realmname>
"<playername-realmname>"
Both nil show that it didnt work, yet the API AddIgnore(msg) works fine. Why IsIgnored is such a *!@#$?
EDIT: After some testing, IsIgnored will return 1 if I pass the name without the server name... but it is not very helpful when I have 2 players with the same name from different server on my ignore list :(
Post by
Wildhorn
While we are in the weird stuff, someone could explain this:
DelIgnore(msg)
AddIgnore(msg)
If player is not on my ignore list i show:
Player not found.
<playername-realmname> is now being ignored.
So far, everything is fine.
But if player is on my ignore list, it will show:
<playername> is already being ignored.
<playername-realmname> is not longer being ignored.
1) Why the &*!@ the first line doesnt show realmname
2) Why the *!@# the AddIgnore run before the DelIgnore?
Post by
Wanderingfox
because isignored returns nil unless that player is on your ignore list?
edit:
Pretty sure it stores the name as "name - realm" rather than "<name - realm>" too...
Post by
Wildhorn
Comon Fox. You didnt read correctly what I said.
The player is on my ignore list. But if I check IsIgnored with the realm name into it, it return nil, without the realm name, it return 1.
@ your edit: >_< <Something> means Something ... the <> are not there. It is just a way to show that it is a name.
Post by
Wanderingfox
you had it in quotes... I assumed the statement was literal.
Also, do you have the spaces in?
It's name - realm not name-realm
Post by
Wildhorn
No, there is no space around the "-".
Anyway, the goal of the post is not to find out how to ignore someone. It is to know why the @#$% these 3 API act in a such weird way.
Post by
HighFive
Since when can you ignore players not on your realm?
Isignored(<name>) works just fine.
Post by
ignis86
Since when can you ignore players not on your realm?
Since they extended the ignore list.
Post by
224056
This post was from a user who has deleted their account.
Post by
Wildhorn
Since when can you ignore players not on your realm?
Isignored(<name>) works just fine.
Since /lfd? :P
Post by
HighFive
Oh, I see. You could pass unitIDs as arguments. Would that work for you?
Post by
Wildhorn
Maybe, I dont know. I dont really need it anymore. But I just find it weird that blizzard updated AddIgnore and DelIgnore, but didnt update IsIgnored.
Post Reply
You are not logged in. Please
log in
to post a reply or
register
if you don't already have an account.