{SML-whatever} is a bad idea imo. In an addon, don't ever dump things to chat that cause users to see gibberish if they don't have your addon installed. This is part of the reason we got the addon comm system. In fact, players who don't use your addon can report players sending excess {SML-icon_4_lol} to a GM.
Another thing, Shadowed, {spellid} is bad. At the very least, use {spell:id}. However, I'm still against it because it's garbage that people without your addon will see.
Edit:
On top of that, to implement either, you need to put a metatable on the blizzard icon list or use an AddMessage hook. Sticking a metatable on the blizzard list is bad because suppose you have several addons putting a metatable on it, you end up with a lot of extra overhead on EVERY CHAT MESSAGE. If you use the AddMessage hook, you should pick a different format so the blizzard parser for {} icons doesn't even try to match it.
Another thing, Shadowed, {spellid} is bad. At the very least, use {spell:id}. However, I'm still against it because it's garbage that people without your addon will see.
Yea I was thinking about it more and it just looks ugly in general when you show it in chat 12x12 icons don't look very good, just going to fall back to showing it locally as icons in combat text and the middle-of-screen alerts.
oh my frickin god. You people scare the hell out of me. {SML-whatever} is /retarded/. In an addon, don't ever dump things to chat that cause users to see gibberish if they don't have your addon installed. This is part of the reason we got the addon comm system. In fact, players who don't use your addon can report players sending excess {SML-icon_4_lol} to a GM.
reminds me of chatlinks :/ and sadly most people don't even now what garbage they are sending around since they themself don't see it...
Maybe an option for it but most ppl are used to the colours I think. I wouldn't go all out to change everything to icons.
Also Sylvanaar, for Prat give an option to add spell icon when a spell link is seen. :) oh, and do some smileys :) :p ;) :( etc.
Good ideas.
At the moment Prat has support for removing any {icon} which is unknown if icons are enabled in the game. I suggested it on the 2.4 blizzard thread, and got no response as usual - at least I didn't get flamed - that's an improvement.
The following code change in the base UI would be perfect
-- Search for icon links and replace them with texture links.
if ( arg7 < 1 or ( arg7 >= 1 and showChatIcons ) ) then
local term;
for tag in string.gmatch(arg1, "%b{}") do
term = strlower(string.gsub(tag, "[{}]", ""));
if ( ICON_TAG_LIST[term] and ICON_LIST[ICON_TAG_LIST[term]] ) then
arg1 = string.gsub(arg1, tag, ICON_LIST[ICON_TAG_LIST[term]] .. fontHeight .. ":" .. fontHeight .. "|t"); else
arg1 = string.gsub(arg1, tag, "");
end
end
end
And before you say "I cant send Lua code in chat" - you can, just disable the chat icons via the default UI's options panel.
Another thing, Shadowed, {spellid} is bad. At the very least, use {spell:id}. However, I'm still against it because it's garbage that people without your addon will see.
Edit:
On top of that, to implement either, you need to put a metatable on the blizzard icon list or use an AddMessage hook. Sticking a metatable on the blizzard list is bad because suppose you have several addons putting a metatable on it, you end up with a lot of extra overhead on EVERY CHAT MESSAGE. If you use the AddMessage hook, you should pick a different format so the blizzard parser for {} icons doesn't even try to match it.
This thread pissed me off, so I didn't bother responding to this part. But since it got resurected:
string.gsub (s, pattern, repl [, n])
Returns a copy of s in which all (or the first n, if given) occurrences of the pattern have been replaced by a replacement string specified by repl, which may be a string, a table, or a function. gsub also returns, as its second value, the total number of matches that occurred.
If repl is a string, then its value is used for replacement. The character % works as an escape character: any sequence in repl of the form %n, with n between 1 and 9, stands for the value of the n-th captured substring (see below). The sequence %0 stands for the whole match. The sequence %% stands for a single %.
If repl is a table, then the table is queried for every match, using the first capture as the key; if the pattern specifies no captures, then the whole match is used as the key.
If repl is a function, then this function is called every time a match occurs, with all captured substrings passed as arguments, in order; if the pattern specifies no captures, then the whole match is passed as a sole argument.
Why do you need a metatable, or any of the methods you suggest. I guess you understand the problem more than I do.
meh, send non standard icons over addon channels. that would naturaly exclude the 10 regular channels. i would think that this is an acceptable compromise.
So will I see {JunkIDoNotCareAbout} in any one of:
- General
- Trade
- Guild
- Battlegrounds
- Raid/Party?
I dont know. You cant be the police for everyone. I think you will see that with {star} too if you have icons off. So...
I proposed a simple solution, that blizzard or anyone else could implement. Its on the 2.4 thread and this one. 3 lines of code to the base ui code. If they dont add it there - then you can use a simple addon for this purpose, which hooks CF_MEH and does the same thing.
Also couldnt you place "(.+)" in the blizzard list and have it replaced by "" or maybe some null icon? I haven't really thought that one through, but it seems like you could.
I don't care if you people don't like it - its happening. The OP was about providing an expicit type for it in SML. I can just as easily invent my own name for the type and register stuff using some custom scheme to encode the icon size in either the filename or the short name - I was trying to come up with a standard.
Orion:
How do you send non-standard icons through the addon channel without rerouting all chat through there?
He means that an addon should not be sending non-standard stuff through normal channels.
Example: Prat has a itemlinking feature to send itemlinks on channels that cannot normally send itemlinks. This feature should be off by default because it severely annoys the hell out of people that do not use Prat to see long strings of itemlink gibberish.
I dont know. You cant be the police for everyone. I think you will see that with {star} too if you have icons off. So...
The key question here would be: Who's adding {star} to the message? A user or an addon? The first case is fine, the second case is spam. What is your addon doing?
The key question here would be: Who's adding {star} to the message? A user or an addon? The first case is fine, the second case is spam. What is your addon doing?
What's the difference, the user is using the addon.
My addon is removing unknown {icon}'s at the moment - that's it.
It may start adding {someicon} at some later point - which is part of the reason I made this post.
He means that an addon should not be sending non-standard stuff through normal channels.
Example: Prat has a itemlinking feature to send itemlinks on channels that cannot normally send itemlinks. This feature should be off by default because it severely annoys the hell out of people that do not use Prat to see long strings of itemlink gibberish.
Actually it is a direct copy of the addon ChatLink, and is on by default to support other users of chatlink or Prat. If it were off, then Prat users would see spam too. It only applies to custom channels (1-10), or at least it should.
In 2.4 you can create a filter for the event CHAT_MESSAGE_CHANNEL, and filter them out using the default ui using a macro or 1 line addon.
Yeah, I was probably not clear enough:
Will you be adding {nonStandardIcon} to outgoing chat messages without user intervention?
Not until some of these details get worked out.
Oh, yes, before i forget. You also realize that having the default ui strip out unknown {icon} could also be used to hide the itemlinks sent in custom channels as well. So, maybe some of you could post in support of my suggestion on the 2.4 thread.
Edit:
On top of that, to implement either, you need to put a metatable on the blizzard icon list or use an AddMessage hook. Sticking a metatable on the blizzard list is bad because suppose you have several addons putting a metatable on it, you end up with a lot of extra overhead on EVERY CHAT MESSAGE. If you use the AddMessage hook, you should pick a different format so the blizzard parser for {} icons doesn't even try to match it.
Yea I was thinking about it more and it just looks ugly in general when you show it in chat 12x12 icons don't look very good, just going to fall back to showing it locally as icons in combat text and the middle-of-screen alerts.
reminds me of chatlinks :/ and sadly most people don't even now what garbage they are sending around since they themself don't see it...
It varies too much with font size, and overlap is going to be a bit of an issue I'd imagine since even with 12x12 I had small overlap issues.
Chatlinks are evil, not many people seem to be using those kind of mods thankfully.
Maybe an option for it but most ppl are used to the colours I think. I wouldn't go all out to change everything to icons.
Also Sylvanaar, for Prat give an option to add spell icon when a spell link is seen. :) oh, and do some smileys :) :p ;) :( etc.
Good ideas.
At the moment Prat has support for removing any {icon} which is unknown if icons are enabled in the game. I suggested it on the 2.4 blizzard thread, and got no response as usual - at least I didn't get flamed - that's an improvement.
The following code change in the base UI would be perfect
And before you say "I cant send Lua code in chat" - you can, just disable the chat icons via the default UI's options panel.
This thread pissed me off, so I didn't bother responding to this part. But since it got resurected:
Why do you need a metatable, or any of the methods you suggest. I guess you understand the problem more than I do.
- General
- Trade
- Guild
- Battlegrounds
- Raid/Party?
I dont know. You cant be the police for everyone. I think you will see that with {star} too if you have icons off. So...
I proposed a simple solution, that blizzard or anyone else could implement. Its on the 2.4 thread and this one. 3 lines of code to the base ui code. If they dont add it there - then you can use a simple addon for this purpose, which hooks CF_MEH and does the same thing.
Also couldnt you place "(.+)" in the blizzard list and have it replaced by "" or maybe some null icon? I haven't really thought that one through, but it seems like you could.
I don't care if you people don't like it - its happening. The OP was about providing an expicit type for it in SML. I can just as easily invent my own name for the type and register stuff using some custom scheme to encode the icon size in either the filename or the short name - I was trying to come up with a standard.
Orion:
How do you send non-standard icons through the addon channel without rerouting all chat through there?
Example: Prat has a itemlinking feature to send itemlinks on channels that cannot normally send itemlinks. This feature should be off by default because it severely annoys the hell out of people that do not use Prat to see long strings of itemlink gibberish.
The key question here would be: Who's adding {star} to the message? A user or an addon? The first case is fine, the second case is spam. What is your addon doing?
What's the difference, the user is using the addon.
My addon is removing unknown {icon}'s at the moment - that's it.
It may start adding {someicon} at some later point - which is part of the reason I made this post.
Actually it is a direct copy of the addon ChatLink, and is on by default to support other users of chatlink or Prat. If it were off, then Prat users would see spam too. It only applies to custom channels (1-10), or at least it should.
In 2.4 you can create a filter for the event CHAT_MESSAGE_CHANNEL, and filter them out using the default ui using a macro or 1 line addon.
see: ChatMessage_AddMessageEventFilter()
Yeah, I was probably not clear enough:
Will you be adding {nonStandardIcon} to outgoing chat messages without user intervention?
Not until some of these details get worked out.
Oh, yes, before i forget. You also realize that having the default ui strip out unknown {icon} could also be used to hide the itemlinks sent in custom channels as well. So, maybe some of you could post in support of my suggestion on the 2.4 thread.