Receiving chat channel
Hey all, I've been going through the wiki and can't really understand how to tell what chat channel is incoming. For example if my friend whispered me, how am I able to acknowledge the message that he sent? Also how would I be able to return a message? I'm pretty tired at the moment, and most likely missed it, but if anyone can help that would be awesome!
|
here, these two snippets should answer your question:
Lua Code:
Lua Code:
|
Alright thanks! So I'm assuming that id is the unique chat identifier, channel is the incoming channel, fromName is the person who is communicating with you, and then text is the actual text? This would solve for incoming messages but how would you return a message? Would you literally just in ParseChat return a message?
|
"parseChat" is just a function I'm using that takes the callback from the "EVENT_CHAT_MESSAGE_CHANNEL" event.
You can't send chatmessages via script. There is a command for it... Lua Code:
|
Ah...I suppose they won't give us access to it either would they..
|
I doubt it, theres already enough spamming going on without it. :(
|
Damn spammers :/. Ok well another question, at the moment I'm set up so that when a whisper comes to you it lists the username in the chat log (don't criticize, I'm tweaking stuff) however after the names a "^n" is appended to the string. I tried to use string.gsub to remove them but it doesn't work. Any thoughts?
Code:
|
I've seen different suffixes, not just ^n so I use this:
Lua Code:
|
All times are GMT -6. The time now is 05:11 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI